/* called by: entrance ctrl of the object 'track'4 _- n7 N) @/ j* K
*/
; k- u7 n" H5 R3 V8 A) m% A9 qis+ f9 b4 @9 a/ a. A
part, GlobalDistObj, assignLObj:object;row,Lan:integer;+ P8 s* y* |2 m
do
, `# s8 T6 J5 X" w2 f# S Lan := rootfolder.Internal.Tools.AOLlanguage;5 E H. u! P# d, H# _
if current = @.Destination -- else return
( Z1 O. U/ |8 I3 U+ c then }% H* B1 V1 r# E7 `) K
@.Destination := void;( t! K; m: S7 w( R \: o8 h
if @.occupied then+ s: x3 T8 Y0 B; v0 n; x
part := @.cont;
9 i& {- A5 p& ]& | @.transpOrder := void;5 R, X- U4 B+ Z$ z" k1 I. q
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
f! `" @( Y: h" s1 B7 O @,root.eventcontroller.simTime);
0 }! T" R; E' p6 x3 P$ N! ^8 M( ?3 o4 N @.HasOrder := false;; @. r! O- b! c1 V
@.DrivingHome := true;! `. L* ?, F, }/ ?1 q% N" R" R
rgManager.tryToStartTransOrder;
( F1 b6 D" c: Y' i& I; [! E5 e! g( U if @.Destination = void: \( R; }1 F) a% l$ g$ y& y
then -- no transport order for vehicle @ e9 x+ B Z8 N5 u
@.Destination :=! b$ I: `6 N. V$ [" y7 ^
rgManager.nearestFreeStation(@,track.~);8 G2 d0 e7 z' t0 t- o6 W
newDirection(@);
3 l5 c4 ~6 m, b! h" ^; F% E if @.Destination /= void then
- y8 K+ w) ~8 p @.Destination.NumReservation :=! q2 C# D" `* z" z+ |
@.Destination.NumReservation + 1;
$ a" e6 `4 [6 B end;/ k* r# q4 m6 Q$ S
@.CurrIcon := "drivingHome";
/ h4 L. \: D5 @% f @.DrivingHome := true;
4 s4 F0 ~+ [8 |! H) A f. J( F end;
8 V' t# s, n3 ~4 w2 t& ` else -- the vehicle @ is empty, both vehicle and part are in the same dock station! T) U8 e0 r& z3 f% B7 q
part := @.transpOrder;- W0 ^: W1 p4 C! Z
part.move(@);-- load part1 c6 c$ w) R/ n0 `, E
@.CurrIcon := "load";4 D4 D; `1 H: b
GlobalDistObj := part.globDestination;
% ]( y, a) @* D" R: @. P assignLObj := rgmanager.rgAssignL;$ k3 c; a$ z+ |+ V* X$ h. Z2 W
row := assignLObj.getRowNo(GlobalDistObj);9 p) ~2 h; d7 |2 a7 ]
if Row = -1 then -- since 70/ Y! R8 S& v( x7 k8 W* u" d% \
if lan=1 then
, t; [* A7 z+ T+ E5 ^ promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),/ C/ W: u( Q" j) s: Q* i/ P; _- J8 F
to_str("in der Andockstation: \"",?.~.name,"\""));& y# h! [4 c- C' t# x2 r9 T
else
, }, N, _+ @1 R promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
3 L; n8 L% P: p' Z4 b8 u to_str("in docking station: \"",?.~.name,"\"")); 8 j7 L, D" z: o. `: e+ ?8 x, }
end;
) Q( L/ Z4 @6 |( I# {# s- _* e/ W2 w$ k' z else; ` _# X1 @% Y# X8 H" ^
@.Destination := assignLObj[1,row]; }; G$ d V' M3 C9 c$ q
end; # R1 J2 S) r0 W+ s
newDirection(@);
) Y Q p. C3 a% R0 C @.HasOrder := true;
1 `4 T2 W5 `# s- c end;
9 K2 G6 H' @) ~) j, Y' j/ Y end;6 J; i* v* z: m7 _7 `9 N
end; -- of the method! s# Z1 H% F! o, U7 H! i1 q1 }7 f
|