/* called by: entrance ctrl of the object 'track'
`0 J. z9 Y+ e- i( w3 A8 `7 e*/( W8 M2 x! f/ r8 O+ ?) a
is" f- h" |2 E/ L0 v* s& b7 e
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
9 X2 h Q+ N: G6 v, mdo
# @7 U/ d9 R& G8 h" g6 B. o Lan := rootfolder.Internal.Tools.AOLlanguage;2 z n* ?8 A$ L' D4 }9 g( i
if current = @.Destination -- else return+ `, F5 j# ^! @# v$ u* E
then' H! }9 ]+ m7 A: f% @
@.Destination := void;3 |, l$ k+ `/ o4 e H5 F1 G
if @.occupied then- m5 i" a' u& E8 Z/ j% U
part := @.cont;
1 r" T3 \% ^. h5 S$ E @.transpOrder := void;
1 T# ]$ Y: s0 R& i* s+ ] part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
' i/ M7 P+ \' M- w @,root.eventcontroller.simTime);
" W3 c+ t( b+ w, U* |& S8 L @.HasOrder := false;
% `! ^- m! f" ~ @.DrivingHome := true;8 z" [! }2 f4 U) Q7 Y( P, `
rgManager.tryToStartTransOrder;
' R0 e6 @: R1 M7 G0 O0 Z! n7 ` if @.Destination = void
@. x+ Z" v" j t+ E! B then -- no transport order for vehicle @! q9 m y2 p/ e, i* G+ ^
@.Destination :=+ n6 _. D7 G+ E9 I/ e/ v. a
rgManager.nearestFreeStation(@,track.~);
) x% D T4 Y4 i6 y newDirection(@); 6 x0 C7 ~+ z* a+ q7 J& L
if @.Destination /= void then
- ]7 n' @% _4 q @.Destination.NumReservation :=. i2 W: d9 ` g9 V4 l5 V' S& ]5 S
@.Destination.NumReservation + 1;5 R, E. Z& w7 b) ?+ A! ]1 K
end;; w1 M: \! o' X+ k' ^: {9 o3 _
@.CurrIcon := "drivingHome";, i, @6 v0 k) q+ y- b3 d2 \
@.DrivingHome := true;
8 j& @/ E* V- l5 ^" K end;
z' r, `' d8 v' U, g" @ else -- the vehicle @ is empty, both vehicle and part are in the same dock station
- K( x6 P: L6 \% Y- } part := @.transpOrder;6 P7 y9 G. [* q7 \; v! s, ]
part.move(@);-- load part+ u4 i: q' |+ H# H( N g4 h: n
@.CurrIcon := "load";
( c" @3 z, B/ y, E4 M" M/ m GlobalDistObj := part.globDestination;) R) [! Y' a* q
assignLObj := rgmanager.rgAssignL;
) h4 \- q; F1 o4 q' `+ |! K row := assignLObj.getRowNo(GlobalDistObj);1 ?" V' b9 V: s" g3 _
if Row = -1 then -- since 70
, r# z! }3 I' k9 T3 Q9 |( ^ if lan=1 then4 ^, v& ^' L6 a
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
/ n: \ Z! ?5 K3 Q6 |$ D to_str("in der Andockstation: \"",?.~.name,"\""));3 U) B& ?) z- L1 C6 R- Z! G
else$ X" `& H- u% V5 d+ Z. ?( k
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
( z* ^4 t' t+ Y0 e$ E5 n: G to_str("in docking station: \"",?.~.name,"\""));
$ k9 m0 K% D8 R0 K T; v9 x" y end;
& t, K0 d S& D8 f, u else0 I3 w( v1 m2 |. M" l6 S
@.Destination := assignLObj[1,row];* w' m6 B u% f* X [2 D& S
end; $ j# @, @" r3 s8 u6 N" w. K
newDirection(@);
4 J. T1 F$ Z- l! A @.HasOrder := true;
9 R8 V& Z* C- Z0 i7 o! w end;
`4 n; o# n4 ^4 J3 x end;
! T. z& M T/ N: R1 r. S- \ xend; -- of the method i6 B5 I2 A1 J4 j q; |4 h$ I3 f# e' M7 a' E
|