/* called by: entrance ctrl of the object 'track'
, E6 x5 u1 }" n" k8 ~6 A! R9 h*/
: u- ^! l0 i# J% Y6 Wis R; s' Q$ Z8 ?8 k! E3 y
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
! d: N, j+ E- J) R% }; ~! `' gdo @ G0 g. J2 J" T' t- P
Lan := rootfolder.Internal.Tools.AOLlanguage;: d7 g5 B" Z3 z( t( v
if current = @.Destination -- else return& q8 {/ K1 k4 X
then
& U: F! h; {) m) n7 u @.Destination := void;
/ p1 v: P e0 I* S if @.occupied then R) Y! M2 ?) c; |
part := @.cont;' y* z; S2 b6 x' ^, I4 N
@.transpOrder := void;
" q$ B D' o6 _) V$ R part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,' ?! h5 o( G) G. l2 B
@,root.eventcontroller.simTime); f! K+ p9 @9 S
@.HasOrder := false;4 j7 L, o$ n7 s& R% D; k5 L
@.DrivingHome := true;$ G1 [: ^9 J/ Z+ J* m7 Y9 p+ P
rgManager.tryToStartTransOrder; J7 C1 z0 F" u2 B F8 k
if @.Destination = void
% k. h. t+ R5 N4 x0 `5 W$ F0 I then -- no transport order for vehicle @& {. @! D9 l# H7 H* X9 }! `( t
@.Destination :=+ K: ~0 V! ?( \- M
rgManager.nearestFreeStation(@,track.~);. ~: y4 i" P% r& ]
newDirection(@);
6 G/ L2 j% m3 i0 \0 I if @.Destination /= void then
7 {9 T* A* U/ X) r) a9 j @.Destination.NumReservation :=; d0 _& Z9 n9 E3 v/ t: ~6 T
@.Destination.NumReservation + 1;
9 f/ ^5 R( }; x6 E$ G1 H! V# {, R end;
/ j, E3 l4 f, `& `- n @.CurrIcon := "drivingHome";3 \' I( F- Z# X0 Y+ b
@.DrivingHome := true;4 f$ E: j6 u( B; h
end;2 H. E4 l! `' ^" T9 z
else -- the vehicle @ is empty, both vehicle and part are in the same dock station! B7 q5 Q9 f' a8 _
part := @.transpOrder; k/ y& C- F% q i: ]3 C6 C$ R
part.move(@);-- load part+ c/ t! {7 R" r- {0 z
@.CurrIcon := "load";
( Y. n/ P* |$ X0 y" B( ` GlobalDistObj := part.globDestination;0 C0 `/ v$ @1 u
assignLObj := rgmanager.rgAssignL;
' d! L8 x* @; g row := assignLObj.getRowNo(GlobalDistObj);
. E: W" o4 L n: c if Row = -1 then -- since 70
- o% u5 `7 `3 M3 B9 \/ ^" e+ Z& o if lan=1 then" U* u/ ~. Y% H( Q8 v+ M
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
+ [" k2 e u( u o, @3 q! |# G to_str("in der Andockstation: \"",?.~.name,"\""));
: `2 P0 q l( `% S else
F# h, q6 r; d6 e promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
7 ~1 O/ U3 i( P8 d, G7 z to_str("in docking station: \"",?.~.name,"\"")); 2 m, o5 C6 w8 A, r! X; L) T
end;, Z4 ]; J. c7 W7 K! g
else) V4 R0 n' R6 ^8 r
@.Destination := assignLObj[1,row];+ g! e* L) ^" \( f! _
end;
& x5 V7 w7 g: V" T+ k5 m6 c newDirection(@);+ h" T; f2 a+ n/ o
@.HasOrder := true;
" i0 s' b' C; c( Z6 u end;' Y" R- Z) w5 o+ ^5 h* H4 y- ]* a
end;) i; |9 M+ {1 q* `# F
end; -- of the method* V, k- @, l; U8 p6 a
|