/* called by: entrance ctrl of the object 'track'
+ w& N0 @' O8 r7 O9 z*/6 [0 |# m: Y9 f3 H) K% {9 F
is
) ~) e/ f$ z, H0 q. Y- t$ U6 N part, GlobalDistObj, assignLObj:object;row,Lan:integer;9 F6 i" T. O" {
do. |3 `( L' ^/ A1 o0 G9 z9 @! g3 L3 y
Lan := rootfolder.Internal.Tools.AOLlanguage;
. z: m5 i' x9 c5 K: a9 N3 _- l- U if current = @.Destination -- else return$ H- ^, z1 X N1 x. K# v% X
then
& @5 ]* K8 v4 v' n; M; _- K6 B @.Destination := void;3 p6 _8 ^' }+ g5 |) u
if @.occupied then
8 r+ K* h$ n: ~/ L- z part := @.cont;
: D# f2 L# {: V( v @.transpOrder := void;
- f9 N8 {- K* y part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,! S# I5 G2 E$ W
@,root.eventcontroller.simTime);: V( G4 t; l6 |
@.HasOrder := false;# ~5 c1 Q# l/ j& z' a) j
@.DrivingHome := true;
, I e+ f$ V* y+ |$ o/ R rgManager.tryToStartTransOrder;2 e% o$ v0 T5 V# }+ G4 v: g% d: k; H
if @.Destination = void
; p1 {. s9 F) Q: m7 D then -- no transport order for vehicle @
6 |. t! m3 x( {8 r6 l+ E @.Destination :=
0 y8 p8 N* u+ o: _: L) f' `1 J rgManager.nearestFreeStation(@,track.~);
: G3 w: A) {' B' _: r R; A F newDirection(@); : ?( e; Q1 S% t' Z8 j6 Y
if @.Destination /= void then
& h8 K+ `7 J! R" {$ t+ \ @.Destination.NumReservation :=, h1 G4 S; v* o$ e8 r3 d; {" V
@.Destination.NumReservation + 1;" ^6 k1 [" n4 V7 b8 y2 M
end; n5 A* l2 E, m, s% ?+ e
@.CurrIcon := "drivingHome";
1 l0 l% v2 f* \( Y @.DrivingHome := true;
! Z5 S$ B8 M5 f end;
7 ^ j8 N. t( v else -- the vehicle @ is empty, both vehicle and part are in the same dock station, R7 o' E. W& w- y
part := @.transpOrder;
' }; P7 S+ K: e8 z% ` part.move(@);-- load part
d$ b( i! q* {3 Y @.CurrIcon := "load";; M/ R9 ^2 ?, s7 z: _' R+ q+ l. z
GlobalDistObj := part.globDestination;
4 Y2 J4 Q( j2 B7 ?4 A: S assignLObj := rgmanager.rgAssignL;
# P9 ~2 p9 m! {4 U0 } row := assignLObj.getRowNo(GlobalDistObj);
0 c- @$ }0 p0 R if Row = -1 then -- since 70
/ \( k+ B H# h' d! b if lan=1 then
! J9 S2 b0 _( R9 F; B promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
' B1 g: |) h, f5 n1 z$ Z; g to_str("in der Andockstation: \"",?.~.name,"\""));9 \ ]& f% { j7 g. }- |
else; b. b0 I1 Y- y1 G5 w, I
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
1 y( q+ i) L9 w' H to_str("in docking station: \"",?.~.name,"\""));
7 ?; L$ L, ^* a7 ] end;2 I/ c6 ?- H D* Z% c% x$ m
else
D$ ~: T% d' z4 `$ v( L9 s @.Destination := assignLObj[1,row];
y J1 h. @# A7 Y' Y) K end;
2 A3 c; e+ k2 x( z e% B& [ newDirection(@);
6 {0 Z( I' `& P: ]3 H! V @.HasOrder := true;* v! A. b5 F2 e: s V. @
end;
) U6 D5 f8 i0 N( x1 ^- H u _ end;
, J" N, e9 u8 J" pend; -- of the method0 v: v/ t8 ]( V; {" M
|