/* called by: entrance ctrl of the object 'track'' i- Q0 m& N% v i5 V- f, ?
*/5 c4 H3 X3 O+ B: A
is) x( ~+ X7 \! t( R: i% _; N" B
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
: P$ p3 M, |( X' ^4 Ado
2 I `5 F! {- c5 _! ^7 C/ }+ `2 W: l. D Lan := rootfolder.Internal.Tools.AOLlanguage;
$ {; p* Y) P ?; |8 M7 F( P if current = @.Destination -- else return. m& N# O6 t) H
then
" q* O+ _0 W1 o( F9 m$ c ] @.Destination := void;& R1 r7 U0 l* M# C
if @.occupied then3 T$ U S5 E+ k) ~. E) [6 f
part := @.cont;
6 `' ]1 O, w1 @+ r/ `+ i% e& { @.transpOrder := void;2 X! Z" Z0 x; a3 [, d( T! Y
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,1 L- Y* E/ U/ O u4 g5 |
@,root.eventcontroller.simTime);0 {( ~; g& Z" m3 ^9 e
@.HasOrder := false;+ Q# R3 Z' ?7 v& {. D! K) ^7 v- F
@.DrivingHome := true;+ s9 t: M, S. h, X
rgManager.tryToStartTransOrder;
6 G! R9 R$ p4 E! l if @.Destination = void
8 }+ _. c; t: O, a3 r then -- no transport order for vehicle @
0 ?4 ]5 x9 a8 ~8 r @.Destination :=- Y$ n/ W- e( \# I7 V( F
rgManager.nearestFreeStation(@,track.~);" A! i4 a0 a1 |7 R ]$ {
newDirection(@); 1 v" m3 D- p6 T O, a& e/ E
if @.Destination /= void then* }' M" r7 `2 B0 S- c. [) `
@.Destination.NumReservation :=% [( _0 F' I2 W: c2 h
@.Destination.NumReservation + 1;
& l. n M! b4 J; ? t end;
! c% m( [, Y1 h8 e4 P8 O. ~ @.CurrIcon := "drivingHome";
' Q+ J4 A3 E/ e @.DrivingHome := true;
' M( I {0 c, I( S end;3 L% y) O# X. z/ v9 s4 L5 @
else -- the vehicle @ is empty, both vehicle and part are in the same dock station) [' j0 X+ ?" _: R# d0 R9 C
part := @.transpOrder;) |& P& p9 A8 S/ M$ N1 q
part.move(@);-- load part$ W/ i- c3 M! A% o; T' V% |
@.CurrIcon := "load";
" a3 O# a4 k9 S GlobalDistObj := part.globDestination;+ r8 k' p/ A0 x$ M* N* g( e
assignLObj := rgmanager.rgAssignL;2 E" b* ?$ G4 x) F1 h+ s6 v8 |
row := assignLObj.getRowNo(GlobalDistObj);0 l+ w! n5 _% y9 `4 T
if Row = -1 then -- since 70/ s7 V- M6 ]# [ m4 ~1 r( y
if lan=1 then
( S7 ?" O! M5 g. u promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),! c0 w% b* c2 _" F2 x* D
to_str("in der Andockstation: \"",?.~.name,"\""));
% Y+ T$ U' d7 C) r8 `) {4 S else
0 y' n# r, h7 R- f" L3 H promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
6 P9 \9 e& a9 i: F, l8 R to_str("in docking station: \"",?.~.name,"\"")); : i2 }% h' k" N3 X
end;" M5 s Z8 D3 y5 u( X! d; E
else# w- X& @6 k8 Y( \7 ]1 ]$ C p- Q
@.Destination := assignLObj[1,row];
( [- r1 k2 n/ L end; ! ^9 h2 X; z4 o6 _' P e: o" Z
newDirection(@);
/ L7 i, l1 {! P: o, X% O @.HasOrder := true;7 [ N7 F" @% y% f) u9 k
end;
8 z) g2 }/ C9 ^) x S6 B9 z end;1 I8 V. p& P, @( |* y
end; -- of the method
/ s" b$ r0 O; Z |