/* called by: entrance ctrl of the object 'track'+ ?% n* c; q& Y, w: c
*/
% k( b5 j8 H" R0 C- q& Y7 ris/ \6 b2 D1 E' ?/ f6 i, O/ `
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
7 n, H2 G& [6 `9 m# zdo
9 g `( a! B1 v: i* T Lan := rootfolder.Internal.Tools.AOLlanguage;
) m* ^! R* K" }, _+ @ if current = @.Destination -- else return' r, e+ X8 ]! s) T- ~6 C
then
/ F8 `# F, Z6 D @.Destination := void;) z; D+ S5 q$ H3 T
if @.occupied then, `! O6 H8 |- r8 H1 T, H
part := @.cont;5 j9 c0 u' V2 o$ u R0 U3 \" f$ E
@.transpOrder := void;
, H, }$ g7 M* k6 K* F part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
6 s2 b; N/ @6 u" W5 W @,root.eventcontroller.simTime);! l7 h4 c$ N# u: e, G3 |. c0 Q
@.HasOrder := false;
1 ~1 m4 x6 }0 B3 s M$ J. ^ @.DrivingHome := true;
) Q4 @- N' w. u rgManager.tryToStartTransOrder;$ O/ P& w) d. I7 q2 o' u6 w( Z. {
if @.Destination = void' D/ Z' k8 }: A2 e8 H4 i
then -- no transport order for vehicle @
& H* X: s" f' G @.Destination :=
& ^. E1 V8 O: u rgManager.nearestFreeStation(@,track.~);
! A2 ^) I( w4 o3 z newDirection(@);
: E( y4 _) N$ G# t; ^- { if @.Destination /= void then% K$ x8 W& T: W
@.Destination.NumReservation :=; L. q+ ?6 P+ \% s
@.Destination.NumReservation + 1;3 x' m6 L- E0 c$ [, y
end;' Z8 W5 X% S7 ]7 W) A: L
@.CurrIcon := "drivingHome";
- p5 [0 w' _6 U( F @.DrivingHome := true;! N5 ~4 |1 s O! f/ j
end;- l0 D6 a2 u/ B7 K8 w+ m" q* s
else -- the vehicle @ is empty, both vehicle and part are in the same dock station( K2 j: i: W+ a( [& R
part := @.transpOrder;1 Y# G0 _1 R: s' D" w4 t
part.move(@);-- load part: w( h: }2 ^; m2 d- \2 W
@.CurrIcon := "load";0 o y8 l8 r' b A; G: } O
GlobalDistObj := part.globDestination;' z: n! `# b$ ~# t o
assignLObj := rgmanager.rgAssignL;8 C, m9 d5 F+ e* w7 Z2 a2 o
row := assignLObj.getRowNo(GlobalDistObj);
! C- F1 W) J* |; c% b if Row = -1 then -- since 70
7 w, k% D4 }: X) T) }& H9 @" }! T if lan=1 then, r: M/ C. `) a* g! d8 {8 g3 t$ ~. [2 X
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
' [6 b( M# q4 i" q- ^9 u7 g. X to_str("in der Andockstation: \"",?.~.name,"\""));
; k x" D, a. s+ o else
& t) d2 _: N( b5 L( l% q3 }0 {' p promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
' z, f7 _6 {( n$ U: n) p% X$ Q2 f to_str("in docking station: \"",?.~.name,"\""));
$ m# W8 d% q5 U$ |$ w end;
k. c3 L4 X' m, d( Z' C) w( y, d5 a else
9 d' o4 W+ @1 t, z3 Z @.Destination := assignLObj[1,row];, d! \8 j! [, K J7 P& |' h6 h$ }
end; # r0 _" x1 k8 u' c I
newDirection(@);
5 h% z v! O7 k" T8 S7 p @.HasOrder := true;
: Z: s; J0 H; } h. E& G! K" ~! g end;
% G, }/ Z6 o+ k7 j# D end;
, W5 Z1 H& _) b" T& \end; -- of the method* B. V2 L2 @4 _4 k
|