/* called by: entrance ctrl of the object 'track'
" c2 |3 v( v) w$ K0 C7 i*/1 b, B# V) Z$ ^' |( q5 E
is9 Q9 @( n7 A/ O9 V, m0 T. F- s. ?$ ]
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
`' f; j3 i# M: V9 ^do( X1 K9 D1 B$ |3 L$ S5 a7 k
Lan := rootfolder.Internal.Tools.AOLlanguage;
; ~1 L, O5 J9 U( I( `. S; D if current = @.Destination -- else return7 K% [" w# H3 D& @
then+ h. {& ]; o9 P5 X
@.Destination := void;
, R2 z) t7 X" P if @.occupied then
( P. f: z/ \4 G& p4 w part := @.cont;# O) o' H$ k8 s5 K. [
@.transpOrder := void;1 `/ N) i8 M+ V ]) G' f( H
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
. l7 w. x* u1 Y( H0 W1 y* E @,root.eventcontroller.simTime);
& M8 E; I1 p% h* h2 H8 F @.HasOrder := false;
* L) M, h" n6 X9 f @.DrivingHome := true;
! {/ l' }" r# a3 a( ^6 D rgManager.tryToStartTransOrder;
; z( F* |- \- s if @.Destination = void# e) Q: I0 \" F# }
then -- no transport order for vehicle @- M {, q* q$ ?: J6 e$ ?7 e- {
@.Destination :=5 l$ W( s; q9 Q% d+ y5 M6 m6 B
rgManager.nearestFreeStation(@,track.~);- B3 j& h" F o# ]
newDirection(@); " |5 U) W% e( T9 J+ }! a
if @.Destination /= void then/ Q& A3 W: y; Z) K2 m6 A
@.Destination.NumReservation :=
- ^" Q# w f. \' \% p1 l8 s @.Destination.NumReservation + 1;
1 Y/ {( f& C4 ~" Y) P) R8 X end;& y7 N( a3 O% z
@.CurrIcon := "drivingHome";
* j. ?; G9 q$ F, L& n @.DrivingHome := true;4 T, m: e* D/ Z8 o: W$ c7 n0 H
end;
: C& w0 `! A: C else -- the vehicle @ is empty, both vehicle and part are in the same dock station
; A! N9 C: q( z7 ~: h part := @.transpOrder;' X ~7 v( ?6 ]# }' s6 ]
part.move(@);-- load part) b6 i7 t) h* J8 U% \5 W
@.CurrIcon := "load";
9 Z& E5 h# l Z# K$ d GlobalDistObj := part.globDestination;
$ {: W; g/ @6 I" E assignLObj := rgmanager.rgAssignL;1 Y" G2 d* J* @/ F' V% K
row := assignLObj.getRowNo(GlobalDistObj);9 ^$ P8 A; z3 v/ V9 L; P5 J
if Row = -1 then -- since 70) h0 I3 ?/ h4 K0 u
if lan=1 then
( G1 W- ?5 g( s promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
: z& ^+ p' H7 I: o/ C5 g6 E* [ to_str("in der Andockstation: \"",?.~.name,"\""));* ] G4 V4 [4 {2 t+ K% a# Y4 I6 e
else
6 V( d: Z* e6 H* x% X0 ]+ D5 K7 f promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
' m5 t: t( \1 \8 C; Z+ G to_str("in docking station: \"",?.~.name,"\"")); , }3 m* I2 {0 b- S
end;
, i0 v- z. U0 {+ [/ w& _ else3 O5 N0 ^* m' O! J1 Y3 n9 }
@.Destination := assignLObj[1,row];
* y7 U6 c. O [3 D( ^ end;
" ~3 R3 h. x. m4 C* r, S newDirection(@);" q; i* k. n6 E* d7 t1 }' M9 h
@.HasOrder := true;
$ d) c Y. k/ l }8 _ end;! l0 C& G; T4 Z& p) r8 Q1 D
end;; K% |" J$ x; G* T
end; -- of the method
$ W0 r8 W, e. p* V |