/* called by: entrance ctrl of the object 'track'# a3 T; P; b C- w, h3 I0 Z
*// c* T0 d$ ?" }7 _
is. `' M' K- Y) x) j; O- E
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
7 G2 g0 `$ l4 N/ e3 [0 Mdo
% n3 L- n! O7 e9 k* ?# _1 \7 ^ Lan := rootfolder.Internal.Tools.AOLlanguage;
: y# A' h' t5 M3 S! |' M ] if current = @.Destination -- else return
5 A" o0 E* [8 M# L/ |) v& { then
/ z2 H6 M. y2 i5 v& c3 z; a @.Destination := void;# h3 y$ q$ K& E, B
if @.occupied then
6 b4 c: w P& L$ Q# ]+ W: i part := @.cont;3 u. Z# @% `# e3 @/ E5 ^* V, N
@.transpOrder := void;
1 J( _0 z$ m9 {9 V# c$ B part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,9 X/ w$ [8 T6 Z" c: A) A4 s
@,root.eventcontroller.simTime);
1 Y2 h D8 C! t9 f @.HasOrder := false;. @+ o2 K5 q+ p7 f9 W& d# N% m
@.DrivingHome := true;
' b0 P7 N4 }; a+ G rgManager.tryToStartTransOrder;+ z$ B( O! f# z% W$ y6 a
if @.Destination = void
: h/ N8 s" F9 \% x4 J( B# w; s+ z" l then -- no transport order for vehicle @
C" f; I. G$ |' J6 J @.Destination :=, y6 M3 n _0 N# {# ~& E, \
rgManager.nearestFreeStation(@,track.~);
5 J" S5 Z$ \4 e( T: V1 u newDirection(@); 8 b( a! \8 C5 E, Q0 t; L
if @.Destination /= void then8 _/ d! u# u0 f$ X
@.Destination.NumReservation :=
8 m3 p5 o, m5 B6 [ _ @.Destination.NumReservation + 1;) d) ]$ J* l/ d: w6 a, D+ v
end;
$ ^, `+ A4 ?2 ~3 Y& ^, t$ R @.CurrIcon := "drivingHome";- s; F0 g. G- y) C5 E* Z+ W
@.DrivingHome := true;
( f" S: x: W" T+ B end;
& ^0 _( f" E. p+ U6 c) n else -- the vehicle @ is empty, both vehicle and part are in the same dock station
* M4 M6 G t* [$ _- M* {) N% V0 | part := @.transpOrder;
8 G( b3 F3 y) g* p6 Y1 a; m0 @ part.move(@);-- load part
$ z5 v+ o& m0 |- M @.CurrIcon := "load";* s3 M' L6 ?% G: E( t( }
GlobalDistObj := part.globDestination;, `7 B# [ ~3 c( w# ]9 |: y
assignLObj := rgmanager.rgAssignL;/ c" b/ a( R1 x d
row := assignLObj.getRowNo(GlobalDistObj);
) t Q3 l; \. _0 A; \ if Row = -1 then -- since 700 E- W7 @) Z* v
if lan=1 then
8 g, F# {1 t9 G8 {* n" @7 [# Z promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
9 Q& T$ T: _+ R4 K- Z6 C to_str("in der Andockstation: \"",?.~.name,"\""));
( o7 r/ }5 q5 z$ t else
5 Q: i& M& w# [% w promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),/ b3 d: [" ^/ P, S; L% T$ c
to_str("in docking station: \"",?.~.name,"\""));
, D5 H/ v# M" ?5 X/ x/ h4 U& ? end;- j3 J" e1 B3 c* X9 X/ j! c, k
else
. u- g6 K/ j0 D @.Destination := assignLObj[1,row];
6 F; M7 a8 c$ Y5 d" ? end;
# h f2 b& a' j& z1 G newDirection(@);
+ U- }3 ?$ S6 X) G+ \+ L1 S2 B @.HasOrder := true;* E- w! U" _* M0 s0 I! w
end;1 j+ W6 |2 E! d' K* ?
end;
3 g, D/ P7 c& H) {+ {end; -- of the method
: _% g4 ?7 U4 U2 ?* ] |