/* called by: entrance ctrl of the object 'track'
: l. X' {) X. j0 G*/9 Q; l0 i: [& N/ M) B
is4 }8 c" u# b6 A; j
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
5 n4 Q7 H7 n: W) _0 t, w8 ddo$ q5 G5 \, P) N8 [' J5 Y7 d
Lan := rootfolder.Internal.Tools.AOLlanguage;/ c4 [; ?, W, G& [4 ]& E
if current = @.Destination -- else return4 s% |1 p' o. z+ d: }! [% \, f
then5 T+ \3 Q8 H$ _' b& I: Z
@.Destination := void;
& a( z& F- _5 T, i1 [& z if @.occupied then
( \+ V* H9 T/ i @+ i( y b3 @ part := @.cont;
; c( S: l p% f7 r4 }& S7 e @.transpOrder := void;
C+ S4 d3 B/ w7 b2 E: X part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
: J, c+ S) L D" d1 ~. I& g3 B @,root.eventcontroller.simTime);. H# b/ l/ K5 y" V* _5 M
@.HasOrder := false;
. C* H% N. n9 ~( Q) U1 `: u @.DrivingHome := true;
1 W2 @5 m$ C1 Z! ~+ [8 q C rgManager.tryToStartTransOrder;
- `5 ?7 O) h, A: @6 } if @.Destination = void
. u5 r& G* f" \1 L3 L then -- no transport order for vehicle @) n C! `( U8 T2 J, Y
@.Destination :=7 U, M' W% X s9 N) E
rgManager.nearestFreeStation(@,track.~);3 x! `/ h/ V& V, c& c7 V+ }
newDirection(@);
$ P# a( u3 |8 j5 \0 h5 l+ f7 G if @.Destination /= void then
, v! j4 j! J7 a9 k! c# S @.Destination.NumReservation := S' h% |: @* }& E( q2 W
@.Destination.NumReservation + 1;
, O9 Q- o( Z, s7 m: h& g end;) S& M( R; @% K! K
@.CurrIcon := "drivingHome";
+ y8 |. G0 K/ D& y @.DrivingHome := true;
1 D6 G" P7 q* {, g- l0 X& b$ p end;
- _. K' G' A3 M; ]6 w& L, p5 _ else -- the vehicle @ is empty, both vehicle and part are in the same dock station
I4 U" c* z% A. a Q! U part := @.transpOrder;
4 e0 m9 v6 r; I* m part.move(@);-- load part# [2 A1 m2 w1 r# u1 u% G) W
@.CurrIcon := "load";
1 ~; J+ U! r6 d( N. `5 M+ m1 f GlobalDistObj := part.globDestination;
' { S" B8 Y. _' n9 t% K% x& D* F assignLObj := rgmanager.rgAssignL;! [2 S3 r8 a o! j
row := assignLObj.getRowNo(GlobalDistObj);
+ {3 | W3 a* [( g2 K if Row = -1 then -- since 70
3 X: `3 K3 C* r% W if lan=1 then
$ t) n( Z$ z7 u7 |5 h promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),- }, H7 @' Z5 T
to_str("in der Andockstation: \"",?.~.name,"\""));' ~8 i+ n% G6 f* n7 x- L; V
else, G( D7 j, Q/ n1 |! B
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),0 K0 i" \2 v& V7 `% |5 }3 Y \: ] l
to_str("in docking station: \"",?.~.name,"\""));
& W- J4 F# p& ` end;
1 `; e Z; D7 H# u% K4 [& I. U; d else7 `" l* C( W4 N) m
@.Destination := assignLObj[1,row];
' X* g0 y, m. w! J. s7 Y end;
% P" ?2 w0 F) A" M newDirection(@);
% c# i: u! b( k @.HasOrder := true;) x2 ^, C, S% w% e# U
end;
7 Y0 W+ v) s b# a end;
7 x$ U& l* x/ b3 R4 p# K, \" ]end; -- of the method
# b/ _$ R2 r" F0 |% Y7 P7 s4 p |