/* called by: entrance ctrl of the object 'track'! B: o% [$ V3 W3 `4 \
*/
1 C$ A& @% |0 c( l6 ois" p+ Z3 I0 M C0 |0 W
part, GlobalDistObj, assignLObj:object;row,Lan:integer;) [+ d$ @; v3 U+ B; [$ @
do* _- z. B3 U; ]) e7 ]
Lan := rootfolder.Internal.Tools.AOLlanguage;
9 k& _1 x% u$ d, n if current = @.Destination -- else return
+ R s2 B) n( f. r+ I9 y1 z7 W- ~ then+ h# D9 M# V" m9 r d4 N
@.Destination := void;
# r7 i% g& E5 H% M% @* N if @.occupied then5 Q5 M; [8 V9 k: ?4 t* k( r7 _
part := @.cont;' b6 z* [/ _) U9 c. g+ {# w
@.transpOrder := void;
: H% y, F1 @9 H- Q: f1 v" w% Z part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
. A2 j7 E- S) H4 X @,root.eventcontroller.simTime);
2 |* F& b! D# n o! |, U @.HasOrder := false;
* T& E8 B F r6 r" G* Q @.DrivingHome := true;# o2 G+ w1 g! B# {1 W3 H, V
rgManager.tryToStartTransOrder;
. {& |) g0 b4 b0 n9 x if @.Destination = void# B( ]. T: f( R
then -- no transport order for vehicle @+ z7 `6 [/ Y/ _$ g, V
@.Destination :=
, I1 ~! { T7 R6 d. b) m( i5 E rgManager.nearestFreeStation(@,track.~);
5 s/ N9 z4 I8 h. |( r6 P newDirection(@); " v5 Q- q5 y1 x8 b
if @.Destination /= void then" _$ d$ M4 P& ~( c; a' d: k; c) o
@.Destination.NumReservation :=
, Q/ l" E. c; X6 h5 D5 \ @.Destination.NumReservation + 1;' k4 {2 z, K3 f
end;
. h: y7 h9 A- C: m! Y6 N6 z @.CurrIcon := "drivingHome";( j- t: O2 X$ w9 ?( r
@.DrivingHome := true;
9 K' ^8 C. P6 w$ ^9 Z0 K4 O5 l end;
0 {; F/ ]8 h [ z* n else -- the vehicle @ is empty, both vehicle and part are in the same dock station# y/ @4 X. B, s" n+ H0 c
part := @.transpOrder;
J( G0 N' H$ T part.move(@);-- load part
) x% ?7 D0 n" h$ |- U @.CurrIcon := "load";
# [- Q# |- ]' s8 W GlobalDistObj := part.globDestination;; r% \1 T3 J4 Q3 L# ~( T* p
assignLObj := rgmanager.rgAssignL;7 l+ h: h8 Q( l
row := assignLObj.getRowNo(GlobalDistObj);4 l# l ^- j+ Q3 Y; B1 g2 `
if Row = -1 then -- since 70' A9 o8 q2 A7 Z' M
if lan=1 then
4 ] F- F! l% j7 P promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
* O* b/ N5 _2 w( T. N1 D0 E. j to_str("in der Andockstation: \"",?.~.name,"\""));; \% Z% R* ]7 o4 W
else
: L3 o& E/ C ]" ]* D promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),* ?5 T, d2 r+ u
to_str("in docking station: \"",?.~.name,"\"")); & Y# l8 i5 V `+ m& o2 k
end;& u2 ?2 ]# M6 L3 v
else# `0 a1 |" C) @$ v% S2 v; l" w
@.Destination := assignLObj[1,row];
3 \! T$ k5 V0 H! Z6 g& z end;
( _. o. u C" L4 G newDirection(@);
$ m& C( W/ P6 H. w9 L @.HasOrder := true;4 t" ^+ E1 N+ }5 D: W4 W& N
end;
+ j3 ]" l; R% H6 F$ _& R" i end;
) C% C8 `5 i3 R' Q. cend; -- of the method, b, e8 w2 s3 [9 E4 {8 p
|