/* called by: entrance ctrl of the object 'track'
2 M( k" I# x" A* |% _: p& \* I*/
& f! B3 m6 ?8 E" Xis; t; G6 x; D. c/ F# h3 L6 }+ R
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
/ Y4 W4 C# A% ydo
+ @* I8 a1 a5 i8 w! w# C Lan := rootfolder.Internal.Tools.AOLlanguage;
4 N' U+ X" |% `" u' u if current = @.Destination -- else return. ~2 z% Z' t% T4 E3 m
then& B1 ?# C4 a7 w8 R
@.Destination := void;( R. p: u7 C, H) U9 `# R' j6 R
if @.occupied then) ]: [* r7 {, Y4 |# s2 |
part := @.cont;3 U5 L; \+ v1 O& A/ h* k
@.transpOrder := void;
& Z P' K& B1 Y$ J" H part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1," k9 g( s5 c- L! n& j" A. ^
@,root.eventcontroller.simTime);% s6 F' m0 X6 g1 P& I. }& ^
@.HasOrder := false;* E# d4 z' C2 ?7 f1 H
@.DrivingHome := true;
+ S6 q ~, b. i) A rgManager.tryToStartTransOrder;1 y i' D- V- r9 P/ O
if @.Destination = void
( ~$ R1 P- ]) F _# [- j3 |- s then -- no transport order for vehicle @' e o' l8 l1 L! v( b
@.Destination :=
/ Y \/ ~; Q. v4 J5 I {! q3 q rgManager.nearestFreeStation(@,track.~);
o# }: J0 u% N. E3 O9 U newDirection(@);
4 Z& w' f6 `$ e) {. t) ?& x if @.Destination /= void then
& m* J, z3 H! K* X. B# u8 r5 f @.Destination.NumReservation :=& X4 d. N [; z' d% q
@.Destination.NumReservation + 1;4 F) y, L) ^& h7 B
end;
8 c& ]7 ^/ x1 ^) w @.CurrIcon := "drivingHome";& V. R/ [4 L0 M' ~9 H1 G
@.DrivingHome := true;
. p( s( `( [: w" D. { end;
: j5 ^" @; H9 D7 q g else -- the vehicle @ is empty, both vehicle and part are in the same dock station, D" y7 W6 m' Z! y
part := @.transpOrder;6 v/ m. v1 G; u, U7 T! m
part.move(@);-- load part
: J2 m# s, L, h @.CurrIcon := "load";2 a2 }1 S& U" _6 v6 J
GlobalDistObj := part.globDestination;% l' Y4 R- _1 ^
assignLObj := rgmanager.rgAssignL;7 Z9 e' S5 E. ~/ w% S
row := assignLObj.getRowNo(GlobalDistObj);; y" X9 u- }1 G- i& f- E
if Row = -1 then -- since 70
; U2 A% @$ j' V/ [7 V if lan=1 then
# ^4 f: m; x6 Q3 J/ C) \, U promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
3 F* k2 I+ Y( a7 C+ {# y" V to_str("in der Andockstation: \"",?.~.name,"\""));
# o) b0 ~, U& f else1 a% v6 x2 J: J/ f& F( s8 d& y
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
* B" i/ D1 b7 W. D# v! K to_str("in docking station: \"",?.~.name,"\""));
4 K) a/ U$ l5 ~8 z6 r8 C ?4 A end;: B6 |. V" u( c; l' D
else3 ~! X5 M- c/ m0 u
@.Destination := assignLObj[1,row];( P" f, i6 u* M/ ]+ k* g3 S' F
end; ; Y3 ]; d% n0 B/ k, h
newDirection(@);
/ D% _+ \% N9 _! e' c @.HasOrder := true; f2 U9 f4 ?1 \, x+ C; R3 z0 m
end;' U8 Y+ {" P! {! B4 g
end;% ]. b1 e% U( v$ P/ {
end; -- of the method. P r1 l ]. E2 V
|