/* called by: entrance ctrl of the object 'track'
7 p2 Z0 l; O$ A& m7 b8 _' m2 W*/
' @. X/ t% k- uis. ?& B( V) r& \ Z
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
+ _0 R5 z1 f: _5 C) pdo9 G( R/ `( x, Y; v
Lan := rootfolder.Internal.Tools.AOLlanguage;( q) l! y. o2 l( z$ w" R: H! |
if current = @.Destination -- else return
& S$ q* |7 l, |5 J. C then
' I9 {9 e: b5 ^4 J* a4 i2 d @.Destination := void;5 v) n: P! K' Z6 _+ r
if @.occupied then
3 y4 O# h3 g) \% E; p part := @.cont;' g0 V6 l/ J4 N5 J b+ B) g
@.transpOrder := void;, k# X+ u0 V" K" |$ o* v
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,8 Y: A6 [& ?" |. J5 S8 T/ `0 q& n
@,root.eventcontroller.simTime);3 ]: K! z8 M: k4 H% `6 u9 D
@.HasOrder := false;
) Q5 U# W# Y: e1 `4 J @.DrivingHome := true;
9 | V3 ?3 U+ V* a: O rgManager.tryToStartTransOrder;4 S2 ^0 K7 }' W
if @.Destination = void, h7 D7 C6 y) L
then -- no transport order for vehicle @+ H/ ?/ \# o# ` m
@.Destination :=" W% J# ?; g, T; j
rgManager.nearestFreeStation(@,track.~);
v( o6 n0 }8 x newDirection(@);
8 Z8 G x5 [- z! L+ R9 e2 G# w if @.Destination /= void then
6 e- M# i3 b+ a2 O( o @.Destination.NumReservation :=
6 k; }4 F. d c* A) z" \) } @.Destination.NumReservation + 1;
: H( j6 t4 i* k end;4 K6 p$ x; }4 R- Y5 G
@.CurrIcon := "drivingHome";( X5 u! h; Z6 N) ^- j I& m6 s
@.DrivingHome := true;
3 a; v) T. _- D8 z* {8 n. { end;7 t+ ]2 P) k: K7 Y. g
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
+ ^: [' W" E+ i! A1 i6 r5 O, i part := @.transpOrder;5 c( _ I+ L: U
part.move(@);-- load part2 T8 O% q# N; v% T$ q6 ?0 Q# Y0 L
@.CurrIcon := "load";$ N; q h" t- v8 N* l
GlobalDistObj := part.globDestination;
! e3 T. }8 {* N; N3 l5 D j5 _% _2 n assignLObj := rgmanager.rgAssignL;
& k* \& |( e; c) M row := assignLObj.getRowNo(GlobalDistObj);
8 g" |- ~$ |0 B3 `$ @+ j if Row = -1 then -- since 70
% y8 r% N( Y, R" p- L, g4 Z2 x' _1 N. O if lan=1 then0 U- r4 M0 j b8 p0 o" Z7 U
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),8 X8 c5 L8 F: R, m4 r3 |
to_str("in der Andockstation: \"",?.~.name,"\""));
E- @) R: `/ H T9 J else# D/ P$ A$ O1 J4 _' m1 u3 M
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
: ~: z3 b9 m4 [ to_str("in docking station: \"",?.~.name,"\""));
9 b' w9 R. r$ ?( F+ j! e end;
1 b( t( w, ~3 s0 e else5 }) |1 F8 A" F/ h o; n( c
@.Destination := assignLObj[1,row];
/ L0 w- v* Q: ]8 i8 l2 |, h. X end;
! V% ^1 _' ^# s, b# f newDirection(@);& J0 J* z* b& h/ Z# j! z; V
@.HasOrder := true;
`1 r' w+ ^: G+ j+ i1 Y0 d6 P+ d" y0 ` end;8 w1 K7 D. O: H$ n" a# S4 F% S
end;
" H/ T8 N( u5 |( O$ L& aend; -- of the method |# C4 x4 v$ l, B+ |
|