/* called by: entrance ctrl of the object 'track'
% W) A0 k9 `3 D. O A( H*/
; ?8 ^- Y4 K* B- N8 ]7 Gis/ z( {! E, g% K: f
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
$ _4 v: x+ S) C, Q5 hdo
) s0 M* g1 l H8 H Lan := rootfolder.Internal.Tools.AOLlanguage;
( v2 I# y5 T" U$ n* X" _1 B$ v if current = @.Destination -- else return" v. _9 G/ P. l8 T/ D6 K
then
' d: ^2 a$ K% K8 Q @.Destination := void;
/ x' n1 V# i2 [( Q4 S! L3 Z if @.occupied then
" Z, R9 e- M" @* T, K4 { part := @.cont;
3 x9 ~; C U3 R% F( ^& c3 J/ m @.transpOrder := void;- a# G( O6 i; _
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
+ q+ J( f. b( s3 e" ?0 y @,root.eventcontroller.simTime);$ W' t5 w, L6 w6 j* {$ X5 G
@.HasOrder := false;8 Z+ K7 }& j N2 s' i7 z* A! P
@.DrivingHome := true;5 R+ H& Y1 s* j. r% e: L) ~
rgManager.tryToStartTransOrder;( y! b _4 a6 Y! R5 U L$ }
if @.Destination = void
2 C2 k" w; e6 C% \- S, T4 h& a then -- no transport order for vehicle @
: m% `( \ F& T' u k3 f3 A, n @.Destination :=; _4 K, o7 l( q$ J
rgManager.nearestFreeStation(@,track.~);' P$ V6 g) u- m# D7 k& Z$ z
newDirection(@);
; [& T% }" L. x- e, ~5 a+ R if @.Destination /= void then
. D3 f; u) r/ _$ X3 x: a: l2 f @.Destination.NumReservation :=$ a% n) E. g Z3 ~1 C
@.Destination.NumReservation + 1;
v1 U; m8 \3 ^, @: r& I end;
. E/ ~1 q! L7 _. `) U9 c$ J8 u @.CurrIcon := "drivingHome";
) f* i+ A$ y6 n7 c2 y7 G* T @.DrivingHome := true;
$ l& t9 X& S6 q' \& B$ ` end;
! B3 _3 Q8 Y: A$ Y else -- the vehicle @ is empty, both vehicle and part are in the same dock station% M" h+ W$ i: V' C
part := @.transpOrder;; b) ^ V% i/ L3 @5 W e) Y
part.move(@);-- load part) s" k" o6 @% |/ e' T! Y- P
@.CurrIcon := "load";
/ g) k* k' |. d: X1 A& f6 G GlobalDistObj := part.globDestination;
+ N. C2 [1 U$ j+ r( j" X) Q9 I assignLObj := rgmanager.rgAssignL;
/ [# ^2 \7 {3 @: `$ u& y8 t( l row := assignLObj.getRowNo(GlobalDistObj);
% [9 s) W7 y% l& A! X" ?0 ?2 g; I! l if Row = -1 then -- since 70
3 }+ p: z1 R' @+ `$ Z' x if lan=1 then' v$ d- q9 @$ P" W; e6 U
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
6 n+ g, B7 P2 ]5 S$ L6 H to_str("in der Andockstation: \"",?.~.name,"\""));
% ~4 }; I( s" m4 G/ _, y! i else' C$ ^) v( I1 `/ o$ e$ H$ }
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
- D9 K& N/ W) u( O. K# P! h1 ^ to_str("in docking station: \"",?.~.name,"\"")); ! z" ?, t9 e* u- l- |
end;
/ u- a$ I$ v# \- P& W& o else
4 D0 h; u/ ^* K+ p* N# S, } @.Destination := assignLObj[1,row];
3 j. J$ o* B) M; ~# R: w- S1 i# } end; # x. h, a+ v2 g: F) X
newDirection(@);6 L. j0 F) u G
@.HasOrder := true;; f' T& x) d4 S
end;
|) ^+ n. r ]& O end;
0 g# L5 d2 G7 }; aend; -- of the method
2 C+ i7 w- y7 T |