/* called by: entrance ctrl of the object 'track'
6 r# A, ~2 N5 A( ?$ G5 ?5 c8 m*/4 i, F- Y/ _& @ R" A3 z8 u
is
. Q! c' M* d+ w7 r& ? part, GlobalDistObj, assignLObj:object;row,Lan:integer;
& i+ A/ T" w* k8 ^2 _& ]: gdo
. C, m3 _7 \$ o$ | Lan := rootfolder.Internal.Tools.AOLlanguage;
$ ~- ~* ]; V& f& g8 E if current = @.Destination -- else return
( W" q# W+ N( ^% s3 Y then
! ~' i( p+ y: X @.Destination := void;
7 A: }3 B, \ _. y/ `3 h$ h+ v if @.occupied then+ @" D2 K" o, \5 `. v# w% s& P# v
part := @.cont;5 c7 h) D9 R( g( l$ K, R
@.transpOrder := void;* f* |: P3 B! T$ b$ B
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
, j5 `$ T/ z2 X @,root.eventcontroller.simTime);- u' ^ m4 }$ _% ?- h4 @5 @( O- D$ }
@.HasOrder := false;
. y+ U7 @9 s. s @.DrivingHome := true;
1 [- v1 g$ d. y! R: j/ h3 o. }: b rgManager.tryToStartTransOrder;
( {) \1 K& B* D9 f if @.Destination = void
& a" v2 N; }( ?; W) o) b6 m then -- no transport order for vehicle @
9 u5 U* v; C( a @.Destination :=/ f: `5 {9 c& N, ]
rgManager.nearestFreeStation(@,track.~);4 C4 q( f, H6 P1 G0 {( l
newDirection(@);
" z4 ~5 d" C6 K! Y4 ?5 p$ { if @.Destination /= void then; y; F a c7 K# M8 t
@.Destination.NumReservation :=
) K, o: O6 T3 M& X( v0 T; K5 _ @.Destination.NumReservation + 1;, w) a6 E0 v* q
end;9 k: ]3 [6 q7 ?
@.CurrIcon := "drivingHome";5 _3 }* ~9 L9 x5 q' ?
@.DrivingHome := true;
9 J$ b* B' G" \9 i, o/ F end;, E) a& r8 ~/ V4 z% V4 J0 y
else -- the vehicle @ is empty, both vehicle and part are in the same dock station; v( z+ L, G p2 a3 q* g
part := @.transpOrder;5 K) O+ [& a( J* D/ \
part.move(@);-- load part# s, [, A5 W( ~* X
@.CurrIcon := "load";
* c9 ]3 Q! Z2 \8 @# C GlobalDistObj := part.globDestination;- ^- B2 M+ T( |8 ^( h, i; r4 y! z
assignLObj := rgmanager.rgAssignL;
- a0 a& x& Y) W% U7 Z! O row := assignLObj.getRowNo(GlobalDistObj);
% e; A8 j+ J E# I: X if Row = -1 then -- since 704 F: H2 W* @6 z+ J
if lan=1 then4 d+ X% d j9 L
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),8 r8 k$ P- c" N0 s- F; G
to_str("in der Andockstation: \"",?.~.name,"\""));: l; z F9 J/ l; D
else9 @( [. }7 _6 ^/ ?
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
) F1 K6 o$ U) e8 O to_str("in docking station: \"",?.~.name,"\"")); ( |* D! p# y4 ]9 B' `! }. u
end;, T' |- Z: O2 L5 k7 E
else
, m1 @0 P6 f5 I2 b @.Destination := assignLObj[1,row];+ k% ^, ^& Z$ U8 H- K/ }, V$ k
end; 4 s% x% q6 \% v
newDirection(@);- [0 n0 Z) E4 c4 j3 m/ H) L
@.HasOrder := true;, t2 e9 C' a* V9 j) T3 c' ]6 E
end;* G+ ~, I" U5 t# ~2 L& b1 I; V J) C
end;
7 o0 A0 r6 h4 c' fend; -- of the method
6 v' }2 d+ A, g9 M( d0 M |