/* called by: entrance ctrl of the object 'track'
: f; e$ e8 V! h1 {7 U s9 h*/
3 H g8 h5 q2 c/ \& s, Yis
! r$ }' K$ {0 O3 x X$ X+ V! t part, GlobalDistObj, assignLObj:object;row,Lan:integer;( g8 _2 D, o$ M( j+ \, h
do. G: T7 ?; b4 K# r; K+ l5 Z
Lan := rootfolder.Internal.Tools.AOLlanguage;
) ? F9 u4 }% Z2 j! e! y if current = @.Destination -- else return
& T0 P( a+ r% ^7 P# @* [ then
( W5 e% u1 O9 G- J' [" I4 @ @.Destination := void;4 W* A" J1 X: }$ Q: `. |3 b) u
if @.occupied then0 h! Q9 L. Z. V9 K4 [. ]2 D4 F
part := @.cont;
, }; n: c- x' h' i+ S X- E0 b @.transpOrder := void;
7 n4 R8 O, r- w" O7 j part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
& T, D2 m1 B ?0 X @,root.eventcontroller.simTime);
, Z0 @9 a$ E; c$ `" _+ N @.HasOrder := false;
) E( F$ N9 e$ h$ e+ x8 E @.DrivingHome := true;! v% O0 u4 X/ Y; C9 `2 p% A
rgManager.tryToStartTransOrder;7 P# H0 [ c" O! U \
if @.Destination = void
9 y% ]4 T9 \) R7 u then -- no transport order for vehicle @
4 d7 g1 [2 s5 s- @3 S z! ]6 } @.Destination :=/ C2 A/ x1 y4 j8 T
rgManager.nearestFreeStation(@,track.~);
3 o1 t3 {9 | q3 @* W$ H8 I newDirection(@); ! Y9 e1 j) l) `& c
if @.Destination /= void then \: N; U5 ^: L" V
@.Destination.NumReservation :=/ ?/ o$ S- ]$ D+ Y0 O
@.Destination.NumReservation + 1;
2 s' N. _2 C3 ]! g6 x+ ?, q end;
7 u9 g4 ~7 S/ ]- w/ C @.CurrIcon := "drivingHome";
~; [+ H; B; M& s) w3 } @.DrivingHome := true;# N% Z2 L. k% T, s- l* {9 X
end;
3 z8 m1 I- X: h0 V; W ` else -- the vehicle @ is empty, both vehicle and part are in the same dock station
V" ^7 [: \7 t, ?# { part := @.transpOrder;7 D" A5 m; i k2 J1 k1 K1 ~9 `
part.move(@);-- load part
# @, `3 z& b$ g @.CurrIcon := "load";
; |+ c: m. c- u7 r GlobalDistObj := part.globDestination;
. `. h4 p1 {) Q# ~$ h3 K% q assignLObj := rgmanager.rgAssignL;
+ \/ J4 v0 S8 Z3 G1 T row := assignLObj.getRowNo(GlobalDistObj);% T2 m# t7 O6 o4 d
if Row = -1 then -- since 705 B+ G! Y1 y4 m* A0 v0 ~; i( [
if lan=1 then
$ w' e5 h2 d- h& C7 K8 L promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
- _3 _- c% Z0 P: x5 h to_str("in der Andockstation: \"",?.~.name,"\""));
+ U' C- T4 e* a5 {) D6 D else
" B6 h& n& e% s3 o! ~: O promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
7 \6 u$ Q1 E8 q8 s Y( j0 h to_str("in docking station: \"",?.~.name,"\""));
0 @$ C0 \4 ~6 T/ m1 J end;
' ?) Z4 l L- S' S% }2 I else
. L% K' N. h6 p2 h# p% l K8 N @.Destination := assignLObj[1,row];% W1 |& r/ x; v
end; 2 ~7 V& I! |! Z
newDirection(@);3 B! `5 `* h( D& Z
@.HasOrder := true;
) P0 D6 Y0 B" C) ` end;
( b8 @* t- i7 p0 f end;
6 h* {% z& E7 {# Y# {end; -- of the method
( f8 b+ o& y# M2 l6 ? |