/* called by: entrance ctrl of the object 'track'
7 i( C" c* p( l+ G' K*/
8 Y% g) H+ V5 s% o& tis }; j% B: s0 t- D6 J( F
part, GlobalDistObj, assignLObj:object;row,Lan:integer;2 T0 _$ e+ M, \* d
do
0 n) ~) y) ~: X, w" ]7 _ Lan := rootfolder.Internal.Tools.AOLlanguage;
# c* }& f: {2 @ if current = @.Destination -- else return3 h4 J5 K9 |; l- l3 V
then* H4 d# w" ~: K5 B. b/ A: d
@.Destination := void;' z* u! j5 ?; K5 @
if @.occupied then6 u( u- `/ x/ ~0 A- h# p( F
part := @.cont;' y8 X8 N2 p8 _3 K" B4 o b
@.transpOrder := void;* e; J" e+ n- T4 J. L; h# h
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
' }% F, M! h$ E @,root.eventcontroller.simTime);' E2 p, y% I H$ T: {/ V% P( L% q
@.HasOrder := false;, O: }0 S- k# v, c6 D& L6 c- J9 _
@.DrivingHome := true;
+ h; L5 [1 Q2 w2 n rgManager.tryToStartTransOrder;
" u8 i0 s4 X0 T' O% \1 l if @.Destination = void8 @# W H Y0 U4 X( Y+ `# d
then -- no transport order for vehicle @. Y% q7 n3 E/ I4 ?8 `7 Z( a& u
@.Destination :=
|$ V* X7 @& n! {) W rgManager.nearestFreeStation(@,track.~);3 v! g/ t* Z; q, n% T8 Z- G8 s
newDirection(@);
: i- x( X' n/ B& A9 j! ?2 b& P; ~ if @.Destination /= void then ?/ y0 n$ k% J- o( v( d7 `8 u
@.Destination.NumReservation :=
0 A2 C* F4 I4 T8 f; [# y5 W @.Destination.NumReservation + 1;4 v: I$ G4 w5 F" s7 e( F
end;1 D0 ?- ?3 J# B
@.CurrIcon := "drivingHome";% r t! V1 t! ?7 T$ |% U4 [- K1 M
@.DrivingHome := true;
4 T' V$ G3 n5 ? end;0 L, B5 `, X" c# T
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
( ~, K! a [' L7 H5 d9 e part := @.transpOrder;
+ a3 s8 U2 A9 s8 y# |* }: V# b5 Z part.move(@);-- load part* W3 T' s0 F4 x' t6 i% ?* ?8 A
@.CurrIcon := "load";5 Y$ Y8 K7 K/ I
GlobalDistObj := part.globDestination;
9 m$ @+ z9 S* z assignLObj := rgmanager.rgAssignL;
2 }, v* L; `3 y2 A" x! k row := assignLObj.getRowNo(GlobalDistObj);
, ]0 i; M9 @' R; ~! z if Row = -1 then -- since 700 R9 R) o& X! P) R' v
if lan=1 then
2 v- W4 l$ R4 V: T3 R. q: { promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
[* M& g1 A0 o: Q$ H2 D to_str("in der Andockstation: \"",?.~.name,"\""));
/ i5 e& {/ c4 s: K6 B; | else/ W- o; q) D9 _# j. L" ?
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),4 D* u, _! c3 `8 m- s% u1 Y+ U
to_str("in docking station: \"",?.~.name,"\""));
3 F* O0 X+ v$ P' T7 w end;
- G, z z+ {! J) z else3 V6 h; g8 T( k3 M# Y' n. i
@.Destination := assignLObj[1,row];
# R, R& a) v& k, g/ Z end; % C, H$ `0 [& t# E. ?6 r
newDirection(@);- O" _, T5 a @! S0 [
@.HasOrder := true;
2 T) \" q5 j( ?) \; C" K7 I end;* ^) E9 v( `7 }9 v5 r8 E
end;
& \9 B4 @' D7 v" i7 y1 _9 _" vend; -- of the method4 L6 a7 ?0 p0 ~, Q8 I
|