/* called by: entrance ctrl of the object 'track'
6 v7 R" _; e" X5 G*/
* J5 W" q+ l8 o; p6 jis
1 E- b; e# \; p2 @/ T8 F5 ^4 l+ _3 u+ C part, GlobalDistObj, assignLObj:object;row,Lan:integer;
" z2 f# ?; B. ?( ?do
5 v& Y* O: y% ?4 U( x Lan := rootfolder.Internal.Tools.AOLlanguage;
% n$ j$ V$ ~8 W9 Z/ Q( s- g F if current = @.Destination -- else return
' t6 W6 f) x, L# s& | then
, L6 ^+ Z" a$ Y$ n) L( J" j o8 A$ U @.Destination := void;0 H( A) P$ D% G7 o+ z. l$ H, D3 M/ p
if @.occupied then
4 U( m4 P! b9 ~0 i4 @2 x |" I part := @.cont;9 Y7 K1 y8 H: L7 [5 f1 {% Q5 @
@.transpOrder := void;
) n6 q: }- U* q) B9 F# Y! N part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,7 ?5 M: w* N7 L8 Y4 S- A5 x
@,root.eventcontroller.simTime);
% D4 m' Q1 G( ~! J @.HasOrder := false;* n6 t6 [6 D+ N* K
@.DrivingHome := true;
) K5 ~" A2 Y; W* i* g4 k rgManager.tryToStartTransOrder; i+ F2 l3 c. D5 ~5 O! Q
if @.Destination = void7 V; W" j7 D2 j$ s
then -- no transport order for vehicle @
& v+ k3 F5 n2 y% @# w7 t) c @.Destination :=
% c' z* _$ j/ R# ^' ^1 t9 o# Z rgManager.nearestFreeStation(@,track.~);
/ [" p3 x8 L8 e1 c newDirection(@); 7 c( V) [ j! p c1 v/ J
if @.Destination /= void then, e+ ]6 D) X) @" u
@.Destination.NumReservation :=
7 Q( M/ f# g# r# T( ~) S3 R8 k @.Destination.NumReservation + 1;
# d9 \5 ~' k+ I+ e, x. H, r/ J end;# N! z/ [) U; E4 \5 p$ Q, w5 z- u
@.CurrIcon := "drivingHome";* Y) \) j5 Q0 g" T
@.DrivingHome := true;0 e) B! l0 ]. w
end;+ ]" |0 \6 W4 C+ \/ i
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
' ~" |! y0 a- i: W, |3 l$ Z part := @.transpOrder;
. ~( x7 V0 N- ^) [* i0 d% ?; c part.move(@);-- load part- b. c6 |2 o' ^' J: Y* L1 S. i9 ?2 A* ^
@.CurrIcon := "load";( F/ V$ b" B4 V4 m1 U
GlobalDistObj := part.globDestination;
, O8 |3 a R- [( p. V5 V assignLObj := rgmanager.rgAssignL;4 r, J5 L# E; _7 s
row := assignLObj.getRowNo(GlobalDistObj);
y( `2 q' X6 R* }, J if Row = -1 then -- since 70
- b$ m9 V, P4 ` D if lan=1 then
! ^2 ?4 w+ y, Y4 H: _+ j0 S2 Q3 ? promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
' C/ u* P/ w2 ~ v+ T' s to_str("in der Andockstation: \"",?.~.name,"\""));+ N; p* E: U' [/ b5 p Y1 y
else+ \* {- E) z# R$ F; Z! f' F
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
' y" p2 a7 j+ Z8 } to_str("in docking station: \"",?.~.name,"\""));
' H$ \/ b) Z2 A: J2 q% z end;6 o8 {% I& E5 w2 K$ a: H
else$ I1 }+ Z( B- {# q3 i) o% d
@.Destination := assignLObj[1,row];
9 s/ W8 x. S2 Z% e* F# K end; * h+ H( U' l; D, c8 d; b
newDirection(@);! g: V) z6 o1 m: n: M& d
@.HasOrder := true;9 _ j2 o) J4 y% C$ {; M4 D V
end;3 s6 F8 t, I8 g0 [
end;
# N* e6 A4 n3 @% N% | a$ _end; -- of the method& k( |: @" d O9 D, s2 H
|