/* called by: entrance ctrl of the object 'track'# V/ B! l: u$ Y. L
*/
& H- h) Y3 \( o. f8 Vis
# ]+ V2 t% f4 h1 H" Z6 n; @* P! G) Z part, GlobalDistObj, assignLObj:object;row,Lan:integer;7 d2 @; k4 c6 G3 E M9 \
do
v! n% J: `. K0 o0 Y2 _2 ^6 c Lan := rootfolder.Internal.Tools.AOLlanguage;
9 @' r# ], M3 N- E% k5 x if current = @.Destination -- else return
0 r: Z2 V! Y+ x# s v0 X0 h then) y, M8 O5 p7 |5 g
@.Destination := void;+ k; }/ D* ?/ \' O1 N
if @.occupied then9 I% U* J3 v0 K; N, t$ n# d# n
part := @.cont;
4 f/ o e9 w9 u P/ g @.transpOrder := void;
* N% ]& g; O+ [$ a0 D' l$ u part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,+ A1 O) D+ n4 B) u% ]
@,root.eventcontroller.simTime); O% }' J5 f2 \0 C
@.HasOrder := false;4 M1 l& h& s/ f1 D: V9 K$ u- H
@.DrivingHome := true;0 a& `- [1 c& p3 K
rgManager.tryToStartTransOrder;8 p: F% | c+ F! G$ x1 a) U1 ]
if @.Destination = void. L( ^0 G; ^% m8 ^. o
then -- no transport order for vehicle @2 }+ N% o' U, v& Y: V
@.Destination :=+ @4 C5 Y' Y% O0 Z
rgManager.nearestFreeStation(@,track.~);
$ e7 x0 c! ~( R& L( J$ c newDirection(@); 8 [0 ?' G! l* _) t' a& F: E
if @.Destination /= void then
% `# Z( @4 k0 ^ @.Destination.NumReservation :=% A, z5 B6 h3 w4 n" f
@.Destination.NumReservation + 1;! _6 P. }6 p5 p( c
end;5 j5 Q( E1 b9 B: z" Y) S
@.CurrIcon := "drivingHome";( E" K$ M) z( t% P7 K; y& ~* n* w
@.DrivingHome := true;
, [: j+ ~# R" V Y" ? end;4 h% B) u0 X. T7 ~, b
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
& D, A6 E) J5 j& c5 Y3 s part := @.transpOrder;
% ?2 W7 u" m" t- t: _) X part.move(@);-- load part8 x$ [9 ^8 T v
@.CurrIcon := "load";4 f; J8 h0 C! k
GlobalDistObj := part.globDestination;- s: z% A! q& u0 q c, m/ t, W
assignLObj := rgmanager.rgAssignL;2 L- z. i8 J) H/ r' M2 H
row := assignLObj.getRowNo(GlobalDistObj);& x0 `4 b/ Q2 I5 ]6 ]: `
if Row = -1 then -- since 70/ c' A1 C$ w q; g- S9 l7 C
if lan=1 then2 |& J1 c) n' K& j, V+ `# [: t$ R
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
/ z+ D( E& ^4 ]$ L& K1 n to_str("in der Andockstation: \"",?.~.name,"\""));
! E3 ~# X r. D0 \ else
; _( ]2 J, t0 ]8 V6 g& p2 o8 D/ ` promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
& c5 M, M3 _, B+ _+ q& k to_str("in docking station: \"",?.~.name,"\""));
& D1 o8 K' `! k+ x+ a1 W4 ~+ c end;) b" H" s4 U3 U0 {7 d
else K2 q* r1 @5 Y- r" y
@.Destination := assignLObj[1,row];0 M! H4 G( |1 J) I$ k% p/ I
end; & B+ T5 h2 C1 J/ O V. q+ a$ d. X
newDirection(@);
9 @1 e8 Q& d L* \" K0 V% W @.HasOrder := true;
, o" {4 \6 ?1 t( L8 g end;
2 i5 `5 R- q9 Q. h7 R end;
; R- a' ]3 q. M1 U3 {1 ~end; -- of the method7 s6 @# Z4 G6 ?9 ?
|