/* called by: entrance ctrl of the object 'track'" n' U, M5 u2 ~8 P- ]
*/
# v/ ]9 `# n# E7 jis# |2 Q3 p& T- j( ]5 j3 c
part, GlobalDistObj, assignLObj:object;row,Lan:integer;; c* S- M. X) J1 m0 v
do4 t8 k) `8 p1 A% `' h
Lan := rootfolder.Internal.Tools.AOLlanguage;% Y# a& t' F) V1 y2 u, h. T7 L
if current = @.Destination -- else return
9 M6 O' X5 l! b then: L, @+ H* @* d% R- O
@.Destination := void;
0 `3 P4 Y+ [" r0 j if @.occupied then! Y6 ]$ e: q9 N2 v
part := @.cont;( p- W" e; ?$ z/ h
@.transpOrder := void;- s0 n5 f2 ~, h+ f2 N/ L6 N! E6 ?3 F
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
7 k+ V F" a2 o/ d# @3 I& }. X8 X, m @,root.eventcontroller.simTime);* z- o( j/ S: f4 {
@.HasOrder := false;+ V# Q. n0 L# L, X4 v
@.DrivingHome := true;
8 {9 R, q* g, G7 q* D0 m+ r rgManager.tryToStartTransOrder;5 `- {$ |4 S8 e1 A2 |; h
if @.Destination = void
! e+ w4 q! M. {+ s then -- no transport order for vehicle @
/ n5 ]; f+ Q3 n4 G0 b! k) N @.Destination :=1 c6 W) E4 l0 r3 L! w' W) _, i, b
rgManager.nearestFreeStation(@,track.~);% I1 w% \4 P7 b
newDirection(@);
" j$ K* P; B- N6 A' C if @.Destination /= void then' ^2 p7 X/ H2 C6 E& ]# u
@.Destination.NumReservation :=. N+ w/ E/ X5 e& X
@.Destination.NumReservation + 1;; Z8 ~+ C+ m7 G/ w' j% n- j; x
end;
, I4 r1 ]" D0 `5 A& |7 S4 q& O0 w, o @.CurrIcon := "drivingHome";
9 o, j/ R& O8 p. I4 c @.DrivingHome := true;; _( Y# ]7 o5 ^; B) p4 @
end;
7 p+ |8 g; H( a- T2 F. B. a else -- the vehicle @ is empty, both vehicle and part are in the same dock station
+ m. k( g' {( o part := @.transpOrder;
' D+ F7 [1 t5 \) T+ D- A9 ~0 x9 J% e part.move(@);-- load part
7 {& b% J/ D% H r @.CurrIcon := "load";
6 F; G7 ^$ r1 ?+ W; } GlobalDistObj := part.globDestination;: A1 L: L# [5 a" T5 n' }% x0 u$ I: R
assignLObj := rgmanager.rgAssignL;
[/ D5 D6 \/ j) `5 H/ ^% j8 d row := assignLObj.getRowNo(GlobalDistObj);
E5 s1 W1 ]" s" b; p9 Y; a, f2 p! F if Row = -1 then -- since 70$ N0 e1 H' Y, I9 w E2 s" X
if lan=1 then
6 b; H8 R4 Z& l- @ promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),- ]4 v9 y8 Q5 n& H0 c0 o! q1 y
to_str("in der Andockstation: \"",?.~.name,"\""));. c! v( |4 `* P' y
else
0 u' A% L( ]7 L) o promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
( b7 o. h5 T6 R0 b4 Q to_str("in docking station: \"",?.~.name,"\"")); - e) L" L1 J6 D) y. o# M
end;
z! B2 l0 ?7 w" d, s3 Z* P2 u else
# O4 T; R* h* g$ h: J @.Destination := assignLObj[1,row]; ] n% E! K, Z
end; ( o, b! ~" j. l$ B
newDirection(@);
4 T4 |7 L8 D3 A @.HasOrder := true;$ h6 J3 @: k. w! K
end;
& E- \5 P6 r+ `/ {4 d, j, [ end;
+ \: d" ^( P1 u; V, Oend; -- of the method- C1 u8 k3 X5 m9 m @+ D. A/ V9 k: x( a
|