/* called by: entrance ctrl of the object 'track'; x! W& b+ j1 |8 d% d
*/# s) i$ g5 `8 D- _; U7 @+ ?
is* s8 u( h7 f& g, ], W6 g
part, GlobalDistObj, assignLObj:object;row,Lan:integer;$ F5 r$ H: x0 s& c( `0 K
do; [. ~2 k' y$ t& _3 x( q
Lan := rootfolder.Internal.Tools.AOLlanguage;
2 r$ X, \6 V8 J2 r1 y if current = @.Destination -- else return: s5 q! P& O8 I
then
! R2 n; w5 Z: a! C* Y9 U( k) p( i @.Destination := void; i- G m, z' W! _- x
if @.occupied then7 v5 }4 P6 U2 o5 f
part := @.cont;
; D, r0 n# a+ x2 a6 b. y @.transpOrder := void;
" m7 v' l) ?( e! p part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
j: G. I H3 P) F4 ~ U" k% u @,root.eventcontroller.simTime);
. T( X$ ]# [, V% o4 N @.HasOrder := false;- f" c1 z& D a+ V" R
@.DrivingHome := true;( X! n h6 X/ v! v* D0 B
rgManager.tryToStartTransOrder;0 y' u3 Q$ J. e% F' n4 a: r
if @.Destination = void
4 s; s* ~$ p9 E1 y% h8 I then -- no transport order for vehicle @
l+ `2 t" N; M h# @2 \ @.Destination :=6 `" v: g/ {. _& R; K
rgManager.nearestFreeStation(@,track.~);
+ w- q4 B$ }% }- R2 l5 q0 e newDirection(@);
* t( ~- X, N/ [+ N$ c; V if @.Destination /= void then3 F; ~9 u+ x& a: O, m- `
@.Destination.NumReservation :=& i4 N/ _# D* n+ T( Y
@.Destination.NumReservation + 1;' c% \2 M& o# Y0 a
end;
# s- B, ?1 ?+ q% c @.CurrIcon := "drivingHome";
o( o1 ]4 E, t @.DrivingHome := true;
6 n0 r7 w4 p' h3 B+ {: G end;1 H0 Q$ x& m" G+ j% b6 F
else -- the vehicle @ is empty, both vehicle and part are in the same dock station6 I# T! u* a- { E
part := @.transpOrder;& T5 Q7 _" F }+ V2 A; e2 m
part.move(@);-- load part
; E- M( [, `# w0 G @.CurrIcon := "load";
. p9 `: X% a2 v GlobalDistObj := part.globDestination;: F& D. x: d1 b, J+ }$ x. W
assignLObj := rgmanager.rgAssignL;* l% z+ ]7 v- X
row := assignLObj.getRowNo(GlobalDistObj);% w0 n1 Y( g2 s2 `
if Row = -1 then -- since 70
6 D2 e3 M2 @8 k7 t if lan=1 then
5 _7 l) ~2 c8 G9 v) |/ t0 t promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),- Y7 O5 C' ^3 e( i
to_str("in der Andockstation: \"",?.~.name,"\""));
' w) i) t' t4 U else$ ?8 d+ m' ~" S+ t+ ]) Z1 i' I9 S
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),/ y$ H! y# m& T- J7 N$ G6 Q3 N
to_str("in docking station: \"",?.~.name,"\""));
9 ^7 d* k4 D+ C: h* V8 s end;9 U* J1 v: R: w, x3 t% H' q6 F& |
else
R( F$ F6 k5 S$ z. v" f @.Destination := assignLObj[1,row];8 C& D& L; Z2 K6 u/ B, c" r8 b8 y& Y
end; , Q/ z" i) O6 D$ `8 g9 ?+ }8 S
newDirection(@);
0 \8 W1 x3 c% g7 |$ o' ?+ F @.HasOrder := true;
i2 U+ K% C9 x1 t end;
3 M8 F6 e7 g) ?6 d end;
1 K4 L F, ?1 v; T. E- wend; -- of the method
9 g' f8 f; h3 S8 |; M |