/* called by: entrance ctrl of the object 'track'. K1 ^/ G4 \ |* u1 i
*/! n: V; N% V% J: @; G
is8 |) X0 `3 }6 r. L1 p( o3 }5 e
part, GlobalDistObj, assignLObj:object;row,Lan:integer;# V/ q! h% F* w! c
do: I: U8 c) |* |4 x7 v+ R& X
Lan := rootfolder.Internal.Tools.AOLlanguage;& x1 b. w: ^& o& O& O' B) A+ C3 F& x
if current = @.Destination -- else return
0 Y* ?( b8 w- v" Y then7 E2 f5 W2 S, Q0 D% V& d5 N$ p- L
@.Destination := void;
7 V4 P# m, m- H/ P# o7 S if @.occupied then
1 R' |2 l. m6 R! s6 F( B2 M part := @.cont;
# m4 _+ G N; \' v9 X# @ @.transpOrder := void;
! ?& Y) f4 v/ @ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,) A, X$ }' W- E! e; ~' g$ `
@,root.eventcontroller.simTime);# d% X7 d7 ^2 n- Z2 f m0 d- ^
@.HasOrder := false;
, I/ ~/ x$ { H$ o7 Q @.DrivingHome := true;. K; d- I3 r6 f: R0 ]' |" P
rgManager.tryToStartTransOrder;
! z2 U) V- |+ M1 m8 z- _ if @.Destination = void
2 D' c0 s; B9 c, u! |9 p then -- no transport order for vehicle @8 C q# a! r! Y( F+ q1 w
@.Destination :=
/ f! O. \0 T$ w l7 e% u rgManager.nearestFreeStation(@,track.~);
+ V; X5 w9 i9 `, E+ w newDirection(@); . S1 w/ E8 H6 z( n7 [
if @.Destination /= void then
! b3 R& f* H Y6 G+ l @.Destination.NumReservation :=; N+ I9 E, \6 L
@.Destination.NumReservation + 1;
]: C m2 K" N/ t" b% X7 { end;' ]/ g3 n% k* Z. c, B, E# y
@.CurrIcon := "drivingHome";0 D5 o+ k. L$ G1 d, e3 ?
@.DrivingHome := true;5 v! s: s4 L) Y
end;
9 z+ J8 v3 s+ o5 p else -- the vehicle @ is empty, both vehicle and part are in the same dock station
' ` J* v( ~: e2 Z0 o1 o part := @.transpOrder;
' l9 E+ b& ]" E( c5 Q1 w% n part.move(@);-- load part
) U& l# C- W) {8 v2 C @.CurrIcon := "load";" k4 S0 N2 G! l/ |0 c1 B
GlobalDistObj := part.globDestination;+ l8 c. V6 G8 Q( o' v2 G
assignLObj := rgmanager.rgAssignL;2 X7 Q3 G8 u. c
row := assignLObj.getRowNo(GlobalDistObj);
* r8 s r) [- ` G' r- @) @0 ~8 y if Row = -1 then -- since 70
4 B' e& I# J: e$ d9 X; l if lan=1 then
& O6 c7 `7 f7 C promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
4 E' [* K% ^% c3 U1 j/ \4 T x2 Q to_str("in der Andockstation: \"",?.~.name,"\""));* b# \* a- t) b: T6 N$ p8 P" g
else
: S& u/ P. Y& p' X3 n+ z4 e promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
. j: [* y$ o5 ] a: } to_str("in docking station: \"",?.~.name,"\"")); . ^+ Z% u) K- ~+ O7 y6 n
end;
. b h- v8 F" L- C else
+ g2 s4 _. E% m( u @.Destination := assignLObj[1,row];
7 W! y; K* o5 P: u- G1 F9 R end;
4 A4 N4 D6 s Y* B9 U4 t; p2 K newDirection(@); [3 v- {" N3 z5 z: ^0 W! x
@.HasOrder := true;
, I& R, T- l4 x, }% b end;
$ ]! Z1 S- C6 g9 J3 R# R end;
5 q, U1 i' K( Fend; -- of the method7 S+ `1 D& U1 m0 R0 _0 l8 s1 \
|