/* called by: entrance ctrl of the object 'track'
) o/ z$ j& U/ k+ i0 r; j3 J*/. B( {! B- {% }" q! P1 ^
is( m3 S, ~6 O% J B6 x0 U0 B
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
' K8 z% ]4 p" Q7 ^4 R) jdo/ E$ L% R. R8 V: o- h$ f
Lan := rootfolder.Internal.Tools.AOLlanguage;9 j: {4 g6 |$ ~9 y: k" n- K
if current = @.Destination -- else return
6 f+ b( {6 N; b. j6 E! V( z then1 Z4 k; E. H1 E6 p" n+ r
@.Destination := void;2 `* A" {# y K4 }& t
if @.occupied then+ L& s9 n5 ]- N# L! q
part := @.cont;
# `" E+ S6 t" D9 [, ~- l% x @.transpOrder := void;
1 Z* j" M' F+ L" E0 ~+ x/ ^ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,: I1 I( V* |" [) h3 {3 r
@,root.eventcontroller.simTime);+ w8 r; c, U |3 S8 S5 w
@.HasOrder := false;* ]6 i. q0 _6 {# q3 I5 \
@.DrivingHome := true;
' @( ^; e( g5 |6 W( S- ?. ?' f* t, v rgManager.tryToStartTransOrder;3 x2 f8 l' N1 _) N
if @.Destination = void
# v& E/ J, b( P- U1 Q then -- no transport order for vehicle @
5 U: Z0 V' l) _- W5 i7 L @.Destination :=3 G5 P- Q' w# ?5 ?! D c0 L
rgManager.nearestFreeStation(@,track.~);8 a) \/ Q# @, O }& ^ G. `" ]" L' d: D
newDirection(@); % H1 O2 J' X) i# _% K
if @.Destination /= void then
: F9 u) x7 Y: ^! S2 m @.Destination.NumReservation :=
6 k7 ?0 o. z( Z3 u* O @.Destination.NumReservation + 1;
( {& C8 ~4 R$ {/ F; v8 g2 e5 Q+ q end;
8 N! W' e0 ]- \3 `1 y+ C" U @.CurrIcon := "drivingHome";0 m; K1 h9 V: n8 T4 s
@.DrivingHome := true;
( y3 E$ _! ^1 s, ~9 O# i end;
2 K% ^1 Y' |9 H I3 E# a else -- the vehicle @ is empty, both vehicle and part are in the same dock station
8 S5 P3 T5 P6 G' |. K) Y part := @.transpOrder;: ? Z; R4 G% ?* `8 Y5 W B' N
part.move(@);-- load part
- l& t* V0 @2 X$ X5 x- B. c @.CurrIcon := "load";9 ]8 M2 e( M4 }
GlobalDistObj := part.globDestination;: n! h) S' P% N
assignLObj := rgmanager.rgAssignL;$ ?- N2 e" T* p
row := assignLObj.getRowNo(GlobalDistObj);
5 q. Q9 t# Z+ J$ J6 M0 z/ Q if Row = -1 then -- since 701 y2 K& c7 m1 c' X" x5 h
if lan=1 then2 R# i4 g* {/ P) Z0 @1 _$ y& v
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
! Y7 S }, b& E- o1 ^ to_str("in der Andockstation: \"",?.~.name,"\""));
% }% r0 ]5 e' }3 W' i8 u else
* W9 I# c6 X" n" d. E; ?- Q promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),' E: X+ R& t0 ~7 h. V
to_str("in docking station: \"",?.~.name,"\""));
* }* e: I3 T5 c- A: l end;
: J0 {" _( ?; Z! _6 c% z else
- o5 o6 H: m8 L3 `9 P4 s8 ? @.Destination := assignLObj[1,row];
2 m7 T/ X2 b9 Q, z end;
0 H5 v3 _, e9 V: G" Z, j; { newDirection(@);" {# m7 U& k, h* j: ]
@.HasOrder := true;5 o2 Y6 s" N# u' U' h
end;2 T3 D! v1 T' B9 X8 W
end;0 y, ]6 c# \ F0 Q. W/ E4 ?" _7 B% Z
end; -- of the method' y2 y) d$ |9 A J2 L0 Q
|