/* called by: entrance ctrl of the object 'track'
5 Z8 k+ G' v1 T$ q( ?' ^; J*/& B a8 Y8 R$ S' p0 ~9 n8 D5 b: }
is, l) O9 i V% x Z* ?5 `
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
! w: c' x3 n! C. {( }' M# rdo
4 ~% ?! z4 N. d0 Y: Y |1 N, f Lan := rootfolder.Internal.Tools.AOLlanguage;! S6 Q" G5 |/ p
if current = @.Destination -- else return0 F1 a& d7 ^2 n) ?+ U
then* K0 n: ?1 q, S6 ?5 ?
@.Destination := void;0 f$ v' L# {8 {
if @.occupied then" Z2 p' H9 r2 \; M8 S2 v& k
part := @.cont;: m# Y+ o S+ v! C- v6 n, g
@.transpOrder := void;
, V$ ?1 S( b5 R part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
+ H: G% V/ Y+ ` @,root.eventcontroller.simTime);) l0 q* }: \& o5 L
@.HasOrder := false;# U& d" _$ H5 O0 J3 X Z
@.DrivingHome := true;! b8 g. P2 U2 U0 y6 H' G# {
rgManager.tryToStartTransOrder;1 u" P) e$ h4 O0 [9 G8 m1 S% |
if @.Destination = void w: B: q- U8 \0 m( S9 A
then -- no transport order for vehicle @0 E, E1 S7 `. m
@.Destination :=% N0 X" j9 z6 c. |# z
rgManager.nearestFreeStation(@,track.~);
~- x- |8 c. Y6 B- k newDirection(@); 9 \1 j- Y+ E. z7 K. _3 F U% X$ O
if @.Destination /= void then
" C$ g. }) F' R4 V @.Destination.NumReservation :=8 j4 h$ Z6 e7 k) o8 N* T
@.Destination.NumReservation + 1;
( ~) B/ u: ^: x* X/ w% [! v5 R2 h0 f# \9 z end;
4 `( B4 t c h5 |9 N% Z$ q @.CurrIcon := "drivingHome";8 d8 y$ L/ F. I5 C1 X+ Z
@.DrivingHome := true;
5 w9 n7 A N+ E end;% {. Z0 f( s, X \( j$ G
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
$ g1 E0 X, j. p) A0 d! n part := @.transpOrder;1 @3 D3 Z$ h1 F' A8 o
part.move(@);-- load part; ^( f" W1 Z0 S' _
@.CurrIcon := "load";7 _' ~; J: [* c5 i8 j- ?; P2 u
GlobalDistObj := part.globDestination;$ ^7 S+ x' m0 W8 Z' C! {. M1 F
assignLObj := rgmanager.rgAssignL;) T, q2 ]3 {$ N( M- ]9 y2 j
row := assignLObj.getRowNo(GlobalDistObj);
+ N0 C/ z+ E# L8 a/ W$ A) b if Row = -1 then -- since 70% ]% a+ N! p- j
if lan=1 then
# x. Z# l' n8 V5 h promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
# G/ O' P! k, g1 `: N* [ to_str("in der Andockstation: \"",?.~.name,"\""));
# i+ t* A1 j6 N. D; X4 r! S6 {0 ] else
% n" n0 d: Q7 c* Z$ m promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
# S% A. O( H& [& O to_str("in docking station: \"",?.~.name,"\"")); % n+ }5 D# L0 w; N% q/ `
end; W$ K% E5 _3 L2 o2 U
else. |- l) ?' |3 u. [, {6 Z
@.Destination := assignLObj[1,row];5 _7 t. T" S0 P4 i9 x8 W
end; # m5 n' o6 b) e& l( O$ {
newDirection(@);% v; i+ G; D* c, r! i0 n
@.HasOrder := true;0 o: x1 A8 S- Z# Z/ r
end;! f# _! k0 l, C" p
end;
8 }5 j% W9 M d8 L' q+ send; -- of the method
2 H* }1 \9 g H1 Z; x% O" F$ ` |