/* called by: entrance ctrl of the object 'track'
, P9 Y* L6 b0 w% Y- `# ^*/( A) T" ]- c7 D( x( C) g6 v
is. V& `* U: o/ J& q
part, GlobalDistObj, assignLObj:object;row,Lan:integer;1 v8 _% d. @2 e+ O2 s1 C
do
2 O- ~/ Z; ]. l' T Lan := rootfolder.Internal.Tools.AOLlanguage;
( Z# B( l' E$ s6 s3 H% j3 | if current = @.Destination -- else return
- a0 y; C+ |# i2 O1 w: e then# _) a5 _; n% V9 r6 C) s3 M8 |% w+ p$ ^
@.Destination := void;$ ^& u+ L B6 @3 k
if @.occupied then) e7 E& ]" @ k
part := @.cont;
6 q% _. @; i3 A. ^ @.transpOrder := void;
2 x9 P( m- V2 Y( D( l part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,. U1 L9 w, g9 i7 B9 G- x
@,root.eventcontroller.simTime);) i( P, G: a1 y- \) B" s# O9 c
@.HasOrder := false;' l9 ]# M7 Q3 _# w9 f
@.DrivingHome := true;
' r( q8 _! y6 ~# f" [ rgManager.tryToStartTransOrder;. r, M E9 j; j8 R% Q# M7 c
if @.Destination = void
' y" S. H* `1 k f* ^0 _* T% S9 N then -- no transport order for vehicle @2 t8 Y8 |% z& n/ Z0 h1 X+ r
@.Destination :=% U; A/ l2 p7 `. ]5 W' W0 Z& F- [
rgManager.nearestFreeStation(@,track.~);$ v4 N% v3 x- n( s8 f5 c4 W
newDirection(@); ! t1 F" l6 i2 y0 n8 R, \* Q0 d
if @.Destination /= void then
7 k$ B. a7 l* U+ E6 I: } @.Destination.NumReservation :=; F9 A4 A. H: I! u$ E' B3 x
@.Destination.NumReservation + 1;
' c+ l6 P u1 F1 G: f+ T end;5 L' W/ S7 a- ?6 y q; @
@.CurrIcon := "drivingHome";3 l+ F3 Z, ?5 Z- d/ M8 L
@.DrivingHome := true;- P$ X5 ^2 r9 b/ r( U+ [$ H
end;5 ^2 j- W2 Z7 W# ]* a
else -- the vehicle @ is empty, both vehicle and part are in the same dock station2 f- [" C6 W- B. j& i
part := @.transpOrder;& l# j9 K3 L5 Y9 v8 m
part.move(@);-- load part
# C _/ q, N( I @.CurrIcon := "load";' v" ?7 F( u7 Y. O3 g
GlobalDistObj := part.globDestination;
2 a! `- u' x5 p2 {2 s/ P assignLObj := rgmanager.rgAssignL;- m4 m# a1 T2 M+ g, H
row := assignLObj.getRowNo(GlobalDistObj);0 R( {8 a, E- Q& n! x, M8 e
if Row = -1 then -- since 702 f3 K- }& T- X8 m
if lan=1 then7 d/ N, I; y! U/ x" u* N# M4 Y
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
' |7 m' g, s5 | V9 W5 S3 } to_str("in der Andockstation: \"",?.~.name,"\""));) u8 j8 E, \6 X" b
else
) p& D6 R! E6 f" j7 D5 ~1 F promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),1 v4 |7 m- Y6 y& Y
to_str("in docking station: \"",?.~.name,"\""));
! y" u" C3 W% s' t end;
7 F$ k9 H7 h8 |# z& J; s: X0 n else
b) ]' ` ?* y1 e h/ c9 m* z; u @.Destination := assignLObj[1,row];, K& @, f- B6 N( N, Y+ u1 i+ j
end; 7 h6 u$ w7 ]1 `; c! Z# N) Q \+ q
newDirection(@);; Y; o" e6 K, z+ ]3 {0 |1 m) ?
@.HasOrder := true;+ Q1 h: g, Q5 L* h& |. j: }
end;
- ?4 @9 }1 r! J) H end;' I6 h" g- `1 i5 Q' B8 F
end; -- of the method7 m" i8 g M/ i) r' ^& h( x
|