/* called by: entrance ctrl of the object 'track': u* _1 R: x9 T7 x; j' }
*/
9 I7 C0 }( m1 } D; F* ~; ?. Uis8 p$ H! @/ f& Q7 Z/ W% O: ^
part, GlobalDistObj, assignLObj:object;row,Lan:integer;, n8 h3 x, K( i
do
( w/ }9 h9 |7 y6 A4 d0 P Lan := rootfolder.Internal.Tools.AOLlanguage;
7 K' ]7 Q: t, c& z5 B( m1 X if current = @.Destination -- else return, c) c+ [5 n/ G7 }
then
3 ~, ~* A. x. l- u1 V6 ^ @.Destination := void;
& @% e% s; Z9 B/ ?" f5 r2 A if @.occupied then
7 I- e# F5 c4 X$ }8 ? part := @.cont;
v B% D! z9 R R# w. {* F @.transpOrder := void;4 @7 V" P+ q/ S; U& W- z
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
: _. t% n; D. T @,root.eventcontroller.simTime);# g$ u- c+ Z. y3 E+ [" [
@.HasOrder := false;1 w/ z" ?" I t: ?- }
@.DrivingHome := true;
/ M4 ?- m4 K: L! F% m rgManager.tryToStartTransOrder;
, q. G: R4 v4 ]/ {+ K/ p if @.Destination = void3 S# G- X u% v( t9 D
then -- no transport order for vehicle @3 I: _! F% |4 | c. F
@.Destination :=4 p: d% O1 C& m! N/ L6 b
rgManager.nearestFreeStation(@,track.~);: X8 y9 g9 i6 i: d
newDirection(@);
! w. s# e0 Y! J' ?; N0 O if @.Destination /= void then3 `9 g3 H. x* N/ N' E
@.Destination.NumReservation :=
* b+ d7 j, U V1 a8 T" r @.Destination.NumReservation + 1;
8 M/ f- W9 u0 C3 g$ [ end;
4 g/ K9 r( S; R @.CurrIcon := "drivingHome";% m% V9 V! ^/ k9 r, n! A2 @ Z
@.DrivingHome := true;: y6 h) k, _& R# k' G; ^
end;
# \3 u `1 k2 [0 A1 a else -- the vehicle @ is empty, both vehicle and part are in the same dock station4 T$ ]/ h* o7 [1 {, j
part := @.transpOrder;* m+ A5 N' O( y! b, b
part.move(@);-- load part
. ~* R& [& P2 \$ B# H, n @.CurrIcon := "load";
+ U, o, M4 E+ l+ B: T GlobalDistObj := part.globDestination;
4 e: S3 t% X; r2 d9 Y" F! } assignLObj := rgmanager.rgAssignL;2 @& E; ?$ |# Y9 U0 }; h- s J$ h
row := assignLObj.getRowNo(GlobalDistObj);2 R. D2 q& n* A+ ?4 V3 b
if Row = -1 then -- since 70, x; X5 c* _+ H. B5 V r
if lan=1 then
4 ]6 \; S$ K: \8 L% {4 m. _$ ^ promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),6 H% b% j5 I9 g# y2 W
to_str("in der Andockstation: \"",?.~.name,"\""));3 L! v: `: ^) `' H( S
else/ C3 g* C ^+ r2 B4 _8 l! j& G9 q
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
7 E! U& I! T6 x, k! | to_str("in docking station: \"",?.~.name,"\""));
& F" ?7 N! a% B, N) d6 D) S+ o end;; j. V3 C W4 O, | H
else
$ T- X D5 a$ `+ t @.Destination := assignLObj[1,row];! @3 X& z! |1 Z- G
end; 5 s8 `2 p' q% q( Q" r& ^
newDirection(@);/ \ @6 I! V2 G& u8 T& f* L2 a
@.HasOrder := true;
5 s! Z- H6 [4 K) h2 P end;+ R: d& R5 K; \
end;
5 I' w: O2 r5 L- o! Jend; -- of the method3 m- z& @! i, B: y" R+ B
|