/* called by: entrance ctrl of the object 'track'& n: V! N1 I* N$ k5 N- X
*/
6 h" c0 |8 L( @# s0 A1 Tis, ?4 r P5 y: S- O$ {
part, GlobalDistObj, assignLObj:object;row,Lan:integer;7 m/ E9 z2 @( h0 w8 H; y6 X2 c
do9 u: h- Y ~. W' G" r \
Lan := rootfolder.Internal.Tools.AOLlanguage;: D, V4 z% A. w3 p# C/ K+ q/ y: L1 \
if current = @.Destination -- else return& m5 L/ x6 u; ?
then
) m6 |1 L! b# H @.Destination := void;% I3 X# X# O% Z
if @.occupied then* } t" K7 p" R6 }& M
part := @.cont;
# h- I7 h O" c3 q. Y @.transpOrder := void;: T* D: ~ y( S6 P3 Y) @
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
, ^! U+ o" ?1 [2 O) L j @,root.eventcontroller.simTime);/ K( @4 {+ c! X. a
@.HasOrder := false;
- g# Y# c+ w8 J- R+ c( ? @.DrivingHome := true;' H$ \% m" V1 q( l1 H3 a( j
rgManager.tryToStartTransOrder;. M2 k V7 b, a7 T6 a9 w
if @.Destination = void+ v( ^+ f* o5 B2 ~
then -- no transport order for vehicle @4 C: W3 `- k$ }) A9 \# L m6 S
@.Destination :=
! j/ [4 t) ~. D1 S- U2 x rgManager.nearestFreeStation(@,track.~);
+ L0 C$ }& u1 y8 T- D; c/ V newDirection(@); 4 h4 U0 x9 t! i
if @.Destination /= void then
! [/ m& b# J0 n2 I @.Destination.NumReservation :=
" P1 m$ r, [2 S2 O8 `3 D* U @.Destination.NumReservation + 1;9 U* u, F1 K* H/ a0 w
end;$ n' J5 f! m7 ~; n m0 {5 b3 K! y5 U5 ~
@.CurrIcon := "drivingHome";2 x. Q1 T, }" U4 ]
@.DrivingHome := true;
. M3 Z" v0 N* L0 D/ E( i- W [ end;
6 Y" ?: p7 d$ j- d/ | else -- the vehicle @ is empty, both vehicle and part are in the same dock station. f w% E- P6 M3 e: M
part := @.transpOrder;
$ M' ?: o/ h$ j7 d- q* r, g4 b part.move(@);-- load part
( ~6 ~' x+ p/ [# }5 R @.CurrIcon := "load";, L0 c( {+ l* q) ]* D
GlobalDistObj := part.globDestination;& l$ G/ p5 r3 ?/ v3 E j/ W
assignLObj := rgmanager.rgAssignL;
+ D' z7 `# h) }7 D; x row := assignLObj.getRowNo(GlobalDistObj);
. w) X6 w3 X5 J/ h if Row = -1 then -- since 70
& i7 \$ @! V$ R& j if lan=1 then3 \- V1 `6 n$ {3 x1 J: e
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),/ N6 y4 q9 X7 C4 {* r
to_str("in der Andockstation: \"",?.~.name,"\""));
+ c9 L1 j7 j) [" c1 Z0 Q3 U else
" _8 M" C. I; ]1 c/ p `& O3 }7 S promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
) \- r; D S1 V; h to_str("in docking station: \"",?.~.name,"\"")); 1 }6 _4 @% Y$ J/ |6 Q3 J* |# J
end;
6 ^! R/ W- A; [/ x; G5 H# I6 ]1 m else( V* B* n3 I5 r: s7 i0 s9 {
@.Destination := assignLObj[1,row];
( @. H/ ]6 h1 B2 V end;
# B2 C) f5 C: _6 o9 G4 e newDirection(@);
5 t$ O# w% O0 a5 ?. L6 H) G; x @.HasOrder := true;
* q, R, C/ Q1 @# | end;3 d" W% X' t$ J1 L) t
end;+ x$ m/ {% e: t0 j8 m+ c
end; -- of the method
, I6 S. m+ @' O |