/* called by: entrance ctrl of the object 'track'. X5 E" m3 I1 h, K; w/ R7 {: F
*/
, q; Y" k& d. p& Z) Yis( N/ Q* t' o7 s' \4 N7 b
part, GlobalDistObj, assignLObj:object;row,Lan:integer;# h8 `( i6 m, s
do
/ | W$ M, l6 J' V Lan := rootfolder.Internal.Tools.AOLlanguage;" E/ U4 u/ ~, ]$ D# s. A
if current = @.Destination -- else return) V2 k" C! J0 a+ K
then
) s: G8 Q7 n( e* \# k/ [ @.Destination := void;- a6 K3 |2 l$ ~" ? M
if @.occupied then; @ y& S" W9 u8 a$ Q& V- S" b
part := @.cont;: B$ d9 S+ p' u5 p, Z Y
@.transpOrder := void;" r: Y: h6 j2 w) A3 ?' V' f: S* i: @5 A; p
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
0 p- Y; u/ l( \! D5 \6 p0 P @,root.eventcontroller.simTime);
& c& ^( b" N0 T: ^6 q1 \ @.HasOrder := false;
+ P0 R$ y$ V% ^- f& s) N @.DrivingHome := true;
6 a7 e5 e! V! b5 h( b8 L) d" d* \ rgManager.tryToStartTransOrder;
' `0 C, O/ C) e if @.Destination = void* w# Q/ g& b3 m" D. x6 x" ?* n
then -- no transport order for vehicle @8 ?$ I k3 W. h/ ]2 [; T; u: T
@.Destination :=! p, g7 l) _) t+ p' A
rgManager.nearestFreeStation(@,track.~);
; ^- N1 ?' N# m' v7 C; a* D3 s2 w newDirection(@); + m, Q2 g' f* A: y
if @.Destination /= void then9 P h+ J8 a- N% u: N8 t9 o/ w
@.Destination.NumReservation :=+ \% ^: V$ D! f( d1 A4 U+ t% s; p! X
@.Destination.NumReservation + 1;
5 T, ~% C' I( |5 t% ` end;6 [9 }( A b. k8 d1 e
@.CurrIcon := "drivingHome";& N$ p1 _8 z3 c- y7 \3 D- A
@.DrivingHome := true;
8 n# N( ~) g& d. Z+ i: c6 o end;8 L/ b0 g; e$ ~5 w' U3 i
else -- the vehicle @ is empty, both vehicle and part are in the same dock station7 \' x [) }: B1 g0 v
part := @.transpOrder;
2 L3 j Z& [( c1 Z2 @, G J part.move(@);-- load part
# f7 w R& Z4 K6 w2 ?( t @.CurrIcon := "load";# s# v! ^) S* `6 I
GlobalDistObj := part.globDestination;+ e/ ] ?/ |5 W
assignLObj := rgmanager.rgAssignL;
3 }( l6 B: \9 _3 H# C5 z( q row := assignLObj.getRowNo(GlobalDistObj);& k$ f) A2 l8 Q; a0 b; o
if Row = -1 then -- since 70
% m2 s5 n' M# r$ T0 k if lan=1 then& I9 W2 o8 F0 ?+ N- v7 J+ z
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
+ o% n! j: h: I) R! T; _ to_str("in der Andockstation: \"",?.~.name,"\""));
3 s' I) d# a6 k else3 L' M' [# v. s! m
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),' l$ M, m0 |% W; F7 z; l
to_str("in docking station: \"",?.~.name,"\""));
+ V3 O. W/ s7 k9 T& ]( ~6 Z3 F* F8 Z end;
0 |% c; H+ Y% B& f( U9 ]8 R& M" F else' D9 x( I; A5 G" o; F9 u6 o- Y/ B
@.Destination := assignLObj[1,row];" _2 B7 j/ s% g6 e/ Q) ?. Y
end;
; I9 {$ j q/ s7 y' L newDirection(@);- o6 C/ w+ O+ X- I
@.HasOrder := true;
3 y3 ?, `% s y3 {) g- k) A end;: z1 p$ g* l4 r) u) H' s
end;
1 z$ q7 ~7 b+ ^' Fend; -- of the method6 L# b# |3 D4 v8 R6 w% h: u8 M
|