/* called by: entrance ctrl of the object 'track'3 M) g; t# K3 j/ O( U i' H8 {
*/" ]" \: R: W# X5 m5 o; ^3 E! K
is
, d3 v8 v5 |+ I k- r( l$ v part, GlobalDistObj, assignLObj:object;row,Lan:integer;4 f7 ]/ c" o: M E" A1 [" a) O
do
. P* s* y6 F: D% L/ D" b5 O4 U Lan := rootfolder.Internal.Tools.AOLlanguage;. C+ ]' Y! D5 \1 d
if current = @.Destination -- else return
; s2 D: g& C" V. T4 U then
: _; L% k+ y/ ]/ {7 }8 s' m @.Destination := void;
) P/ Q% E, D7 K1 w: j if @.occupied then& H' f7 i# k6 ~" A
part := @.cont;
1 e- T3 @ p, F( i% m, ] @.transpOrder := void;
! `1 F0 B M% B, |8 ^- v5 K part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,2 _3 K( f4 _5 H/ k
@,root.eventcontroller.simTime);! l3 i+ ~5 j* r, t
@.HasOrder := false;
2 h2 _5 a: w* O4 T2 y8 w, \$ Y @.DrivingHome := true;7 j3 y# Z! M4 c, ~
rgManager.tryToStartTransOrder;
$ w& _7 r8 V) a) d if @.Destination = void: ^. X @) m. d
then -- no transport order for vehicle @
0 J, Z. X' B' |/ q+ ^# l @.Destination :=
, {9 r$ X3 s a% N `5 p$ g rgManager.nearestFreeStation(@,track.~);
4 C9 `/ `- \) ]( y; }3 }7 l+ i newDirection(@);
T6 y5 ]; d- h; Q& ~& C if @.Destination /= void then/ f/ n4 T- {! ]0 l
@.Destination.NumReservation :=( D' d" Q" t" X# R0 S% L9 l
@.Destination.NumReservation + 1;) v+ f+ R( a$ b
end;
3 {! ` ^3 K" t7 y9 e0 e, b1 j; | @.CurrIcon := "drivingHome";
) P& N: t) |: J2 w& d9 X# V @.DrivingHome := true;9 t$ l4 q' u6 u# F' B# v, Y
end; j0 n: g0 I1 M9 ?0 s
else -- the vehicle @ is empty, both vehicle and part are in the same dock station3 u# w. k4 N z5 R1 p5 U; A
part := @.transpOrder;
' A$ N# M; h; Q% k' b part.move(@);-- load part
6 l0 Y: X% }" R$ ~- Y$ O @.CurrIcon := "load";; B* ^! O- w7 J5 `1 m1 I4 l9 c" P( r
GlobalDistObj := part.globDestination;' Z- X" ]! |" g1 Y1 l4 i
assignLObj := rgmanager.rgAssignL;
6 W$ n. s$ }0 B$ |+ l row := assignLObj.getRowNo(GlobalDistObj);
+ g5 d2 o# a0 \ if Row = -1 then -- since 70
7 @% I4 o, f* i1 W5 U& Q4 ] if lan=1 then& k5 E- r" Y, u1 M- ?6 X
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),# J1 b% L5 U0 u4 I- }* I6 ]
to_str("in der Andockstation: \"",?.~.name,"\""));& S$ W; c9 Q5 _8 _- T( r. K
else ~& f- h( V: S+ C1 b
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
O, V$ e$ q0 n' `2 u- p- P$ {' W to_str("in docking station: \"",?.~.name,"\""));
|. _) H E( v" O7 I2 P$ \' @# C end;2 f. c1 Y+ J/ C+ v* B5 {& ?
else
7 t# X+ j3 H G @.Destination := assignLObj[1,row];+ s" M% ]; Z$ h
end;
6 s+ n" e( N9 a/ m newDirection(@);
* K+ s; ^8 {& T @.HasOrder := true;
; e' Q8 _1 B A4 }7 l end;
: [0 a' \; L* u+ S( v end;
3 N# }8 w( H* Q6 oend; -- of the method" g5 H0 a1 e3 q( h! S
|