/* called by: entrance ctrl of the object 'track'* m8 L5 G, h0 y' m2 }
*/
9 R- l5 n ^1 z4 x! Z1 i1 Eis
2 }) o F/ c9 w2 d2 I% L1 Y( O% i part, GlobalDistObj, assignLObj:object;row,Lan:integer;
: R( R6 E2 r* T2 B. l% Hdo' ~/ K( s: Q- @, J" H A4 o/ B
Lan := rootfolder.Internal.Tools.AOLlanguage;
; @5 _* u4 [# v# ]2 N if current = @.Destination -- else return( Q. C9 G, Z, ?1 [* P' ^2 ^6 [
then" n2 \3 Z( i9 t) [9 a# v& L- B( R
@.Destination := void;: t* l1 a% W- R: H9 Q7 H8 f
if @.occupied then+ r* C: z/ p- n% }* @& M
part := @.cont;" L8 ?1 c7 a, G% d4 X9 U1 d
@.transpOrder := void;8 y2 H; B/ P$ X8 C/ l+ B
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
2 ?# y' M- T" x2 t) B @,root.eventcontroller.simTime); |* e" M7 e5 y1 f
@.HasOrder := false;' `- ?9 x" F0 S
@.DrivingHome := true;6 J& ]% R7 ?( m
rgManager.tryToStartTransOrder;. p4 L) V2 c5 C2 `
if @.Destination = void
/ g' k5 d; j8 s. c then -- no transport order for vehicle @
7 p- M- [9 G, E" j @.Destination :=* P4 j' h& t! V# Q7 b6 r
rgManager.nearestFreeStation(@,track.~);
/ Y3 C; k4 [4 |6 ]" | newDirection(@); 4 c# H% ^& U6 N% @; z
if @.Destination /= void then' G: R0 n( E4 w8 D
@.Destination.NumReservation :=
. I7 w6 m! w* ^& A" x( Y) ~ @.Destination.NumReservation + 1;
7 y6 l4 K! q1 P5 I end;- T3 o+ Q7 N- x
@.CurrIcon := "drivingHome";
) ]- }4 e2 Y' u @.DrivingHome := true;
9 I8 O. n @( O) Z1 Z end;
3 ?) p6 U7 O& O. ?) k# B" H7 m else -- the vehicle @ is empty, both vehicle and part are in the same dock station. d2 n6 v9 T, q, O( j/ e
part := @.transpOrder;& p% [( B! c K9 f
part.move(@);-- load part+ I# o& `& W/ I; n+ F
@.CurrIcon := "load";: h0 R) Y* S( q1 U
GlobalDistObj := part.globDestination;3 ?3 b8 L* A- P7 D* x$ o
assignLObj := rgmanager.rgAssignL;) z1 Q; |. Q* e+ R: C# d
row := assignLObj.getRowNo(GlobalDistObj); i4 b: u3 m7 }; z: O- Z# d
if Row = -1 then -- since 70, `1 \! c3 u m# I+ P" P
if lan=1 then
2 T! Z. R0 z, o1 |2 Q8 \ promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
1 ?, K6 J0 B: ] to_str("in der Andockstation: \"",?.~.name,"\""));5 ?& C4 H2 D% Y. x
else
+ v2 u% I! D) D+ h promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),; n. Q$ c1 O) G- b( b* K
to_str("in docking station: \"",?.~.name,"\""));
* N$ O% R& n) \4 U0 V, N end;! F2 U: X% g$ G) C+ p
else
6 Q0 I0 \! o9 F @.Destination := assignLObj[1,row];
3 V8 C# b6 H( K8 s% I end;
* l! K9 H, y0 O } newDirection(@);
: ]0 b& N* y/ B4 p/ S/ Y; r6 n @.HasOrder := true;
& ^& T; I% w/ @* p end;
3 V: n5 i! K% n8 ]& X end;
/ Q+ q# E% ]- ]8 Q9 Fend; -- of the method3 P' p6 `( e7 R- D6 \) a" j
|