/* called by: entrance ctrl of the object 'track'! u! C7 O1 L2 K- ]
*/
8 m% y0 a$ z- [is7 E* ~& R: |- C; Y1 f/ G( F4 g
part, GlobalDistObj, assignLObj:object;row,Lan:integer;, ~6 [& w. @ |- o3 B
do; p |0 e" s2 M, B4 @7 ^8 @9 j
Lan := rootfolder.Internal.Tools.AOLlanguage;
* {$ j% @; m$ \2 Z, S if current = @.Destination -- else return% L% j: c8 N9 b7 k9 w; \$ V
then2 d2 I! U4 |* X
@.Destination := void;) e& P& O, X$ u+ X7 A J* ]
if @.occupied then
7 t7 `' M( G( e$ a3 E3 I `+ c( Z+ d part := @.cont;
, C$ P' Z' R! C" T P! k2 ~6 W) l @.transpOrder := void;
, Y- m! K1 \. s" g, A5 L1 g part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
9 R9 N. _+ W: p$ k @,root.eventcontroller.simTime);
, z( d. s* I t% D- ^" n' } @.HasOrder := false;
* c5 e2 _ e. Q4 M; h @.DrivingHome := true;
8 z7 v- R3 ]* x- x m rgManager.tryToStartTransOrder;/ W: S; Y) S" ^
if @.Destination = void- x) i9 F- n/ o2 L1 Y+ M7 {' y
then -- no transport order for vehicle @$ \. u, m! R c8 b3 @$ G3 p/ H
@.Destination :=' G7 r& T" ]% j$ @/ j
rgManager.nearestFreeStation(@,track.~);
8 I ?" q7 I7 a |3 q# d/ k$ ?1 P newDirection(@);
/ S$ Z9 \( ~0 ^) i: ?- r- W2 z. T if @.Destination /= void then9 X5 O3 I2 z% S- ^& C& O- H
@.Destination.NumReservation :=
7 b4 v1 O3 d+ { @.Destination.NumReservation + 1;
2 d# n; v$ d. K3 o( K1 h end;1 `+ y* y7 a5 s7 u& j) e
@.CurrIcon := "drivingHome";/ v! {, x7 G6 N6 w0 {* y1 V9 E8 D
@.DrivingHome := true;
4 e5 O& r) n( h7 X9 A end;" E( b* N* m/ {6 g" ^9 U
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
( w* v: ~7 F6 P/ f% S/ U, R part := @.transpOrder;2 e4 `- A$ n# J2 _- e5 E5 N; m" M
part.move(@);-- load part
) y& I1 k( q+ J. Y @.CurrIcon := "load";
. r5 t% X2 b* J9 k% K6 F1 W GlobalDistObj := part.globDestination;
4 g' {8 N3 ~8 ?% K9 D& | assignLObj := rgmanager.rgAssignL;
9 g s- K% z0 W7 g" @ row := assignLObj.getRowNo(GlobalDistObj);
# W: ~3 N+ e! q$ A if Row = -1 then -- since 70# n3 d9 x7 F+ B5 l
if lan=1 then
9 c3 _- }) z. {! ? promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
, Q4 V0 M' H( J: W/ R# p3 ] to_str("in der Andockstation: \"",?.~.name,"\""));
8 u [- W5 l. ]7 ]% _. B- Q else! R4 t. g% P9 s' b+ R4 Y" ?( g
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
- [% @% D) m) X* ]) j. T to_str("in docking station: \"",?.~.name,"\""));
8 \* [6 V( Q/ c. u end;# I1 K* v. x2 V7 X( S- N
else3 g$ }6 N1 J& _2 E8 b
@.Destination := assignLObj[1,row];
4 R- C" B6 c5 I9 V end; / F, V0 n3 x: k* G/ R; s; p
newDirection(@);) Q) X, J* ~2 F- u, B2 d8 I& _
@.HasOrder := true;
* p* R5 i; \; n) ~% ^5 j end;
- h6 f. ~3 l2 f end;
. Q9 `6 R* T! |% Fend; -- of the method6 P; Z; u- o" y$ W
|