/* called by: entrance ctrl of the object 'track'
9 J8 @2 _/ x3 Q- y3 R% F/ N*/
5 ?/ C9 P. V4 T8 P5 cis
' A3 e, f) q/ G& G* G' e O9 l part, GlobalDistObj, assignLObj:object;row,Lan:integer;) k3 b) ~- L, k+ d. M# O
do* B) {, y# T; g5 v; K+ f
Lan := rootfolder.Internal.Tools.AOLlanguage;
, c Z/ [9 r) s if current = @.Destination -- else return
# I/ y. N. H/ m k) _+ t then+ b1 L8 G; H" A
@.Destination := void;# V2 ]1 P3 T- t0 a& J5 a
if @.occupied then
' X! A2 V" t: R; y part := @.cont;6 |4 U8 Y4 G( v
@.transpOrder := void;3 b% w, i1 J% Q% m1 t3 N
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
! O6 G9 D; W% j: H$ w8 _ @,root.eventcontroller.simTime);2 \6 Z. N4 t" O. m8 T
@.HasOrder := false;
& h& W- a* v, b @.DrivingHome := true;' ~) M; ^3 j' J! ~( Q' a
rgManager.tryToStartTransOrder;/ I$ `( q# z+ Y+ x) Q$ p( S
if @.Destination = void
' S- T! L& S% Y5 }- s% {; C then -- no transport order for vehicle @6 l, X0 L$ a2 m6 p# f) P/ Q
@.Destination :=
' K: B7 \0 H& A" p/ T rgManager.nearestFreeStation(@,track.~);. A! E6 U, y. o+ V, }
newDirection(@);
: A. a0 B+ T* c if @.Destination /= void then! _/ R+ `6 F! O- s
@.Destination.NumReservation :=
6 ~- G) c3 N; C4 L* ] @.Destination.NumReservation + 1;8 t R+ V7 L: s7 _# l2 _, [
end;* E) k6 e$ A9 N/ c
@.CurrIcon := "drivingHome";
* z, I$ [% V0 [' x( }8 l @.DrivingHome := true;. a7 r+ t# C' i7 u
end;! x; m) n9 S$ D5 {3 h
else -- the vehicle @ is empty, both vehicle and part are in the same dock station: I/ A+ d& g! w5 G, `7 T
part := @.transpOrder;
4 \ h0 x- Q& |, ~! E- p- I6 q part.move(@);-- load part
7 k P" t: N- B" j7 C" }( q @.CurrIcon := "load";. e8 s$ r6 I6 | s* W5 d
GlobalDistObj := part.globDestination;
. w* X4 H4 i1 m assignLObj := rgmanager.rgAssignL;& h. Q$ b* s! w
row := assignLObj.getRowNo(GlobalDistObj);. ^1 _& i1 w8 _3 h$ {
if Row = -1 then -- since 709 c; U5 ?3 e& M1 F
if lan=1 then9 u+ n& [5 ] \; V
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
1 D, r7 y6 Z- T f! d, ^+ k. ^ to_str("in der Andockstation: \"",?.~.name,"\""));9 v7 m( a$ ~2 n" U
else/ m3 d7 j9 S0 j" J8 K+ U1 z# D) F" F
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
7 T' O8 ^2 [/ O! ^. }; z, L- D9 y to_str("in docking station: \"",?.~.name,"\""));
' X0 y# |2 c! I0 g: K) G$ _ end;
) F' y n# ]* i% c# h% @8 ~8 t; }: P else' r2 l9 H, B. [) v5 U5 O" }
@.Destination := assignLObj[1,row];
# `% f" R- r6 D+ v/ y' `3 D5 \ end; $ N2 I$ m7 g) H. e: P% q, y
newDirection(@);
6 J. [- Y0 Y% D! a1 ^ @.HasOrder := true;) W; H8 ~( u; i
end;; b" P% {8 }8 L5 o: }
end;
5 o# F; @, \, B) O+ Nend; -- of the method
0 [5 ^. i& C# Q# B; s" |, e |