/* called by: entrance ctrl of the object 'track'3 Z, O; y8 [8 w5 J
*/. v; Y/ g) K7 w% J. d, d
is1 A& [/ j1 P0 `8 X1 O1 o
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
9 j/ c* k+ C; y' m- _) Z& jdo3 b+ w9 ]7 C; O# ]' P1 e
Lan := rootfolder.Internal.Tools.AOLlanguage;8 E" n: R; p1 n, o
if current = @.Destination -- else return
4 S+ o' {- V# _, \5 P1 m then
# D& @ V: \$ e @.Destination := void;9 @* V; Q* ]7 |$ [6 g: e
if @.occupied then# m/ b% W0 `" l$ ~. m
part := @.cont;5 E3 L! b; ]. l- A0 @
@.transpOrder := void;* K3 ^! A( `& c! {* c; g6 S/ E3 l
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
$ p7 S7 z* o+ C; Q @,root.eventcontroller.simTime);8 y" e8 ?( }' R E9 L2 d
@.HasOrder := false;
" i s$ z( U# x Q7 r @.DrivingHome := true;
7 n" s/ L: B5 d/ }$ H rgManager.tryToStartTransOrder;" X$ o% m0 S0 B, V! J- y
if @.Destination = void
" |/ _6 v; M& _. a& W0 `! | then -- no transport order for vehicle @0 J9 I# ?1 p7 V6 P5 H, L4 |/ q
@.Destination :=9 f" u, h( q! z) E1 u- C: i
rgManager.nearestFreeStation(@,track.~);
G/ k4 P# z9 k1 k7 ^) P newDirection(@); 9 C% M0 z1 K# e
if @.Destination /= void then3 X$ x. S5 l/ I: G; [
@.Destination.NumReservation :=4 y9 x; H& i& G: R# W3 ~) k& ^
@.Destination.NumReservation + 1;8 t) H! N) i7 r% A$ ]% t \0 ~
end; G! d0 i, K3 `2 O2 o1 p
@.CurrIcon := "drivingHome";
" {/ c* o6 J) A: K7 n- j @.DrivingHome := true;
0 C' \/ _" q5 A; g- G) \ end;1 C8 I+ g# h* T$ i
else -- the vehicle @ is empty, both vehicle and part are in the same dock station% q U9 t0 F% Z4 M
part := @.transpOrder;
- L6 O- r7 P" @/ y( b part.move(@);-- load part& r2 `- E, r' g0 ?: s/ [
@.CurrIcon := "load";" ]/ `9 S# d4 \# K4 {/ [# f* K# X
GlobalDistObj := part.globDestination;
" Z: G+ q$ I" v6 ^9 q2 v8 m" Z assignLObj := rgmanager.rgAssignL;
, K% h5 ]! E+ J! G( y( ]! \ row := assignLObj.getRowNo(GlobalDistObj);% t5 \+ ~$ t9 p E" V
if Row = -1 then -- since 70% l; T: [. Q" W6 m( F
if lan=1 then* P* ~2 G4 @. G5 t2 v( N
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
' }7 [5 _; ]- A1 `. V to_str("in der Andockstation: \"",?.~.name,"\""));
1 m5 b u& Q5 w$ }$ Q0 G# | else/ C/ ^6 f% l% _' k
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""), ^' v- D/ m/ J0 }) C
to_str("in docking station: \"",?.~.name,"\"")); O: @6 d7 [; L4 M o# M
end;
" u& _ V% p% G else
* H' Q1 W+ \2 Y- O @.Destination := assignLObj[1,row];" L, g) u$ O0 x, B2 d3 @
end; 4 Q, i5 I2 c. I
newDirection(@);0 W9 v( b1 B' M1 ^+ [2 L
@.HasOrder := true;
) C3 {* I/ R) T; w end;& p" i- Y# ^ b# {1 W+ [
end;
6 |9 x1 f3 K9 |! E, ^ @end; -- of the method9 K8 ]3 X6 c4 |1 v, u$ p
|