/* called by: entrance ctrl of the object 'track'
- s" [" _* N# P" y' I: a*/; v& B/ i& n5 R( o, B
is2 \' g1 w, H, t+ z5 a' M+ y7 |0 ?
part, GlobalDistObj, assignLObj:object;row,Lan:integer;0 [6 R! X0 X+ n5 d9 k- o& U) n
do3 m s" ^3 l# O" W; Y, v2 E5 Q
Lan := rootfolder.Internal.Tools.AOLlanguage;0 n& b; `( K" b' H W& a" k) }
if current = @.Destination -- else return. X- Z U# i2 N. l
then+ y: k5 L& }3 m0 l2 G
@.Destination := void;
2 h/ k$ x4 v9 C9 U0 h if @.occupied then
" y/ ?5 x Z7 R8 V& _3 [! F6 W part := @.cont;
4 ^1 s _) }* L& Y- p @.transpOrder := void;
q. d9 g9 f7 K+ V, j- z$ y7 w0 j part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,& [0 [9 e; f( O- {7 H0 q
@,root.eventcontroller.simTime);+ [2 b- R# y! o
@.HasOrder := false;
. s3 Y5 o% v3 P/ B @.DrivingHome := true;; q2 G' l& ^: s' w' x+ n
rgManager.tryToStartTransOrder;/ q: j/ M2 P5 \' ~" W( D# i }
if @.Destination = void7 O9 [: w+ T4 l( k1 y
then -- no transport order for vehicle @
4 \2 D$ _9 G7 O4 G" T @.Destination :=
2 h* c3 W: [, j( D& t& [2 u rgManager.nearestFreeStation(@,track.~);
4 |9 ]: E4 w3 W) Z) \ newDirection(@);
7 b6 ~1 }5 y% _. \* i9 w if @.Destination /= void then7 W5 }4 ]) W1 O7 g
@.Destination.NumReservation :=3 ~: j s% p. a- q% T, Y
@.Destination.NumReservation + 1;
7 T% X4 `) ]. _7 V end;
% M: \. b1 M- C @.CurrIcon := "drivingHome";
9 b5 h! ?; d7 W: O7 ~ @.DrivingHome := true;
9 E9 E9 d$ y. g& E; w1 X& y end;$ I3 |! H) l9 R8 [+ a1 t/ Q2 @
else -- the vehicle @ is empty, both vehicle and part are in the same dock station U' K- @ Q$ ~6 k8 X9 J
part := @.transpOrder;
3 `0 l. v, {. `1 P4 r5 u0 E part.move(@);-- load part; r0 z9 m8 H8 ~1 ]8 M
@.CurrIcon := "load";
% F w N+ Q4 W/ J- G9 v GlobalDistObj := part.globDestination;& H" ]3 G9 k- ^9 [/ v6 ^3 E
assignLObj := rgmanager.rgAssignL;
2 L) u, c# x! q5 ?# I row := assignLObj.getRowNo(GlobalDistObj);5 @1 n9 i" T1 }& T1 }
if Row = -1 then -- since 70
5 |- T7 B2 L8 { if lan=1 then8 n; r# h9 |, ~
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),+ O7 o. b3 g( y/ f: H2 A" g! h# ^
to_str("in der Andockstation: \"",?.~.name,"\""));5 I5 c0 `7 M, W4 f4 n
else
( b( q3 U7 b4 v# J2 v& L: V( `: V% E9 T promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
- e5 F* ? R# E% s/ z to_str("in docking station: \"",?.~.name,"\""));
$ ~, `3 k+ J7 e/ g1 T: v* Q( k }' h end;
" E4 \; f% D# s2 a+ {, A. @ else8 d$ k9 H" C8 [" n0 r
@.Destination := assignLObj[1,row];
# j( w5 F- B( W: ~+ }+ c end;
) E+ l; o8 Q h, ~! U+ L newDirection(@);! @! p7 i9 Z) @; Y( ]
@.HasOrder := true;7 O8 {3 h! K! g4 A7 d6 R, m
end;5 U( O# ]" k f( X6 J
end;
% _+ }" e3 j9 n. F4 t8 dend; -- of the method
+ j4 T6 ?/ s0 U |