/* called by: entrance ctrl of the object 'track'! z) v, s7 q4 u4 f
*/
, l* `7 w/ E* r! fis
* m8 |5 U3 }% f! d part, GlobalDistObj, assignLObj:object;row,Lan:integer;! x/ C4 @, S8 _" T9 |
do
6 C, ]# F; P3 \ U' F Lan := rootfolder.Internal.Tools.AOLlanguage;
6 N# y% _ E" V3 N+ `) T o- ? if current = @.Destination -- else return& W0 r( h/ [6 b! T1 T
then4 N9 j. [0 O& e/ G" g3 N, f
@.Destination := void;$ W5 U3 \4 ^0 s& }
if @.occupied then" |9 f v5 w Y, B7 ]! q% ^, D
part := @.cont;
1 |0 i; x) l4 F; a @.transpOrder := void;
# C, Y! Y* J7 o2 K! K) j part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
- b+ V* K0 M" s9 D- I4 L( g* S# g @,root.eventcontroller.simTime);0 m8 T8 E2 g# ?7 h
@.HasOrder := false;. S; j; @8 W9 y+ q
@.DrivingHome := true;# ]& o6 O! P* B6 x1 u- ]
rgManager.tryToStartTransOrder; ~& H1 c6 \4 C8 ]- d/ S" b
if @.Destination = void! m' x( `& @( b, Y8 @
then -- no transport order for vehicle @
, G( I Y# b* f7 n, K/ q @.Destination :=
. p. f9 A1 ~! T! T2 @& d rgManager.nearestFreeStation(@,track.~);, D! a- ]: j+ W
newDirection(@); ) z8 y. S1 W0 `/ u
if @.Destination /= void then E" ]4 d) S' y/ ]7 Q$ Y% _
@.Destination.NumReservation :=1 H: g i9 _. }# X
@.Destination.NumReservation + 1;, e$ l2 e$ ^* X J q; {9 Q
end;
1 M% h w8 F2 G @.CurrIcon := "drivingHome";
( }# ~0 b! u- b5 R$ Z9 d @.DrivingHome := true;9 b8 m0 |/ Q' `
end;% p, ?8 I& M( i
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
2 n. D* S" A. m3 x; S$ u% J part := @.transpOrder;, |( }9 Z, y+ T _2 h
part.move(@);-- load part
- ]+ ~7 r/ W/ j* C @.CurrIcon := "load";
l P7 F8 N1 `. v2 t$ l4 y GlobalDistObj := part.globDestination;
! Y ~9 y! c1 L4 u% b$ G assignLObj := rgmanager.rgAssignL;
1 ^. [* I$ F% q8 Y row := assignLObj.getRowNo(GlobalDistObj);! z- P! G f: ^/ K6 X' I2 p2 V
if Row = -1 then -- since 70) d* ?1 Q; H N, U7 y1 m
if lan=1 then
3 N9 z+ Z4 q3 a! @" M+ l' B promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
2 m; Y2 X! W8 X4 T; m: D7 _ to_str("in der Andockstation: \"",?.~.name,"\""));
9 K1 k" t: b& |: r$ D: W else% D+ V: i6 w, R
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),* c2 H! o* K# ~$ b3 n
to_str("in docking station: \"",?.~.name,"\"")); / c* @" e. [$ N. A# R' [9 J9 F, \
end;
4 T; A' I+ _0 D: k d! L else
0 S( Y4 l: G$ q5 c @.Destination := assignLObj[1,row];
8 o8 a! v. o, p0 ^0 i& u end;
6 }" f) |) g6 r$ z8 K4 u newDirection(@);
, M! f. \9 x& g* _- k+ s. K$ R @.HasOrder := true;: n2 j1 Q; G& y& m
end;7 p+ z$ W! M R- R( x, K5 X
end;
- {" z+ V# B; _( b0 _, d. Aend; -- of the method
P, ?/ P9 S* I& D" T |