/* called by: entrance ctrl of the object 'track'
0 \( `, W/ U- ?6 r*/8 O Z' n) _ M8 Q. H
is, f0 |1 h; _8 \, @3 Q6 V
part, GlobalDistObj, assignLObj:object;row,Lan:integer;9 L" B: Z' x( Y* v% l
do% P7 J; s# `( x# N, K# u! l
Lan := rootfolder.Internal.Tools.AOLlanguage;
) R4 N2 B6 g+ h# D if current = @.Destination -- else return: P! L3 ?' I4 G- i
then
1 K. i/ ^# M. k8 o! |5 }0 q @.Destination := void;% R. G' g1 [2 G- x6 ?( h4 n
if @.occupied then+ p+ a# \5 j7 H. g, ]9 e
part := @.cont;
3 f, E% O& q) X/ O4 u7 I4 T/ A @.transpOrder := void;
5 [- `/ I4 X7 V" j- W part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,* R. E& q3 H! d: n- \+ F$ {
@,root.eventcontroller.simTime);
6 L( z( y4 } v1 S2 j4 n5 ^ @.HasOrder := false;' m- d8 Q1 m8 R5 b/ J
@.DrivingHome := true;7 @4 Y7 K4 c& ~3 X; u
rgManager.tryToStartTransOrder;
8 H5 q0 c* y0 E/ J. a9 v if @.Destination = void
( B6 y2 L( G7 Z; H) d" @2 j) c: p/ i then -- no transport order for vehicle @$ K+ u/ R* ]6 R* p, ?# @, s7 W
@.Destination :=: l$ u! C3 ~' I, E. r' O% z# z! L
rgManager.nearestFreeStation(@,track.~);' C* H9 G& S3 o& s
newDirection(@); 3 n u3 x/ Z* }3 G& m9 y
if @.Destination /= void then/ x: r# q' `7 \# b' G; b
@.Destination.NumReservation :=% B" m' l- {2 }- _6 c; Y+ H/ D
@.Destination.NumReservation + 1;
7 E$ [7 ?7 s; W9 \ end;
) n/ \. c$ r9 J, n# a" y @.CurrIcon := "drivingHome";. R! ]( ?+ z" r2 N
@.DrivingHome := true;
' H% ?! {* \; h1 C' I9 t) g end;
9 G* F) W5 R# M9 k1 V else -- the vehicle @ is empty, both vehicle and part are in the same dock station+ ]) x& L1 {8 @8 F7 e' l8 \
part := @.transpOrder;
5 Z( ]! w8 l4 Y- z$ L2 B; Q2 _# q5 @ part.move(@);-- load part9 }$ ^2 H$ C3 n) }( ]* {$ ]3 O
@.CurrIcon := "load";
' U6 c/ ]* Z/ Q* t- {' R* s- b GlobalDistObj := part.globDestination;! K5 F7 b+ @2 o1 m6 p' N
assignLObj := rgmanager.rgAssignL;% K l2 k% T( O& _8 U0 y$ f
row := assignLObj.getRowNo(GlobalDistObj);' |% L: J, l) i( A, }# D; n
if Row = -1 then -- since 701 A0 V, h8 n$ j) w) K
if lan=1 then
0 X3 Z$ n) C* v* ` m: F promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
6 h3 N4 i' w. J+ c; Q' N% ~ to_str("in der Andockstation: \"",?.~.name,"\""));
% _- r5 |# g" B else/ _! w3 H- k: U5 H1 n$ S0 {9 @
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
3 V7 A+ h- A! P: o$ Y' V6 p to_str("in docking station: \"",?.~.name,"\"")); & v) z% Y6 Z! h$ ^
end;" x3 h1 N) b+ H+ O4 ]0 S5 G" x- {
else
7 y* X h- {- k7 d @.Destination := assignLObj[1,row];
5 N2 f9 c2 ?: J, `, [4 c end; , D- p9 o) c# V; \. t) p9 u
newDirection(@);7 _9 l4 q7 J( |
@.HasOrder := true;
& `7 `3 i* `2 I" X* {! E- n$ ?- n end;
2 s3 o& Z: ^: p% D) } end;
8 {8 q1 d+ V& Y- r" h% Aend; -- of the method
" s) j5 o0 ^0 J' h+ Q/ G2 ?$ m |