/* called by: entrance ctrl of the object 'track'
) b4 Y& r- G* V, f$ {*/
; X, b6 n5 Q1 s/ C" `is* U1 `: q0 ]; a, ]( o
part, GlobalDistObj, assignLObj:object;row,Lan:integer;% k7 I3 w+ f9 L/ m
do D! O" e, P' _) {4 D% W+ H
Lan := rootfolder.Internal.Tools.AOLlanguage;
/ Y H3 t8 d) d f if current = @.Destination -- else return; F( L$ U1 W. j2 J0 G3 I
then6 l( D+ e$ a( E. D# _
@.Destination := void;
, t3 G% I0 m8 h9 }# l/ k# ~, M if @.occupied then9 f* Q, v& S( l5 [) p; W G7 G
part := @.cont;
+ s! g% D$ [/ G9 S* } i @.transpOrder := void;# ?. {# b; E- f- N+ V
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,. m1 ^' _% ?! |) k4 r/ w4 R* ]
@,root.eventcontroller.simTime);
6 U# a- z% L, o' ?' ` @.HasOrder := false;- D7 \ C+ M2 U9 l1 Z$ g; d
@.DrivingHome := true;
6 A/ W6 h8 r& ]! E4 u/ z- W- F rgManager.tryToStartTransOrder;5 ?% A3 F6 c" M5 \1 H4 F
if @.Destination = void
6 v* P d( N6 }3 ^6 p then -- no transport order for vehicle @
2 q H/ t& o5 V* r/ a @.Destination :=5 w }3 R9 d* K+ S7 A: S
rgManager.nearestFreeStation(@,track.~);
+ p7 _7 B, s& d6 _# m newDirection(@); $ @% p9 I4 f- {" j
if @.Destination /= void then
0 b( m g: K1 L, B1 ? @.Destination.NumReservation :=! g* _8 f7 H0 z8 }( W1 L4 @
@.Destination.NumReservation + 1;/ e, M5 s- x# t- p! m
end;
' z5 i; {5 x9 e" h {5 B @.CurrIcon := "drivingHome";
. \- ?" T- j) W @.DrivingHome := true;8 J- V6 ?7 Y" A' L) q3 k7 l( C7 d
end;- s5 w6 K$ [9 [& H
else -- the vehicle @ is empty, both vehicle and part are in the same dock station, q. O9 i+ c$ m7 F. B ~
part := @.transpOrder;" j% p5 }) }) b7 H& I- B8 }* R6 E
part.move(@);-- load part
. J4 t7 w* I8 L @.CurrIcon := "load";; [6 Q; x% K. E6 v0 q. T
GlobalDistObj := part.globDestination;
- E6 V5 b8 z( S0 \8 R4 K% P assignLObj := rgmanager.rgAssignL;
( x e/ y6 [, P! d; v# \8 s8 o3 V row := assignLObj.getRowNo(GlobalDistObj);
2 e2 h, p ]+ c+ c ~* H# \+ C9 B if Row = -1 then -- since 706 ~0 ^5 u/ a$ o; m# b8 n
if lan=1 then g5 r& J6 M: H3 p. [
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),5 d5 o( Z7 |( ~# S- P8 M
to_str("in der Andockstation: \"",?.~.name,"\""));7 x8 y2 B% J- O1 l. M5 ^9 _+ ?/ P/ H o
else
! C8 [; N0 C1 _( O promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),2 q b1 [8 ^' J
to_str("in docking station: \"",?.~.name,"\"")); $ e- N: _2 a2 Y }: E
end;# i2 U$ U: ^' [2 s- F% w
else' h5 S9 m7 e" |/ w* ]+ U, O0 M
@.Destination := assignLObj[1,row];
+ W5 |5 o5 b6 N! @' P5 E end; " J- F9 o' E/ K! r- K
newDirection(@);
( ?2 Q$ R2 H. s5 y+ Y t. N) A0 s @.HasOrder := true;
$ G( E d2 M) z end;1 n, k+ c- X' @$ V9 r1 U1 p
end;
4 j0 `3 I S7 w. d* v) Z+ fend; -- of the method D" V1 X- A) l3 l. \3 V$ o
|