/* called by: entrance ctrl of the object 'track'( z' X0 z2 f" F' A6 }
*/5 ~9 T4 K' K' K1 \1 w a
is8 R+ w3 M) G! |* V2 U
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
1 A$ G. |% G; y' r# o$ _do
4 p/ u+ S+ }& a- R6 b) ? Lan := rootfolder.Internal.Tools.AOLlanguage;4 t* \" r1 u9 g, S6 _2 W6 X; P
if current = @.Destination -- else return
0 E8 L( @' P" B then
) C& a7 w' A2 C9 ?5 g @.Destination := void;
+ V& |" b4 _' A/ x7 f8 p7 ` if @.occupied then' a9 X k# ?( ^
part := @.cont;( _' Z7 y: C1 {: u
@.transpOrder := void;& n, n' B, a. s4 S5 g5 d
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,; I6 |$ W# d! ^, Z
@,root.eventcontroller.simTime);
6 G# i- J: a' W L. M @.HasOrder := false;
: D* Q+ k6 v: b5 [- V* t, P @.DrivingHome := true;
3 j V7 {5 U* N r/ ?2 i rgManager.tryToStartTransOrder;3 C3 h5 B% G" `5 K0 u3 e1 x
if @.Destination = void
# u* R5 {; Z: A then -- no transport order for vehicle @
y; O) m) J( j' u& c4 _ @.Destination :=
2 i" q9 x v3 ]$ p/ I rgManager.nearestFreeStation(@,track.~);. Z: [0 m; r/ u
newDirection(@); * e8 H/ l# @3 Q' Q; D& n( M4 ~
if @.Destination /= void then# S% w( y% X% _2 T$ k* b
@.Destination.NumReservation :=
/ B6 `7 T, a" u @.Destination.NumReservation + 1;
. D1 l3 Z1 J! e/ u7 F! x! f; N' `- _ K end;
$ {! c- w" ]# v6 w3 V6 _; l @.CurrIcon := "drivingHome";/ C+ j* S' q0 q9 a3 K
@.DrivingHome := true;0 U2 [2 k9 |. X$ D. M
end;
u( O/ |* O! x4 C2 \: m* J( ` else -- the vehicle @ is empty, both vehicle and part are in the same dock station
/ M& u5 ]" C& {8 }# y% q# E part := @.transpOrder;
" o! }: ~* v( n v5 ~" D part.move(@);-- load part
: p2 G8 _1 L3 J* n! @ @.CurrIcon := "load";
8 u) h& y; a+ U GlobalDistObj := part.globDestination;
8 G9 v, ~- M* {+ J2 r3 R assignLObj := rgmanager.rgAssignL;* Y, A1 U: o4 M6 R, _
row := assignLObj.getRowNo(GlobalDistObj);
) o8 q" Y+ p; z7 G+ D" a if Row = -1 then -- since 70
% H c+ L2 Y1 P9 h# u4 Y if lan=1 then+ d' J2 {* f$ i0 N* ?0 @% c
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
: U: v" C8 H4 q. e to_str("in der Andockstation: \"",?.~.name,"\""));
6 A, R: o1 \; v I9 A else
1 U7 R0 f! i9 M promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
e; S# \+ y; \! b' }$ L8 n to_str("in docking station: \"",?.~.name,"\"")); + B% s8 Y$ W% \
end;/ q( h% N8 i, _# t- v
else# {7 p( D4 ~9 c- b" y# a6 B2 Y* u
@.Destination := assignLObj[1,row];
# Y: ^1 b8 n# U- H7 i, j end; . n* O. N0 Y' Q+ J. l0 a
newDirection(@);
6 D, }! z7 X9 ?, d) Z0 Z! A3 C @.HasOrder := true;
/ I5 N: g# ?7 N/ Y) {! s, n end;" J( K- M& N7 ~) w
end;
9 Y i4 ~6 u& T0 n- ~: E& @end; -- of the method. M1 n0 C8 F4 l+ v) D$ Y! v7 D
|