/* called by: entrance ctrl of the object 'track'
S. E7 }' C% f2 e# ]*/5 r% w. H8 S5 ~/ f! `
is
5 Q# d/ d% R( _ u part, GlobalDistObj, assignLObj:object;row,Lan:integer;
- f+ c7 w$ t( b! {( c! d$ l ndo
/ z8 y) T( F& G/ L& _$ A$ Y7 k Lan := rootfolder.Internal.Tools.AOLlanguage;
* D0 D- h5 R9 b/ a) M+ o if current = @.Destination -- else return
* _! T1 w5 D& x5 b( i then) ?$ D* ?; O! s% `" B& q% [ M8 x
@.Destination := void;, Z7 |0 L: S: h! d
if @.occupied then; S! W+ t7 c6 v9 d. V# Z5 z$ b5 P8 P6 }
part := @.cont;7 _1 X5 [' i- ~4 z" o5 W
@.transpOrder := void;
. W3 n+ L6 ]4 X/ K part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
- u( ]# K- s& f3 E9 C @,root.eventcontroller.simTime);
# i. a3 t4 R! C' s2 H @.HasOrder := false;
2 |- c) B! p; ]/ r( P- v @.DrivingHome := true;; a k8 I% W, u1 l) I' j
rgManager.tryToStartTransOrder;
# V% b6 F; I' E/ T4 H3 O H p if @.Destination = void
7 }1 @9 o z' z then -- no transport order for vehicle @. @) A: i% M7 x; y' v, ~
@.Destination :=# H7 m9 v. o9 E* Z
rgManager.nearestFreeStation(@,track.~);, s- X6 U) N! \3 y
newDirection(@); 5 H9 I- A. A" z' M7 U
if @.Destination /= void then
+ N( d: \( T$ \$ s* s @.Destination.NumReservation :=
5 f! d4 g, T# e$ u @.Destination.NumReservation + 1;
2 C g% s. f7 n# ^; R end;
" D, L5 J( D7 R& a* n @.CurrIcon := "drivingHome";9 k+ x5 Q s( i' q
@.DrivingHome := true;0 g& i" p1 g! m3 a8 r
end;
4 c9 q+ M6 `* H/ C# I8 ]; u4 b) t8 W else -- the vehicle @ is empty, both vehicle and part are in the same dock station
2 r$ z* b$ ^( a5 }4 h/ s part := @.transpOrder;, G) Z' `/ q( R6 I3 j$ f; x. H0 F7 K
part.move(@);-- load part/ z$ W1 n( k% U, B
@.CurrIcon := "load";( O: h7 i: x" F/ ]. y# a m+ h
GlobalDistObj := part.globDestination;1 ^# I* h% T" `3 ~" e/ k
assignLObj := rgmanager.rgAssignL;
: ?( @$ m4 z1 w/ _( N6 w9 E row := assignLObj.getRowNo(GlobalDistObj);/ _& y- \! Z. A/ e, ?5 K0 c
if Row = -1 then -- since 70) h% h# S9 S7 l% ~* W7 z6 c
if lan=1 then* y; b4 Y7 H: } L3 \
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
" I; n* r" o' F to_str("in der Andockstation: \"",?.~.name,"\""));
( O# s2 e( @) W" y else# t! c) _# _2 g2 e
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),: |5 ~8 V8 `& w p
to_str("in docking station: \"",?.~.name,"\"")); $ N6 k+ i- T% e6 r1 R8 G1 e" S! @
end;1 C1 P8 J; G' u: x. F2 d# a3 o; c
else
8 Y1 f9 I }% S# V0 w5 g( m9 R @.Destination := assignLObj[1,row];. ]; Q9 o& n8 Z: ?* c* `$ l! Q
end; 4 _, t K) r9 Q$ W6 @: ?
newDirection(@);) X, V" ^' U5 S" w8 B7 O8 x
@.HasOrder := true;
( L! n) w% Z8 ] end;
7 U# I- f: C0 l$ |8 Z! A9 D1 G end;
g9 B2 @# I0 jend; -- of the method1 y* |# ]' Q+ l- S+ J3 m5 X
|