/* called by: entrance ctrl of the object 'track' \+ Z' L6 o7 O5 l
*/
. D, d) P( S: j) }0 Nis
! O0 [( T/ m) Q% x* C1 j5 W part, GlobalDistObj, assignLObj:object;row,Lan:integer;
" F% T# Z' p0 s3 K* Zdo
$ R3 ~! q4 K1 H% L. A) j/ s! q Lan := rootfolder.Internal.Tools.AOLlanguage;8 G9 N$ M# M; V+ _
if current = @.Destination -- else return
: J1 F) u7 ?3 D9 s. Z, |& ?) n2 ~' [ then3 E( ]* |4 M" @/ u' k
@.Destination := void;
; R% M5 c# z* N3 r0 F if @.occupied then! _1 c: g+ E/ p
part := @.cont;
' y) J6 p7 }/ z- {0 `6 }3 V2 U. b @.transpOrder := void;
" z- f4 b2 ^6 L6 d( T' j part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,2 X, M7 e( g4 Z' _5 V
@,root.eventcontroller.simTime);
; G! H% j/ {, ]" S @.HasOrder := false;: F" ]" n" ]/ ?8 }
@.DrivingHome := true;5 Y' M0 Z2 ?; q& O: |
rgManager.tryToStartTransOrder;8 w* ]9 t$ I5 i. a
if @.Destination = void
+ ^9 W6 Y5 s4 O3 O4 q) a then -- no transport order for vehicle @
G6 ~& ~/ M& Y, ^+ N @.Destination :=9 q/ E! k( N+ E* R$ J2 Y
rgManager.nearestFreeStation(@,track.~);
4 N) |! B" ]- F3 n* W( u newDirection(@); ( Q/ J$ A- t: X
if @.Destination /= void then
- ]/ {6 n3 i7 D. A* U1 C( c @.Destination.NumReservation :=. f7 z0 s* i/ {* G' n6 |: D
@.Destination.NumReservation + 1;0 S# T, z7 a D/ K
end;% N8 p. z, f \4 x+ N9 j( R5 [
@.CurrIcon := "drivingHome";
/ L" l2 E3 s2 |; E2 P0 H @.DrivingHome := true;! Z& k7 n" G9 q
end;9 Q. _- S1 H; I4 e+ ]+ w" }
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
( h6 H! b8 y5 H! N# U part := @.transpOrder;% b8 M4 k3 F$ g* X
part.move(@);-- load part1 i' f2 S: \" v9 t2 W& }+ m
@.CurrIcon := "load";
$ {+ x2 V# s+ L: ]) O: A7 d GlobalDistObj := part.globDestination;
; A- E% |. k1 U. _2 X2 u0 Q assignLObj := rgmanager.rgAssignL;
2 |! l( k* d. D/ f2 p6 C row := assignLObj.getRowNo(GlobalDistObj); Q& q: F% e; |6 T* j$ x
if Row = -1 then -- since 70; ^' z! T! i( J& _
if lan=1 then1 a5 W4 i5 C' A% X$ T0 G) c% M3 Y
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
# }8 z3 h* w/ F/ p% d( L- \5 x) | to_str("in der Andockstation: \"",?.~.name,"\""));
1 r3 q& i7 v! h) h- N5 W4 @ else- _9 d3 a+ D, ]& j& J. g
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),) X( T+ S$ \0 v; ?
to_str("in docking station: \"",?.~.name,"\"")); 1 i2 S* Z4 s' J' W( D
end;, M* N" p) }9 F/ [6 P: \
else7 `& `+ G8 N( W4 U- {& D4 ~
@.Destination := assignLObj[1,row];
- x2 H( K) P" Y8 v6 X9 N end;
K+ [$ o! `4 a g0 P2 n newDirection(@);8 t1 `) P# b7 P8 M
@.HasOrder := true;
) W. @; J$ R$ V end;
; Y( A6 Y$ G' c" t end;# n* ~5 a' Q7 C, Z' {9 m
end; -- of the method9 F& u6 N- b: l
|