/* called by: entrance ctrl of the object 'track'* |- \2 m% H. _% F$ ?( l
*/
5 U! P: ^4 _- _! H, [1 V$ cis8 U+ \3 d8 { ~) E4 s0 c
part, GlobalDistObj, assignLObj:object;row,Lan:integer;# O3 d9 a$ X t' ?
do
+ ^* ^- r& L( A Lan := rootfolder.Internal.Tools.AOLlanguage;
) |4 M$ t8 _1 @, C3 H6 ~% }: D0 k if current = @.Destination -- else return
0 p* K* C- N: [+ U$ B0 { then" G8 l6 Q6 c7 Y" [ z. A7 j
@.Destination := void;
9 g, A" a" L: y, m3 U3 m if @.occupied then
; \7 D; P( ]% x; o8 G part := @.cont;
. x3 c! o$ I$ r3 o @.transpOrder := void;
' {2 W6 U: `" ] part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,+ R9 c1 c) T0 n% }8 G) u
@,root.eventcontroller.simTime);' J- [ P# @/ q; [+ n& A" `2 V/ i8 i
@.HasOrder := false;1 Q& T: L: e2 J* U
@.DrivingHome := true;! \# Z* L/ n' O
rgManager.tryToStartTransOrder;
' R+ D( c) T6 @ if @.Destination = void' R' t) z' X, S7 [( F( G
then -- no transport order for vehicle @
0 ^, s1 T" Y& G) l @.Destination :=7 J+ U6 A* Q. t0 E
rgManager.nearestFreeStation(@,track.~);, B* Q5 p. d. x8 C) P4 k
newDirection(@);
1 e5 {% i3 N- g2 [- j' f) ~ if @.Destination /= void then, L( m ?( U% g5 P8 d
@.Destination.NumReservation :=
9 h3 G: a5 N6 C! O @.Destination.NumReservation + 1;2 W9 D) g8 v4 t. Q
end;8 A2 J$ }( b- n! }
@.CurrIcon := "drivingHome";" M3 @ T- y9 v p3 \5 H& m6 i2 S' S
@.DrivingHome := true;8 D* f3 x7 z* r3 k
end;
/ T3 ^/ ^& t- l0 d/ E" \ Y4 p else -- the vehicle @ is empty, both vehicle and part are in the same dock station% T6 d% N* ~" D+ D1 B. x- Z
part := @.transpOrder;0 c( t& v8 D: Z" h( H6 G
part.move(@);-- load part
# A S, j) O1 L [- g5 a+ e; C0 r @.CurrIcon := "load";& G1 c- \. \7 v9 A$ j3 t
GlobalDistObj := part.globDestination;8 J: P5 O) c( A) K T
assignLObj := rgmanager.rgAssignL; @7 R2 L' L& ] S+ L& m
row := assignLObj.getRowNo(GlobalDistObj);& a: s5 A. M. n; _) G
if Row = -1 then -- since 70
0 U# {5 I T, u- R) ` if lan=1 then
: J/ U# W ~- H- L5 y6 b5 s/ H0 P promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),& e& f$ `% A5 {& d6 L! m7 h8 y
to_str("in der Andockstation: \"",?.~.name,"\""));
3 m0 |) h" q. N4 ^ else0 C4 p I* r4 a* a# V
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\"")," W2 k/ \* w) c; R2 j; K" A
to_str("in docking station: \"",?.~.name,"\"")); * }7 U; R/ A: x, S3 Z
end;
5 h" o$ w9 m8 O0 z else+ s. {& W, i# W! Y! j
@.Destination := assignLObj[1,row];
' w) Z8 W9 h! e4 [ end; # ^. X% h2 |2 Z9 \
newDirection(@);
. m2 p. H8 t: X1 z0 u9 m @.HasOrder := true;
3 E5 Z1 k+ n9 z. ]+ I- A end;
1 \3 \3 c% }7 R, V: G end;& C7 P; `' z* j, b( W
end; -- of the method: r0 x! q6 g% l( N6 `
|