/* called by: entrance ctrl of the object 'track'
' o, N# [) K5 }6 _! B% x*/' X. ^ ~2 E3 Y2 j
is; ^, E. ~8 R! v, s
part, GlobalDistObj, assignLObj:object;row,Lan:integer;/ O. ]2 d$ y2 H( s) Z; l* ^- v" `
do
$ Z( r3 V2 D e0 D/ n Lan := rootfolder.Internal.Tools.AOLlanguage;8 ~' d% X+ Q, m6 D# m5 q6 O& h
if current = @.Destination -- else return
* J3 k% v# |: J then
) ?, x& p4 D4 k @.Destination := void;& I6 v; c& A/ i, I/ f* d
if @.occupied then
; V/ T: f% a0 m) }9 U part := @.cont;8 ]# ^! H8 G6 |+ A
@.transpOrder := void;( T- W3 L& T4 k! [& N& C. Z
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,6 p, f; U( O& Z3 t+ z4 j
@,root.eventcontroller.simTime);! e/ a9 Y6 H& w9 z* _6 Y
@.HasOrder := false;
( G9 V/ F& @3 `4 v; Y* r8 K2 Y @.DrivingHome := true;
& |9 S; W" P$ a- E7 ~ rgManager.tryToStartTransOrder;
6 B( }3 J: t9 C2 h- [2 c if @.Destination = void
, U/ c' h: x* t- H S then -- no transport order for vehicle @
, @7 M" I4 l' h5 I: W" h @.Destination :=% N5 C7 c! o: h/ G: F' r
rgManager.nearestFreeStation(@,track.~);8 z) Q9 W" _' O5 n# s" }# } F+ r4 s
newDirection(@);
2 }; D% |/ G9 p if @.Destination /= void then8 m; Z1 R! @! o; G
@.Destination.NumReservation :=
9 z- Z* c7 t% K3 k6 D: {7 {7 U5 v @.Destination.NumReservation + 1;8 q `6 f. E. k9 }! i9 ^
end;
: R% }! R& {% ]1 v1 G7 g% y0 J @.CurrIcon := "drivingHome";
/ R+ ~# T Z+ t7 o @.DrivingHome := true;$ O( f- N7 R6 ^2 [2 u# O% O2 R; {3 Y8 n3 I
end;6 h% I' K2 n" u0 l* \
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
w+ }* E8 o: v# l) Q part := @.transpOrder;
) P6 x! U) L. A( L! n6 N+ } part.move(@);-- load part8 J) {2 Z; |% W; z( h# K1 s8 r
@.CurrIcon := "load";
2 d4 R) G2 k6 \5 I; g" k GlobalDistObj := part.globDestination;! b) k" b) @/ Z9 C: B1 J, P$ g! v
assignLObj := rgmanager.rgAssignL;$ X! F: I3 R! [& z, {
row := assignLObj.getRowNo(GlobalDistObj);
% _! |/ l1 V( ]) X) G$ K if Row = -1 then -- since 70
8 H! a/ Q( F. B$ |! h7 S if lan=1 then
( o5 F0 k7 B" r$ _9 R1 B4 s promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
7 F0 e5 q* x: h5 Q( Y9 z to_str("in der Andockstation: \"",?.~.name,"\""));' ]% P% Q! O7 M, p
else( Z3 j8 ]9 i, S% {1 _
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
$ m" q% Q+ B1 H6 ~0 s to_str("in docking station: \"",?.~.name,"\""));
7 w" h: D4 ]: ^# o end;
) B& t7 k1 O! d9 }4 n else
$ k# ]. h9 w# ?8 M& Y" a @.Destination := assignLObj[1,row];/ n" j# G) D/ m
end;
6 `: j6 r! ]2 U6 G3 N newDirection(@);
L6 v2 W; ]4 R. e @.HasOrder := true;
: V4 H8 f/ R5 l7 {3 E* t* B end;- I* R9 y! z+ W& N7 a
end;9 u1 M& M- U; B& @
end; -- of the method C/ q7 f: }) j
|