/* called by: entrance ctrl of the object 'track'# e0 ]) O5 ^( y h; V( n! O* f2 x
*/1 ^' C- _" D! w% v
is% `( u, C, H9 f& L
part, GlobalDistObj, assignLObj:object;row,Lan:integer;8 k8 Z, ?/ Z9 ?5 J( Y- K. Z
do2 Q% F4 Z2 u& U% p4 c1 F1 |8 @* P S
Lan := rootfolder.Internal.Tools.AOLlanguage;' y, T7 a0 d5 i8 h
if current = @.Destination -- else return1 j8 y$ f2 [0 s5 z2 N% B# U0 c+ X7 c
then
' o0 ^6 f* E4 u. ^$ B! [ @.Destination := void;
Q% P' M$ t I, Y) U9 ^! g if @.occupied then" P- V& ?% h& a+ ~. C* e6 |
part := @.cont;# y/ A) d2 N' B& n
@.transpOrder := void;) @! k2 }& |4 U# U
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,/ O8 s+ l% }8 m) v& N Y `
@,root.eventcontroller.simTime);: X0 V7 r: N- p T) g& p
@.HasOrder := false;
6 A6 c0 f6 C) W) H! U4 }, C @.DrivingHome := true;2 ?7 v$ e% D- R( q* Z
rgManager.tryToStartTransOrder;: X1 V. V: B4 z+ C6 ~2 S
if @.Destination = void9 ]. V. w7 {; [
then -- no transport order for vehicle @
0 ^. _% t, u, D" Q" u0 O @.Destination :=
0 |6 s, \0 N' T rgManager.nearestFreeStation(@,track.~);
- S8 j+ }/ g) O- N0 ^, t: M newDirection(@); 1 w V( P3 W' Q8 n/ u
if @.Destination /= void then# f; S8 E) U& s: D! l7 Z
@.Destination.NumReservation :=
0 d$ W$ `7 [" s! g3 e @.Destination.NumReservation + 1;" I" H$ N3 _ e( t! o& S
end;
) C. J) ~- Y7 e0 P3 I( k( [ @.CurrIcon := "drivingHome";
) N$ I0 a0 j2 H# y/ v2 K @.DrivingHome := true;
% \/ C/ `. h, C7 b I5 K5 { end;- E ]8 {, ^' |. s7 y5 F
else -- the vehicle @ is empty, both vehicle and part are in the same dock station! S# w# p% L8 E0 D0 N- }( E
part := @.transpOrder;
, o# @8 W0 f& z/ e* L2 b part.move(@);-- load part
1 [3 f* Y! x0 z. @- r! X/ S+ @ @.CurrIcon := "load";
" }/ b4 L% n/ v" z+ J' B/ X7 ^ GlobalDistObj := part.globDestination;! }8 Z& M0 {9 A+ S
assignLObj := rgmanager.rgAssignL;
% j, p( u) ~8 S/ D row := assignLObj.getRowNo(GlobalDistObj);
, h. A# Q) z6 e# t* l3 I if Row = -1 then -- since 70) \- o- M4 e& \
if lan=1 then2 r' Y$ v1 H7 v, l+ T
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),1 ?9 }& e$ ^0 f* h0 ]; u2 M
to_str("in der Andockstation: \"",?.~.name,"\""));7 ~! z7 v2 ]4 a; a; J5 \% w( _8 n
else
$ z& Z3 M# r, _# B0 \+ M promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),3 r7 x3 O# d! B9 X7 \ b
to_str("in docking station: \"",?.~.name,"\""));
7 ~& c) Y2 C: f, I% }5 F end;5 D1 P9 l. a6 i8 j
else
$ O2 }. C* J( Q9 E, E' s @.Destination := assignLObj[1,row];
2 E5 o& U$ R) r2 x; t/ `; e end;
) i( g& r* w1 j1 S H, D newDirection(@);8 X3 d. v. Y. z7 q
@.HasOrder := true;
0 V3 _5 y0 @% @7 v0 E3 p1 k end;
% {) }% D$ T- e' c end;, g+ N* k+ `! H( o% T9 J
end; -- of the method& ^- Z" ?7 S/ r4 j1 n2 c
|