/* called by: entrance ctrl of the object 'track'
, e& ^3 ^: G$ [4 o*/
, [3 p: Z8 Y: w, d* Cis- @$ C, ~; d+ j' y. ], m
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
9 k! J& y2 i8 ?$ ]do
2 S9 f! ?! e% O' x- K. b3 M: l Lan := rootfolder.Internal.Tools.AOLlanguage;
2 C! w: N# q3 O8 j' q if current = @.Destination -- else return
! S7 V0 P$ J0 _: G7 t5 s then
2 @( X; E4 }/ B, X @.Destination := void;
3 {# L8 j: _( s. S" k6 \+ L if @.occupied then) `2 T- p' A( Y0 `
part := @.cont;
4 M( f/ {- N h @.transpOrder := void;! T' Z& C1 J8 j" I2 I
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
" D, E# J. T, A+ Q# Z, x2 ~. O! C @,root.eventcontroller.simTime);
+ y! j6 F% s6 p1 l. K `4 u @.HasOrder := false;& g9 e! l6 E0 o
@.DrivingHome := true;& C( J( O3 L3 Y: g8 ~4 m1 c7 X
rgManager.tryToStartTransOrder;5 R5 Y& O0 H- s) N3 U; }* x+ x. A
if @.Destination = void" O6 `; K+ t1 |4 q1 T; q% S @/ ^
then -- no transport order for vehicle @
F1 `) L/ g2 C3 o% `5 { @.Destination :=
/ h; Z* r6 z8 j; w9 ]( @- h. z rgManager.nearestFreeStation(@,track.~);+ m2 \! K0 J. b5 f0 F1 a# d2 N
newDirection(@); ! P% V& M: A9 C: M
if @.Destination /= void then
; v# D3 A4 ], z& q; ^/ q8 z @.Destination.NumReservation :=* S. c4 z( h7 T
@.Destination.NumReservation + 1;
8 ^6 K+ p1 t3 O' u' | end;
0 t1 I1 y9 r) f @.CurrIcon := "drivingHome";
4 C6 N# n) P3 c# I6 r @.DrivingHome := true;
# `9 x2 d7 U# @+ ^# T, y3 B& \ end;
Z( T2 W: q" h/ N else -- the vehicle @ is empty, both vehicle and part are in the same dock station- d- t1 O& h+ B, X" J
part := @.transpOrder;
0 ?; c8 F+ L! \1 {5 l2 _) W1 V* m part.move(@);-- load part* @- \0 x1 S6 ]) u1 v q' S! M
@.CurrIcon := "load";
X% E: A$ ? T$ ~( [5 n GlobalDistObj := part.globDestination;* a$ D7 a% [# @* f. [; c
assignLObj := rgmanager.rgAssignL;
( m( w, w# c- B2 k9 u5 x, t" r' K row := assignLObj.getRowNo(GlobalDistObj);' V7 a: S7 r! E1 R) K) O
if Row = -1 then -- since 70
+ d3 F9 e6 P" h( h if lan=1 then4 l& j B+ t/ @9 q `
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),! v4 U7 w! u1 b! b
to_str("in der Andockstation: \"",?.~.name,"\""));) Q/ n' `* v5 F/ N8 ~$ ]6 o0 D
else* G0 c" F' Z, @, ~
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
$ Q% M) }2 r3 a% X H" k) P to_str("in docking station: \"",?.~.name,"\"")); 2 R& W/ Z$ [$ E
end;
3 E& _- p" W! W6 p else1 h& O8 n- M- u1 x: L4 T2 S
@.Destination := assignLObj[1,row];
3 c; w( W/ ?1 W! h end;
: p ^& `. k& l! @ newDirection(@);
, E+ l7 p- i" O' k @.HasOrder := true;
. w( |$ y' i! \- \& u end;
2 l9 b) j* q. P! m9 j9 ~/ R- q end;
5 z$ Z# R B4 S3 \" Bend; -- of the method7 Q8 H6 {- t2 Q" b9 u \- V
|