/* called by: entrance ctrl of the object 'track'7 X' t/ f- O5 K X `' E
*/
' ~& R1 [8 k3 u+ \( xis
+ i$ f8 f, W. A" @5 O4 i, s part, GlobalDistObj, assignLObj:object;row,Lan:integer;
3 y7 r) q' w* t; b$ R [/ l0 xdo5 a8 ?- q# _" r
Lan := rootfolder.Internal.Tools.AOLlanguage;& T8 S, D0 s& h8 q; Z; S! F0 d: U
if current = @.Destination -- else return
' J) T. f" K9 Q: N then
K& j% n [+ x- B @.Destination := void; o! o4 A0 Q/ p0 |8 H
if @.occupied then* u+ U1 d, G: P/ D
part := @.cont;' x1 |: u$ s9 {3 N5 V
@.transpOrder := void; k8 ]: Z; t# V8 R/ h/ b
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
# N* T. n4 j3 y8 c2 o @,root.eventcontroller.simTime);
8 q, q2 R2 l/ N) T @.HasOrder := false;# t( }2 b: k7 E5 X- W* ^
@.DrivingHome := true;
' i3 K' K l2 e3 `( i rgManager.tryToStartTransOrder;0 K- _6 S3 B9 ]2 c- W, k, u
if @.Destination = void& R& o! C3 U" [, _9 c
then -- no transport order for vehicle @+ s+ J5 F, N: t# Z
@.Destination :=
3 k: b8 O/ b* z4 ~, J( D rgManager.nearestFreeStation(@,track.~);
& M9 q8 |/ U2 k1 B- s" Z newDirection(@);
! R1 n4 Z% ?- _7 [ if @.Destination /= void then0 h; @0 }; z* ]& `% I @
@.Destination.NumReservation :=" G' q& ]5 A4 o) G' S
@.Destination.NumReservation + 1;+ t& r6 ]. i* C3 O x
end;
7 }3 o/ }1 F. a4 k @.CurrIcon := "drivingHome";
6 _/ g+ }, F) S @.DrivingHome := true;
5 Y& B# X9 ~; \, [4 n, e end;7 e! `4 e+ {0 ~! X0 H* ]
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
- W( _# f# ]- F# d0 x part := @.transpOrder;
3 U# P8 ?4 i% \7 H# \0 q3 J part.move(@);-- load part) E' y) c0 r9 B; K" U/ d, n2 ~
@.CurrIcon := "load";
1 D, T, T: n0 p; n( x GlobalDistObj := part.globDestination;; }: U+ ~( q/ Y9 [
assignLObj := rgmanager.rgAssignL;
( p, _2 ^4 x; M. N, K row := assignLObj.getRowNo(GlobalDistObj);8 f3 n" l @+ ?- _! N# g; d
if Row = -1 then -- since 70* K. |* n2 _" o k# c/ y
if lan=1 then
7 l+ M( X; x* S promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
2 t* u- z& z! w) N to_str("in der Andockstation: \"",?.~.name,"\""));; L. L) `( M% n" D9 |
else
% w; Q- _" O5 ^: ~+ o. a promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),% u8 v& d( w: z( y
to_str("in docking station: \"",?.~.name,"\""));
9 Z4 g9 V; `4 W" t" X end;
* z' g S6 j8 \$ P( m else- i; O# }' z% e% J9 X( V4 h6 _
@.Destination := assignLObj[1,row];
, X# j. X( }7 K Q8 T end; ! C$ C3 s- a4 I; `
newDirection(@);
! z7 x6 j2 y4 K5 r) ] R @.HasOrder := true;
5 c5 R& X, e3 O* Y end;' ?/ x8 o3 T9 ]6 {, K0 E
end;
* c# m0 _# v- f( k' R0 C2 vend; -- of the method4 o, H+ L: w5 N1 B0 U
|