/* called by: entrance ctrl of the object 'track'
1 h5 i( m3 V9 a3 v*/4 B4 H0 ]1 @1 _0 ?, l% O4 t
is" I! L9 f2 K r) _9 w: {
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
4 _% U& H; g' ^8 r; `# w& W2 Wdo+ K* w7 N; y p# P2 v0 Y! T8 z
Lan := rootfolder.Internal.Tools.AOLlanguage;! u" i* v2 l# Z- J$ D9 D
if current = @.Destination -- else return8 u$ e2 F/ D2 A0 q, I
then6 `! q% j$ h, b0 r
@.Destination := void;2 z- z" F! A! g% l+ W: {
if @.occupied then" Z# d N3 K O" m8 E
part := @.cont;
9 f0 d: C+ u- L) S @.transpOrder := void;
" E- E' g% J) M, v5 c part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
4 p/ t3 i7 X( L5 G6 a( c& x: N @,root.eventcontroller.simTime);: W7 K* O9 n( b% T3 P! E
@.HasOrder := false;
& r* [* m) y6 A$ l9 }8 z @.DrivingHome := true;
1 z% [; \; X9 a0 r rgManager.tryToStartTransOrder;
- }$ ~6 R. d) V4 y if @.Destination = void
7 V. N5 d, J& s6 N; I5 h then -- no transport order for vehicle @
: U* A, W& Y& F+ x9 q% i: I @.Destination :=
5 j; c! V4 l+ J- @ rgManager.nearestFreeStation(@,track.~);! `- X& P& H+ e7 m
newDirection(@);
- b7 h6 U5 R! R$ o# m if @.Destination /= void then
, O& F& P4 h( w! P @.Destination.NumReservation :=4 @3 w1 k9 `* r0 B- @) H: y
@.Destination.NumReservation + 1;7 H) m) A- k+ {# ]
end;; q+ B0 W. N% W7 x1 K0 F
@.CurrIcon := "drivingHome";
" P$ `* m; p. o+ f. E( f; |) ]8 q @.DrivingHome := true;
' g! `! @( h1 t2 O. V# y/ W end;
& `1 O. a, \$ k7 }: r4 Z" P; P+ E else -- the vehicle @ is empty, both vehicle and part are in the same dock station
; @! T3 W& E. r( V% X5 L' [# n part := @.transpOrder;
6 u) [; u! s% t. C1 M" T: ]" F part.move(@);-- load part
7 C9 k% h% H& {/ D$ t1 g: e3 U @.CurrIcon := "load";
; c( O; r C; b) D* l3 U) E D GlobalDistObj := part.globDestination;
9 C6 n- N" Y+ N assignLObj := rgmanager.rgAssignL;0 D/ e$ s, I) M' O7 ?' y% X6 T7 E
row := assignLObj.getRowNo(GlobalDistObj);- D& m6 e; j0 F- k
if Row = -1 then -- since 70
0 L0 u% w: c, W: r2 k3 T- l2 i8 ^ if lan=1 then l: w+ u$ @$ o( L4 a! T. ]
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),, w$ [$ x& Z; r
to_str("in der Andockstation: \"",?.~.name,"\""));
4 X3 W8 v( M% Z( q0 b. _; g) C else, ^* ?8 L: [2 Q5 w9 q: e8 U
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),- }( h8 ?1 V3 L [4 R; K1 S0 F! Y
to_str("in docking station: \"",?.~.name,"\"")); , v/ J5 u7 e/ }& f7 _) n
end;+ e$ b* w$ H$ Q9 J. e6 T& s9 [
else# V1 e: ~! ^. Z4 i
@.Destination := assignLObj[1,row];9 ^8 J- O9 j6 o$ Q
end; 9 |, e/ \! w& q; i. G5 I
newDirection(@);; g, t8 L! v/ d7 a( ?
@.HasOrder := true;! p6 |& B& ?- R& i4 _. U( V: w
end;9 m$ [. o1 r! y/ }: |
end;
9 C+ B L) p. G' {9 i s, }end; -- of the method! P2 K; c- o: @" O9 b/ r" F5 C
|