/* called by: entrance ctrl of the object 'track'& n2 C G7 d1 @6 ~7 b$ N" j& u5 O
*/
8 S, m0 m! ~' Cis6 @4 s$ G* I- [1 s$ k" `+ Q
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
( b& [" w2 K; `% L6 Mdo
& _5 P3 D! k* ^) S% D Lan := rootfolder.Internal.Tools.AOLlanguage;
7 P8 \3 b; {8 Z. P* Z3 F if current = @.Destination -- else return
' w- |8 k8 M% U3 h8 ?3 T9 A! i6 p then8 ~* }( |: O$ V0 D
@.Destination := void;2 t1 d3 _0 p' m/ J
if @.occupied then
* i( }0 {0 B @. x part := @.cont;
; I T& c. r1 S; m @.transpOrder := void; {2 }. s; L* o: ]5 f
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,$ m4 { f; t8 d5 ]" V4 h
@,root.eventcontroller.simTime);+ O9 l: q4 L/ m! ?3 ^+ Y% O3 f4 ^
@.HasOrder := false;! }' j; Q% J/ K6 z8 g: j2 O) q* E; a
@.DrivingHome := true;
' V2 V7 I+ ?4 q7 `+ X" D) P" o rgManager.tryToStartTransOrder;3 S w. _" l0 N+ R- n
if @.Destination = void
8 f$ z8 @$ _' v then -- no transport order for vehicle @ }) t" q9 b$ L5 q9 v/ k B% x( w3 j
@.Destination :=
, o1 o2 k% Y3 ]- i! X$ H0 ] rgManager.nearestFreeStation(@,track.~);
# d$ \9 h# E' R% v" @+ C: I2 c newDirection(@); * s, d# `1 T$ X0 ~
if @.Destination /= void then" F$ q3 \% V* _
@.Destination.NumReservation :=+ N/ I! I f& l
@.Destination.NumReservation + 1;
' m5 R7 i3 h& s% D; X) D end;) d/ f2 z8 T* V' W
@.CurrIcon := "drivingHome";
4 V+ y" t9 X: c. b% K8 T6 B! L @.DrivingHome := true;+ ]& {2 R8 Q* q$ T
end;, s5 m) ?# } k4 l. M# v
else -- the vehicle @ is empty, both vehicle and part are in the same dock station( Y: ^- S6 E/ ]% z) E
part := @.transpOrder;
. T* t0 g2 P# b+ v& Y; B# t3 d p part.move(@);-- load part
+ r6 E c4 b3 X7 t w @.CurrIcon := "load";
& x* V' C$ c0 y: |! L3 y6 n GlobalDistObj := part.globDestination;1 e! ~' t6 K8 ~7 l+ Y! L% p
assignLObj := rgmanager.rgAssignL;( }" c- Y- V) i! _8 b; m
row := assignLObj.getRowNo(GlobalDistObj);. ?0 ~/ ^+ E! M5 k+ O7 n1 Z' o
if Row = -1 then -- since 70
7 D+ i3 \2 \3 T4 D if lan=1 then
" |* U k: Y" l. q5 x ^ promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
, ~7 j+ m1 ?' x- I2 n, p F( @/ x% q4 r to_str("in der Andockstation: \"",?.~.name,"\""));
7 @) Z% l$ ]5 k( }: ?5 S9 q else
8 C/ E4 m, A3 a& T& l/ C promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
7 Z0 `, q. v% H9 P0 s% o to_str("in docking station: \"",?.~.name,"\"")); % R& D4 X, f3 L; k/ n
end;" c+ ^! {* g& m' A
else
6 o" q! Z, ^& v% x4 C6 ~ @.Destination := assignLObj[1,row];+ f( C2 f ?' V* t0 \
end;
6 F5 O; p2 ^5 F$ r& c( y. Z# z7 } newDirection(@);
1 X P" j; b6 B @.HasOrder := true;& M6 N; K$ {2 c% _* ^
end;
7 W* E& Q! ]- g6 _ end;
/ [, i* j) i5 k( [end; -- of the method
) w O. ]- f+ Y5 s" X f/ T' o |