/* called by: entrance ctrl of the object 'track'
8 C7 }8 Y1 |4 ^; Z; Y*/
+ X# t& N% d$ ois0 T1 H( [5 K" L% D5 C; `& j% u) m
part, GlobalDistObj, assignLObj:object;row,Lan:integer;+ x2 b; A# G" J0 |& Y3 K
do6 m/ t3 y7 b- N [* @. W
Lan := rootfolder.Internal.Tools.AOLlanguage;
" ?6 Q9 O- C! _) h8 U if current = @.Destination -- else return
z2 @$ y% m8 p; v: V then% j4 g) v& V+ J, n3 ?
@.Destination := void;
/ f' d4 L4 t1 t ~* U% j3 A, ~3 ^ if @.occupied then3 j# i/ F e- i& p5 @$ M
part := @.cont;
, I( U/ J( g, M2 r1 T+ P8 ?6 u1 Y/ g @.transpOrder := void;5 f8 u3 }5 I9 H% r( X/ c
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
8 L, h7 a: Q7 r @,root.eventcontroller.simTime);' o+ u, K0 t$ {0 E& n1 q
@.HasOrder := false;
9 c; B4 G; n, a2 X0 f. u1 E! P) H @.DrivingHome := true;
6 e. Y) j. i2 ?+ q$ v rgManager.tryToStartTransOrder;$ H, y. ^, @0 x3 t5 `% a) Q8 @
if @.Destination = void" }0 |7 s- }, O7 H( s1 b, w6 p
then -- no transport order for vehicle @
6 T3 u' D9 H5 L+ H0 u& E @.Destination :=
. o# e' ~' l6 B9 q rgManager.nearestFreeStation(@,track.~);, r, c6 T2 s& i
newDirection(@); / D: C6 E& F' O' Z+ p8 S$ V
if @.Destination /= void then
5 w8 w* _7 ~! f5 I7 m @.Destination.NumReservation :=
! w7 f! Z6 F' x: \3 g @.Destination.NumReservation + 1;
( V# Z, I' q. V3 @+ a9 w+ T end;
! A& ?2 k9 p+ X& O @.CurrIcon := "drivingHome";1 v$ k2 h- o/ E; ?, a C
@.DrivingHome := true;; a' D$ W) L0 U4 z" u0 @; w
end;2 J5 M% M S, w) c/ l; S4 i
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
. N3 k1 M( J/ q* q( F) m# k) `2 B part := @.transpOrder;8 d& [" s8 ?4 |
part.move(@);-- load part' ?; W, x( q# N% H6 d) H; W
@.CurrIcon := "load";- M9 I1 V9 Y" L% @
GlobalDistObj := part.globDestination;
4 Y3 I5 D y# c! {9 b7 k% C2 X4 T assignLObj := rgmanager.rgAssignL;
$ A0 @$ C! L4 u- D4 F' ?/ ^ row := assignLObj.getRowNo(GlobalDistObj);' C' K1 `- u- `! H8 J( b4 r( P
if Row = -1 then -- since 70
1 m8 h, z/ d4 I( D5 { if lan=1 then2 k( Q% Q6 b4 a7 j- w1 ^
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),3 \* H j7 y- }( B( u
to_str("in der Andockstation: \"",?.~.name,"\""));4 t9 n2 ^% a7 H: ~
else
! S6 a _9 W' N/ x- t9 D promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),. i& _* N8 R( d
to_str("in docking station: \"",?.~.name,"\""));
3 B9 { G; m5 i end;
0 S' _: |2 q6 @* z5 ` else6 C8 w; O' s/ y4 G- y4 e* H% o. D
@.Destination := assignLObj[1,row];8 i5 i- ?* V. Z3 N! H* ]* A
end; - Z7 Z& p; L1 |2 |$ f* C/ z# J" G
newDirection(@);3 @ t9 ~" ~: V6 M$ E2 p3 @
@.HasOrder := true;
, j9 \4 l9 j3 U$ z6 V$ y+ a end;
5 h: K% O9 n% W: U$ u$ t: B+ v5 i2 w% U end;% ^; L: Y5 d' m, K
end; -- of the method" w7 k* j! E: C" H" C% E& _5 J; A) d5 E
|