/* called by: entrance ctrl of the object 'track'
$ S# s* N1 P) i* T# f*/% e" R) S$ z+ b" m
is
; C4 C' j1 E5 d* \ part, GlobalDistObj, assignLObj:object;row,Lan:integer;; [8 h; b0 l5 v" @
do, s% v6 h5 X1 X/ U# h- j( U2 L( a1 q, e
Lan := rootfolder.Internal.Tools.AOLlanguage;
2 ^0 B! z1 |3 z- T4 d1 { if current = @.Destination -- else return& V- P4 {% ^. S; P7 V8 F' c' n+ W+ Y
then
0 L- W( e" x( D, x: } @.Destination := void;0 V/ F) l* p* S a: [: X
if @.occupied then
y/ ] G7 y& @" u ` part := @.cont;
" s1 {5 y1 [" p8 X/ A* X. [4 T) n- o @.transpOrder := void;# z7 {5 m: Y: I* q
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1, y& _0 H2 c9 N' d0 K G) Q
@,root.eventcontroller.simTime);
& x! v* L. i, h/ m' ]) L! G- w @.HasOrder := false;7 R- F/ d1 g" n4 k! T) r- ]; R3 h3 h
@.DrivingHome := true;6 t9 h8 \1 H3 b
rgManager.tryToStartTransOrder;
+ N3 P- l9 o1 R# Y: N if @.Destination = void0 a. |- N: b& s9 @' y" l3 r
then -- no transport order for vehicle @- V4 H* m% V5 k' U
@.Destination :=
- X$ }1 v, t4 U& r, l. z( f rgManager.nearestFreeStation(@,track.~);
+ c. o( A! j4 e L newDirection(@);
7 h1 b j4 `# P" C8 g if @.Destination /= void then
8 p+ o( s9 k' ]: i9 V, s @.Destination.NumReservation :=
5 f' p1 z J9 l" H8 R @.Destination.NumReservation + 1;
0 N0 u8 a/ P& J4 H end;
8 ]/ F% W L! X9 z% ^. E @.CurrIcon := "drivingHome";
- A5 R6 L5 f+ M: ^ @.DrivingHome := true;
7 Y6 k0 M; |4 U end;
4 W6 g4 o4 o' p else -- the vehicle @ is empty, both vehicle and part are in the same dock station2 B* I; M. h6 s1 c7 T1 p
part := @.transpOrder;/ c, K- g9 e, K( l' {
part.move(@);-- load part$ u$ e1 G- O8 K6 d% ^- m
@.CurrIcon := "load";9 i | X0 W+ z% H8 D' T2 W
GlobalDistObj := part.globDestination;
/ ]6 H0 \: _+ g; R assignLObj := rgmanager.rgAssignL;
3 H$ I, c& |8 B! z row := assignLObj.getRowNo(GlobalDistObj);
8 c7 l) o8 X0 j& ~ if Row = -1 then -- since 70
2 _4 y/ x/ Y/ R0 s if lan=1 then
1 }1 h( S1 R- P# a promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
( J, E7 M: k( T' |- l2 [& ? to_str("in der Andockstation: \"",?.~.name,"\""));* A5 g9 n* a: s) X; |0 y3 ^( N
else
* h: J" d: g: D: u/ U, I promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
& r* B9 w( O1 `* W4 T7 N to_str("in docking station: \"",?.~.name,"\""));
- h0 L8 ~' q, L. q* {7 E end;$ A" ]$ Q) P2 E7 T
else. E$ E# X0 J9 j3 p0 ~' W0 B( L
@.Destination := assignLObj[1,row];& [! [% O9 P1 x4 ]
end; 4 k9 |8 j7 B' `+ B9 e
newDirection(@);
, P Q& q! Z' C. ]* i. ]% h @.HasOrder := true;
) t/ l V# Y3 w end;7 `# r$ l8 Q* a! b: F# y, \2 Q# x8 N
end;
& S5 [3 w6 i: d7 {$ L T: Xend; -- of the method6 }0 N- I/ F+ ], A. ~
|