/* called by: entrance ctrl of the object 'track'
+ u) f) X- k* j {8 N8 j*/, F7 O+ Q2 R4 R5 E* ^
is
+ ~ a, k% y# ^ part, GlobalDistObj, assignLObj:object;row,Lan:integer;2 X7 [5 ~# r9 P# \9 E* ]; O
do5 `9 a0 [; n0 `. c- f! j$ h
Lan := rootfolder.Internal.Tools.AOLlanguage;
5 i# K6 I& [, b: X! I# V8 g if current = @.Destination -- else return, I2 O! h: e8 Q, l4 b4 b2 U# a
then
' A7 H& s' E" H8 Q P5 M @.Destination := void;. A$ y! @* w& ^- ~& I; \$ G
if @.occupied then. X- \' u$ f, b2 ?
part := @.cont;
" p$ I% R+ k I X- \8 C! ` @.transpOrder := void;
/ X' n2 j& @. }. e+ P f. W part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,3 q, [" [# n6 v
@,root.eventcontroller.simTime);7 Y& I; l; r; f9 @7 \
@.HasOrder := false;* `- g" k5 O) {* C% A
@.DrivingHome := true;
+ H0 w5 P6 g& ]% g$ B& z rgManager.tryToStartTransOrder;, T+ s- Y# k8 u! }" @
if @.Destination = void A' Z' w. v5 ?/ o4 u( R. `7 J
then -- no transport order for vehicle @1 u; z" V8 L! `
@.Destination :=0 {% z: m# C1 Y
rgManager.nearestFreeStation(@,track.~);6 o1 Q2 v: s9 `0 Y$ k9 @4 J
newDirection(@); : Z: W, A) y) h
if @.Destination /= void then: k9 q) w; g* O0 q+ f& z
@.Destination.NumReservation :=0 I8 C. f0 i V; P
@.Destination.NumReservation + 1;
4 O" m9 O( s. V3 n# M* S end;
' w% |6 R0 |: V+ ? @.CurrIcon := "drivingHome";# _( \2 y3 c0 K' U
@.DrivingHome := true;
& @. x4 @6 ]4 N end;
. k- g( L* v0 O" S' s g3 p' d7 I else -- the vehicle @ is empty, both vehicle and part are in the same dock station4 |* W, X1 z8 W& [9 V: A$ s
part := @.transpOrder;
' [4 J) G9 j7 m1 k9 r part.move(@);-- load part
3 U2 x3 B9 O* J; K @.CurrIcon := "load";
7 |5 c( S) t; m( H& P( L GlobalDistObj := part.globDestination;
. T" S. k3 h Q) z- G1 a# } assignLObj := rgmanager.rgAssignL;
% b6 y# V" `4 A9 \: d% f. G row := assignLObj.getRowNo(GlobalDistObj);9 D* r. s' k; W2 X& n Z
if Row = -1 then -- since 70
' B: C1 `7 a% I2 x if lan=1 then' c' J8 P3 I2 p$ n7 u
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
) A4 W( M* h+ g4 @& N5 o9 ]; _ to_str("in der Andockstation: \"",?.~.name,"\""));
2 x4 o# R _5 I( L2 m else
+ n5 L/ }( I( [2 Z promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
5 N W; F- R0 r8 C6 g3 t+ ~5 O5 v to_str("in docking station: \"",?.~.name,"\""));
6 s- k6 J5 e# l( z$ b# Y end;& M; a3 d e2 u5 x6 ^
else+ \* F A# [. O. I
@.Destination := assignLObj[1,row];
5 ^! ~9 g% z+ j: P! E7 \8 O end; : H' M4 O# o1 K
newDirection(@);, b1 ]. `, U% t) i6 F( r, M) |
@.HasOrder := true;
$ }, M! s' o" U; K, A3 a! p L end;
+ h7 @2 W! A" H" W% q" I) K: ~! j end;
" }/ Q0 p. V* q G& n1 {& I3 cend; -- of the method% n- k2 T# n" d
|