/* called by: entrance ctrl of the object 'track'- Y. m5 k' `; _+ H
*/9 I& o: s* p- U4 }+ }8 r" {: j% t
is
' m ^2 E- A! n" M9 S7 | part, GlobalDistObj, assignLObj:object;row,Lan:integer;/ t: F$ y3 L: v' m
do! w5 ~5 N6 H5 W+ W: U
Lan := rootfolder.Internal.Tools.AOLlanguage;
6 f3 T; m+ _6 R. e; x2 u5 L& M if current = @.Destination -- else return
4 F! ?" j9 b! j5 n& Y; q* D then( C3 i W) h8 y" v( w9 z! R" [' c
@.Destination := void;$ I& a9 [, ^" w* @' M( p2 i# T
if @.occupied then
4 \8 ~1 y4 S, Y8 B part := @.cont;% P |" C9 l3 u" X4 a- c2 T
@.transpOrder := void;, a) T. `' T3 G2 u$ ?
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
9 D1 _& L! X- R, Q @,root.eventcontroller.simTime);5 t. |4 r) g* O* ^5 \
@.HasOrder := false;, Q. M0 x1 {* V& X. `
@.DrivingHome := true;" f& g0 T" ?6 O5 f) c1 e/ l: B
rgManager.tryToStartTransOrder;9 I4 @4 c. _! W/ d9 r& b) e0 a6 @
if @.Destination = void
; h. ~4 K& X# o S9 d0 ~0 Z# v' P1 v6 | then -- no transport order for vehicle @
- ^( I; g3 |1 i ?* ] @.Destination :=6 I- y% S9 Q: E7 ~& R/ p+ b1 G
rgManager.nearestFreeStation(@,track.~);& B! Y( i$ |, q
newDirection(@);
' ^- o+ z& {2 c5 R: u) U2 v4 d if @.Destination /= void then- f6 Y/ Z" H! R/ J0 x* i
@.Destination.NumReservation :=5 |1 K3 |* r V- j, G
@.Destination.NumReservation + 1;' T. e! S% q: k/ j
end;
$ c W* z: n+ _# \) z; g- u, r C @.CurrIcon := "drivingHome";
- A8 U: A8 p! i. l( h7 Z1 k @.DrivingHome := true;
5 R8 {1 L2 w2 t: q q9 l end;
/ z+ m7 K) J5 J1 z else -- the vehicle @ is empty, both vehicle and part are in the same dock station( T' i, \2 L0 J/ w2 p# s3 p
part := @.transpOrder;" k/ [, ~6 K; x( U& E6 J
part.move(@);-- load part8 w- g; g+ ~; x0 A6 a
@.CurrIcon := "load";
: i8 f0 ]( a4 z/ H; z0 z% A GlobalDistObj := part.globDestination;
* T7 n1 i. o, \9 J assignLObj := rgmanager.rgAssignL;' _2 f; ^! p+ Z
row := assignLObj.getRowNo(GlobalDistObj);
7 j1 Q+ \! o& R% p& \ if Row = -1 then -- since 70
: ~) D9 U! z* D& M/ ~ s( t if lan=1 then, T' n2 s, ^3 k! x
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
* _9 \( A& U; ?# Z* P, T to_str("in der Andockstation: \"",?.~.name,"\""));; H6 S9 k @+ n/ C
else' {; K; K# Y4 F8 w, H0 m# V0 }! G
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),0 T7 ~4 `0 \1 c5 q+ E
to_str("in docking station: \"",?.~.name,"\"")); : s2 b, }' Z- g1 j* _7 L2 H. m
end;
" M, w2 D$ q2 W7 i4 n7 [ else
0 Q5 Z4 ^9 B3 U; F+ w @.Destination := assignLObj[1,row];0 U( B! ~9 U( g/ M* \' J: @0 s8 x
end;
/ b2 Y: u# V2 m newDirection(@);5 o; n% Y! Z" i( i4 b( M
@.HasOrder := true;- ], {& D5 o) {* ^1 ~
end;
) R2 ` A |$ s6 {* L1 K end;
1 l2 L& o. Q oend; -- of the method
7 o/ i" `& }9 @" e9 n |