/* called by: entrance ctrl of the object 'track'7 i; ]; A7 E7 o% i4 C
*/
' |* @- `8 q# E* mis
) T. i0 [3 [2 `8 u part, GlobalDistObj, assignLObj:object;row,Lan:integer;
& M8 I8 \4 h% \4 D Ldo3 c3 ^' s0 Q, K; u+ q& V; i* O8 ?( L& M
Lan := rootfolder.Internal.Tools.AOLlanguage;! {& l' d6 g+ ]3 K
if current = @.Destination -- else return
' ?! X- b: @1 ^: X7 J3 a2 j) G) C" m then2 H# f! b1 H/ E! H2 D& F
@.Destination := void;
1 s: B: d6 c/ ]* F0 A if @.occupied then
! d/ }3 T L' u! o: Z' ?" Y part := @.cont;3 S4 @8 B: C! c
@.transpOrder := void;
0 |4 X) n$ T/ k6 G* v part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
5 A6 y9 o' q# R3 W @,root.eventcontroller.simTime);
; D& b8 ~* _3 F4 H @.HasOrder := false;
U8 R* a0 ]& M. ?- P. P e @.DrivingHome := true;' _ o9 u* D7 K5 T7 j) v# g/ g3 ?
rgManager.tryToStartTransOrder;+ v# B/ `0 k, y: x" o5 f1 k
if @.Destination = void
' P6 l6 n9 a. K: _7 t: Z. j then -- no transport order for vehicle @7 c, e" R; l$ K7 F; @
@.Destination :=) C9 s0 E3 v# e: K5 |% \/ |
rgManager.nearestFreeStation(@,track.~);; z+ t" C+ `- p' W# B
newDirection(@);
2 i& q, P: P t' e if @.Destination /= void then: t% ]+ H9 e, U5 b+ I
@.Destination.NumReservation :=/ i* [. Y7 P/ Q4 t
@.Destination.NumReservation + 1;* i8 T7 o& \! w: V
end;
1 L( [+ f; P7 l7 Z: X @.CurrIcon := "drivingHome";
7 R. W- z9 T( D/ N3 l) ]8 V2 ~8 J @.DrivingHome := true;
, D, x0 Q. x& Z9 [( u; [* H; D end;& ^+ ~ b2 Z6 U* Z9 t! Z6 M- p
else -- the vehicle @ is empty, both vehicle and part are in the same dock station, L" k" _5 w( e, a1 y9 w6 U
part := @.transpOrder;9 [1 t; Y4 H! ^( w' X' P
part.move(@);-- load part" c* @$ |1 J% P; k2 Q# B$ D7 R# g
@.CurrIcon := "load";# z* G/ ~2 e b" @5 @# ~9 F
GlobalDistObj := part.globDestination;' N: p# c4 ~% c$ e2 V7 m
assignLObj := rgmanager.rgAssignL;
0 k2 o. m+ x+ Y- } row := assignLObj.getRowNo(GlobalDistObj);
; D: H0 e: u3 r5 E if Row = -1 then -- since 70
% |4 ~* e5 T$ n7 Y4 l- l6 R" L if lan=1 then
& k( b% {. F O: z promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
0 ~& v. P% r3 j& h to_str("in der Andockstation: \"",?.~.name,"\""));- C: x U f3 G9 v5 X0 g- I% Z4 m3 U
else
( k2 C, w( V' {- k* n s promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),8 {5 z2 |, |4 I3 I8 `+ e
to_str("in docking station: \"",?.~.name,"\"")); # i7 J, M8 R" g$ e/ s9 b0 y6 B
end;0 B; z5 s6 g1 @0 r& a
else! }1 M: C% d5 f9 c8 O0 D$ h
@.Destination := assignLObj[1,row];( N" K8 _2 K1 `, [* \9 E
end; 8 R- f1 t- l! w$ F: K' l
newDirection(@);
( I( e) V! X1 t: D' k% P- S/ V& S @.HasOrder := true;
; x% V9 g& K. A: }4 m end;, k+ s7 L1 t: U* ^( q! L* C& Q
end;4 v. E2 n; B' Q: | a
end; -- of the method
& W/ D: l) `* B+ A# x7 U$ e |