/* called by: entrance ctrl of the object 'track': l9 X/ ?) m. r+ N
*/, Z* d8 k6 l/ C) G+ k |3 d) y. G H
is& H$ c; O& s% J5 V: J; S3 v7 G
part, GlobalDistObj, assignLObj:object;row,Lan:integer;2 D" X6 E8 u0 N; X* i
do
1 W2 t) Z9 e3 E: w; ~9 ` Lan := rootfolder.Internal.Tools.AOLlanguage;, m. U' o' R# }8 z( N& F4 O
if current = @.Destination -- else return) C. `# d; y1 g$ k
then' o! ^' T$ L: l& [7 ^# v
@.Destination := void;! }. W8 x0 p |: V. z
if @.occupied then2 j5 G7 y- w' D3 N. ]. M
part := @.cont;
?& ^, e2 W C @.transpOrder := void;
& @- C5 M& u% a s, E! g9 ]% v& U part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,$ e6 I9 R9 z# u* G" c
@,root.eventcontroller.simTime);
+ R5 T# ?! m7 L0 H, @9 l0 _ @.HasOrder := false;
* U/ `' _2 [3 f) u% p% r, J/ N @.DrivingHome := true;
4 X) l+ [/ A3 P! v rgManager.tryToStartTransOrder;
; y3 s7 K+ T' M9 G9 L, P7 U' W: L if @.Destination = void
3 Q7 F" I' q% h then -- no transport order for vehicle @6 f2 f" \5 p) O s% O
@.Destination :=
! ~/ a' j: R# J( M8 m rgManager.nearestFreeStation(@,track.~);$ s' a, [: h9 V0 y" }( e3 M
newDirection(@); + q6 D. V/ X) L8 ~/ m8 o5 ~6 t! \1 P
if @.Destination /= void then: B# N3 ^5 i1 D$ a
@.Destination.NumReservation :=
/ X! D M4 o# x; d7 b& `7 s4 t* ~ @.Destination.NumReservation + 1;
! R; N# o- L/ R; Y end;
2 S8 N& \0 `$ t) T @.CurrIcon := "drivingHome";
8 \2 v7 [0 F4 |8 j* O4 K @.DrivingHome := true;6 i3 {* W' {8 l2 D9 B1 x. p
end;- ~/ B8 H, h8 j' ?
else -- the vehicle @ is empty, both vehicle and part are in the same dock station5 d. {# \. u4 Y$ S8 n% g7 M/ D
part := @.transpOrder;; Z! ?3 R4 g% ~( |$ E
part.move(@);-- load part7 ~' N0 p; S8 Q/ t0 h
@.CurrIcon := "load";
0 p( X. [1 A! R% Z5 V$ h GlobalDistObj := part.globDestination;
/ a1 {4 c7 \! r assignLObj := rgmanager.rgAssignL;
1 F# d! S7 Y5 [# g row := assignLObj.getRowNo(GlobalDistObj);- x: U `9 ~9 s# v, q ^* R, z( r1 a
if Row = -1 then -- since 702 z2 O6 E: d- U1 j+ W
if lan=1 then
# z8 b! v! Y4 ^ promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),) r4 z5 ~& d& F u. M) _+ s
to_str("in der Andockstation: \"",?.~.name,"\""));
0 c2 x" o! ?9 L" y! O else6 w* ?9 q7 d) Z7 Q7 C/ y( f
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
5 ^0 t: ?" t1 b5 V/ \) s to_str("in docking station: \"",?.~.name,"\"")); : K; K- X. l1 S/ \- ?) ^: U" J
end;
2 T: u1 h- E4 B6 q1 C- e else; R8 t n: ^. W* x# Q6 a, @
@.Destination := assignLObj[1,row];
( m. J. k% j( b. ]4 y# t end; ! J- I/ f& w2 |, C3 Y7 n$ B" T
newDirection(@);( ]8 p& C- H6 Q s0 l
@.HasOrder := true;! z% K- ?% \, o: Z1 N
end;3 {# o' a$ l" W3 G7 u: m+ C+ N
end;& `4 h; B8 E) E. j
end; -- of the method
2 `9 q; [/ H% F7 H% b, k |