/* called by: entrance ctrl of the object 'track'* ]+ P9 [& R7 V: }4 p7 ~
*/
1 x1 O" M; i3 V8 G& Uis
/ N! k1 q$ f) [+ B/ [ part, GlobalDistObj, assignLObj:object;row,Lan:integer;
# k7 G$ k" p/ Q) {7 {( w8 @4 @% Ado
0 ^) {5 R# h, E' N' W Lan := rootfolder.Internal.Tools.AOLlanguage;
' L! w3 k" H$ H# h" k+ D# z) P if current = @.Destination -- else return1 i& o, w2 T5 Y# c
then8 `3 }- I+ H$ t( z! w5 ^ v* K
@.Destination := void;
5 o) i; M1 F- T: j if @.occupied then
% b( z, R P" ?& r& ` part := @.cont;
8 N! e/ ]6 }: |+ k7 z @.transpOrder := void;
0 h% R5 j$ ?/ V! K' | part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
: p! u! {, f( W7 a% a- a @,root.eventcontroller.simTime);) a) u- i# s9 V2 M
@.HasOrder := false;
; u; g0 A; ?: M5 E" U! D2 u @.DrivingHome := true;
y* _7 |# C" n8 G% e3 Y rgManager.tryToStartTransOrder;
/ n/ [( a" u8 D if @.Destination = void+ T: E' H% U0 |- \0 \7 o# m1 S
then -- no transport order for vehicle @
8 \2 d- W+ Z5 b! }) n& H @.Destination :=, [! @+ n- ?% E
rgManager.nearestFreeStation(@,track.~);
/ Q* _0 U- h0 x0 W newDirection(@); 5 d% H+ [ {% t: q& ]" P: Z' }$ @5 g
if @.Destination /= void then& f {! K& l( ~% P- ^5 W6 A
@.Destination.NumReservation :=
+ G+ ?0 c( c+ X, h; R @.Destination.NumReservation + 1;: i! E2 ~! r$ D, w7 y7 z
end;
6 B v) o* M$ F5 D9 t @.CurrIcon := "drivingHome";9 s' f# y9 c5 R- @! F
@.DrivingHome := true;) d4 {' O3 U- K. \3 T
end;
. K% D9 ?! i0 ]$ Y/ m else -- the vehicle @ is empty, both vehicle and part are in the same dock station) R9 c3 J" N, v) h+ s2 A" E$ T0 x, N) W
part := @.transpOrder;+ Q7 R" \% w v9 h3 z) h, I( O
part.move(@);-- load part$ I9 f( ^. S7 t; |2 h
@.CurrIcon := "load";% q; {9 O+ ~! f4 p4 @ L+ I+ M8 C- t+ G+ {( ?
GlobalDistObj := part.globDestination;, m8 O7 }. |" c7 ]/ Q$ v4 l
assignLObj := rgmanager.rgAssignL;
$ c j6 o9 A" |4 a% r4 j% k3 q row := assignLObj.getRowNo(GlobalDistObj);
3 n/ x% s: w. i if Row = -1 then -- since 70
( s+ i0 v. ?# X* g3 e! Y& V* Z7 [ if lan=1 then+ X8 R0 d0 V: C- r4 S6 j. Y
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
. d- m. J: O* |4 |8 B( F1 a$ ~) O" D to_str("in der Andockstation: \"",?.~.name,"\""));+ ~4 N; m, A: u& Y. q6 Q
else
/ P( o. k4 L/ h3 U promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),2 ~# v, l4 G9 p* R2 d) P' A. K
to_str("in docking station: \"",?.~.name,"\"")); 3 O3 \; }" _5 ~8 J$ K9 D
end;. W8 D' E, U) [; `1 v
else
7 L* E" U* O/ k' t v+ ], q! U @.Destination := assignLObj[1,row];1 `7 h! i' S2 c8 q& T4 N
end;
9 N" c# s% S* S" B; B$ j/ _ newDirection(@);- W( b2 W6 ?( ~+ k: x2 h3 G1 J; @% ]! I
@.HasOrder := true;( t7 I$ n0 M4 k3 [
end;: T/ C3 v. s7 j. ^7 q' y
end;8 \1 s9 q+ d4 |- U+ B/ @* A# D
end; -- of the method
; t, ?4 j, a- k6 Z, R/ h* D |