/* called by: entrance ctrl of the object 'track'1 s3 t* G- X6 N! A- A# K# O' s
*/
' ~# Z C2 C1 \9 Y; ]4 Jis3 I D6 E7 H* {+ R/ `, \
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
/ g' e) _) m5 i: l/ H* d# f6 c& \do
2 _9 y* F* H( B1 y9 ?- H% ~# Y( i Lan := rootfolder.Internal.Tools.AOLlanguage;
$ B2 ]' K$ V. g4 i2 a$ Z" U if current = @.Destination -- else return
" q& g' ]9 m" y# i/ G/ F E( A then; h& O% f* j2 K$ c, @8 K9 L+ U
@.Destination := void;- N% w: ?6 V4 p0 z, y1 s! f: d
if @.occupied then; \, C" l5 G+ y/ h) o
part := @.cont;
& T u5 C6 F L$ w$ I6 d @.transpOrder := void;
5 m2 S' Z. o- s part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,* ^$ I9 } D% p& S" h
@,root.eventcontroller.simTime);
: O. H I" @+ o, I% z @.HasOrder := false;
1 A9 ?" ~4 Y) q @.DrivingHome := true;
, P- F. j$ I( w2 K rgManager.tryToStartTransOrder;" z& b) e% M, _( K$ w. N0 d
if @.Destination = void) f. Q, ]2 Z$ A+ y) F
then -- no transport order for vehicle @
% d$ N& } S1 S9 Y' U& U @.Destination :=
@6 E0 a* u/ S7 b5 H rgManager.nearestFreeStation(@,track.~);
) o0 R5 X4 j3 u% Y" Q8 q! n newDirection(@);
$ d+ E' K' V8 G$ D# d* f2 `( m: l: } if @.Destination /= void then1 l% K5 B4 V1 J( A$ j
@.Destination.NumReservation :=
J( d2 n0 q! I4 \5 c9 O @.Destination.NumReservation + 1;6 I+ _+ c% H* X
end;
2 y% D8 k$ u1 _ @.CurrIcon := "drivingHome";
' c( C5 s C3 X @.DrivingHome := true;
( [: c1 n, Q$ Y+ } end;4 y5 Q& B/ n2 r8 A0 h
else -- the vehicle @ is empty, both vehicle and part are in the same dock station' K7 U" T7 z1 D, P; N1 F
part := @.transpOrder;% x, C' A& J1 x$ ]' ?, R# N. G( q
part.move(@);-- load part
( H t. X: j2 X, @& O4 V @.CurrIcon := "load";
4 b) M2 ?" j3 y# { D GlobalDistObj := part.globDestination;
, V. d- q; C. z' S1 f assignLObj := rgmanager.rgAssignL;
' Q2 q$ U* E- R( M row := assignLObj.getRowNo(GlobalDistObj);
( c; z! z% r2 J if Row = -1 then -- since 70& p) y3 f0 I' q
if lan=1 then
) }3 E* J+ {- v' q4 o promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),0 W7 x1 R! @( Y! F# h) c
to_str("in der Andockstation: \"",?.~.name,"\""));
2 E% d% w r* b6 S8 t else
. i" [% l/ c% w+ |: ~% ~9 ^ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
0 z+ E5 v% C) f+ B9 m) S to_str("in docking station: \"",?.~.name,"\""));
& `6 Z+ q' f( Z# r end;
+ ~! I$ m" [6 y% I: R2 X else/ p3 o- W4 B# t8 T3 \6 u* ~! R5 |' {
@.Destination := assignLObj[1,row]; L4 m7 ?% N9 b9 l4 O
end;
# R D6 K: m Z7 ? newDirection(@);# |4 D+ l. Y: u7 ^
@.HasOrder := true;
! M( ~, ^/ x* j B/ I end;
0 ]" u$ ]1 f: m0 C: R" } end;
2 v5 r/ p! E" C+ `2 g9 yend; -- of the method
! v' s4 I; s2 g( f( s |