/* called by: entrance ctrl of the object 'track'% ]9 |; Q: M1 a0 r% K
*/: Q/ G& g; |% K- R- e( {
is: |, `+ i! n3 S7 }
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
9 |) T0 H% @5 k3 r8 ?5 rdo
5 T4 y/ M3 X- ?7 A7 N Lan := rootfolder.Internal.Tools.AOLlanguage;' Y6 D! t7 Y' C% U# m t; Q7 D
if current = @.Destination -- else return: r3 V; J1 `; R1 w
then
2 v" n& C R! i% @9 e! P @.Destination := void;
. g0 G. i# x! j% w' y+ T if @.occupied then
& i) ?9 X M ^7 q5 q6 r i* G part := @.cont;
% k) z0 D) ^& s8 ] J @.transpOrder := void;8 N) w7 [* G0 k/ o0 ~* [4 }
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,% F @3 f) o7 g
@,root.eventcontroller.simTime);
/ J& z e: I3 z$ c7 e) ^- x& b( n4 C @.HasOrder := false;7 a& K0 q: P9 j/ k
@.DrivingHome := true;1 l- a* B- A( x, d+ [6 k; w
rgManager.tryToStartTransOrder;
$ C4 o- W' Y. N! P( P if @.Destination = void1 W2 V' ^4 V' P+ V1 n
then -- no transport order for vehicle @
% `9 ~7 M$ x% [) l1 I @.Destination :=5 l# Y) G6 x1 F# A( v: S7 R
rgManager.nearestFreeStation(@,track.~);
9 W% {2 H( t# Q newDirection(@); 8 O5 K9 ~ _, G$ k
if @.Destination /= void then& j6 ~; F* F: t* x1 ~2 P- w
@.Destination.NumReservation :=
3 |: E" I c4 u2 ?! o/ S1 H% G @.Destination.NumReservation + 1;
# N! e4 x- G& `# e8 t end;
m. X# J+ G3 L @.CurrIcon := "drivingHome";) |& d( {. L' y! \9 x1 j
@.DrivingHome := true;
# e5 P8 {1 A3 ?% Y' r. M+ d, u end;/ [& @, L. k5 x0 R4 {
else -- the vehicle @ is empty, both vehicle and part are in the same dock station; X" j3 _" u& e# ]( p
part := @.transpOrder;$ b: q1 r- `& y; J
part.move(@);-- load part% V) N3 O. J! y
@.CurrIcon := "load";! N, f3 @& v- m% p
GlobalDistObj := part.globDestination;7 G7 Q. t, r x$ k! f2 `6 a
assignLObj := rgmanager.rgAssignL;
' P$ M! j( d& m$ s row := assignLObj.getRowNo(GlobalDistObj);
- o$ T! P- o9 x4 r$ p if Row = -1 then -- since 706 m$ K' g, J7 }' J' E$ H
if lan=1 then
( p! K, P5 a! K8 ?3 n promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),/ X5 D8 ]8 \& V5 t E
to_str("in der Andockstation: \"",?.~.name,"\""));1 |4 b( b" | c4 {
else
# a4 m$ v1 L6 l0 X- V0 A0 V A promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),4 k6 {: ^5 W5 O$ R
to_str("in docking station: \"",?.~.name,"\""));
# z+ q! E7 f# `& D$ z0 C l end;
4 C8 _4 S# h3 H$ l* u+ v else0 p! `2 X0 C4 b t
@.Destination := assignLObj[1,row];5 M, K) p- j2 g* T2 V/ t
end; 7 ~) Y0 W! Y! W
newDirection(@);
6 E: [1 V# h! J8 @ @.HasOrder := true;
( s: c8 ?( P V( C2 L9 {9 q- {2 B& q end;2 E0 N. |$ Z! d" K& |1 D# ?1 h. `
end;! ^8 H: ~. z6 E
end; -- of the method0 D8 F8 c( L* g6 Z+ c, L8 T$ B6 {
|