/* called by: entrance ctrl of the object 'track'2 U4 H$ Y! @( {! y7 r1 O0 d
*/
. F' G: L+ ^6 z/ o2 ]; j {5 Qis
0 [5 G% o8 i, Q2 _ part, GlobalDistObj, assignLObj:object;row,Lan:integer;/ I7 c8 _: \9 v v
do, F6 Z, H2 I1 |
Lan := rootfolder.Internal.Tools.AOLlanguage;
$ ~! T6 b X4 z- w4 F if current = @.Destination -- else return
+ H/ w) _$ y7 x9 |" ` then3 A0 J( }- n' A' S& y$ o
@.Destination := void;
9 W( o, Y! F5 T. d" i if @.occupied then
+ C; D2 P8 Q( q part := @.cont;! f+ ^5 ?/ B5 y
@.transpOrder := void;
7 w# C2 @, _2 R- [# U part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,5 B% u% w6 p4 Y, J0 y( J- ]
@,root.eventcontroller.simTime);) r. e1 L' I! {' [$ W/ L/ G3 f3 P% R' ~
@.HasOrder := false;- [# }6 y. I/ h0 l+ x+ U
@.DrivingHome := true;" {* o0 [2 a0 E+ Z8 D
rgManager.tryToStartTransOrder;
B/ t4 M) s: E" [1 o6 S if @.Destination = void6 k- J' _, D0 O J$ I, D8 E1 ?) z* P
then -- no transport order for vehicle @. c0 ]8 {9 t( @2 V# S+ R) n
@.Destination :=7 j3 G2 y' M0 n
rgManager.nearestFreeStation(@,track.~);
) A( o! Z6 C) J% r5 P newDirection(@);
$ u, |8 X: c5 ~, V8 f1 T2 | if @.Destination /= void then3 n1 R7 t, f, c7 l" ^
@.Destination.NumReservation := a' ]& t/ z5 _; D# G1 p
@.Destination.NumReservation + 1;8 b2 ?6 j+ N) Q; h. Y4 O0 b. J7 Q
end;
4 [1 X8 a T" ]8 ~ @.CurrIcon := "drivingHome";" Z8 p4 {6 ^8 c0 L/ r, e# L
@.DrivingHome := true;( J. ~2 j& R! ]1 m& o$ U
end;
+ ~! u0 v7 L. _2 m% [& \ else -- the vehicle @ is empty, both vehicle and part are in the same dock station
$ X: @. T+ b, [1 R7 S1 X part := @.transpOrder;
9 l' D F/ O1 P: y# I' E+ U part.move(@);-- load part1 g: K( M/ ~7 ~, F. A
@.CurrIcon := "load";& I9 c4 }4 i7 ^4 _+ ^+ k
GlobalDistObj := part.globDestination;
3 F+ b! j8 D. e assignLObj := rgmanager.rgAssignL;; R- Z" A" S! L& x
row := assignLObj.getRowNo(GlobalDistObj);
" U7 W) L" f! i, b6 y if Row = -1 then -- since 70
/ ^1 H4 m2 i0 s2 ?- m8 ?# ~; K" c" W* o* ~ if lan=1 then
% [) U0 c: n8 i9 \1 @% \# M0 p1 m promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),1 D4 Z$ [- n# S4 ]8 Z
to_str("in der Andockstation: \"",?.~.name,"\""));
0 O9 L6 m" y& ?& R l \, _' u else1 G' m( e: i5 E$ F% E
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),' x' S/ S. X; @* W3 Z" Y
to_str("in docking station: \"",?.~.name,"\""));
1 z/ Z G0 L; U3 V: L4 V! a end;
1 M! x. N1 @! j( b else. i! ~' K v4 |. U H
@.Destination := assignLObj[1,row];
1 X6 t: _7 i' J' i/ J- g end;
Y( ~# Y$ V' n9 }3 t x% K+ V newDirection(@); ~% U7 L! N1 V }
@.HasOrder := true;1 z d! k T- c0 W; Q" ~
end;7 X8 C' p$ `- m0 [' s7 ]' _
end;
2 @4 s9 w' C% g- K A7 s& p9 Aend; -- of the method
- k7 x. \7 ~6 ?2 G, H+ j |