/* called by: entrance ctrl of the object 'track'
) d7 {9 C2 `, S4 e, ^*/
" d/ |! {' ^' Z5 |is
3 J1 X$ W3 |7 L: r% j part, GlobalDistObj, assignLObj:object;row,Lan:integer;- ]; N1 r, w7 o5 ^: K2 C" a* e
do9 x1 J+ f, V; o q- {. _8 ~1 k
Lan := rootfolder.Internal.Tools.AOLlanguage;7 T7 l3 |% b# r+ c3 q! D
if current = @.Destination -- else return/ ~% Y& Z6 }7 m5 t1 V
then
, s# J# p/ y" t- A7 _: O$ j- T @.Destination := void;5 L0 |& _$ V+ N6 M" E
if @.occupied then1 Q5 {0 W2 d6 A; V
part := @.cont;
$ q! j2 f' A2 ] @.transpOrder := void;+ \. K) u" R% ?+ |+ b0 A* g
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,, {1 J& s: L- p$ m3 n8 T1 I
@,root.eventcontroller.simTime); e+ n5 N* f, a6 A3 E- n
@.HasOrder := false;
( Q* O5 G- H3 ~) Q8 p @.DrivingHome := true;5 x t0 V8 U' o, t% \
rgManager.tryToStartTransOrder;
4 h3 {7 e4 r9 ~" O: a; v if @.Destination = void* b2 E& g& e( J( d
then -- no transport order for vehicle @% F$ }5 L1 l! a6 I6 p. w
@.Destination :=
3 O$ O6 |" X' z9 b, M, d rgManager.nearestFreeStation(@,track.~);
) V$ s9 K) D" l$ T newDirection(@); $ ?" }% D* K* Z& R9 C8 M% b! G e: d
if @.Destination /= void then
7 ~% x2 A! |0 {, K2 I @.Destination.NumReservation :=
. g# C0 Y+ @; K2 E' P9 C @.Destination.NumReservation + 1;
+ \& \, H2 x5 O9 O h1 G end;$ l& `; |9 j3 u- @. B
@.CurrIcon := "drivingHome";
" B- g4 y5 f0 D2 O, P. G; G3 j8 X @.DrivingHome := true;
* D# C. h8 ^0 F end;
' C; @# v* I6 n" i else -- the vehicle @ is empty, both vehicle and part are in the same dock station) E: Z2 Q$ ]0 z' U! @7 I# U6 h4 h) Z
part := @.transpOrder;
$ v* ~7 ^+ Q! p* Z# { part.move(@);-- load part
; U* Z0 l6 z# t7 ] @.CurrIcon := "load";( @/ `4 A" }* U9 W
GlobalDistObj := part.globDestination;
. K" M7 s2 t2 m L4 f7 {/ r assignLObj := rgmanager.rgAssignL;% \6 l/ Y$ U% t& z
row := assignLObj.getRowNo(GlobalDistObj);* Q& h) Z, x; L! r3 c6 @$ M7 @
if Row = -1 then -- since 702 \+ F- {. Q& x0 J# J9 L
if lan=1 then
; r! g* X7 N% [; e; g; \1 N& H promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),7 z2 ?2 S: d. U- v f4 t
to_str("in der Andockstation: \"",?.~.name,"\""));
3 l5 m! P7 V5 V. H6 b else
& L4 g/ P! n0 g2 J# b! e( d promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
- h0 V* }* l4 T1 O1 D+ O7 g( d1 D: W, V to_str("in docking station: \"",?.~.name,"\""));
3 _$ K: E, B' }& T end;
; W4 s3 k) Q+ Y _ v/ V7 D else
, F- [) F3 K; f" Y! ]! G: x @.Destination := assignLObj[1,row];7 t2 S) V$ S7 W3 `1 c% Z
end;
6 }* e, h. \7 E1 t newDirection(@);& _) A! i" D) d9 m+ n2 P$ C- b
@.HasOrder := true;
/ `! q. _ r/ Z# q8 S end;# Y$ C) T7 G; @' |/ P$ j4 {. G$ d
end;
- X# x* T/ U" `( |/ X( G6 Mend; -- of the method+ B& U7 l; f+ F# w& c
|