/* called by: entrance ctrl of the object 'track'5 \/ l: L4 c2 C) I
*/
2 p( Y% ]; q# z5 yis. h$ d5 h* C4 q* I
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
- y l3 t% E0 H6 D {/ x6 H8 l* ]do
; p: i3 A1 ~4 J' ~8 C d7 P Lan := rootfolder.Internal.Tools.AOLlanguage;; i, g& c9 Q6 s' s: a
if current = @.Destination -- else return: ?, B6 }6 e. ~3 Y/ i& g! `
then
/ x' o& H* G1 L5 N2 E2 h @.Destination := void;
+ F2 y$ D9 z. ^ if @.occupied then
) d+ [* W1 c$ A5 a: V2 [ part := @.cont;
& b" a/ w l5 P* ` @.transpOrder := void;$ D5 }; K) U. p5 u" E. S) x
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1, v8 `" `; w6 w
@,root.eventcontroller.simTime);
. F1 z& c7 ?! _: A. O5 N9 ` @.HasOrder := false;% O. {0 j+ P) ?0 _, E# W G: X
@.DrivingHome := true;! I6 o+ H% p* H# o
rgManager.tryToStartTransOrder;
6 {+ r% z8 r# d+ x+ s) Z if @.Destination = void6 N0 O' Q8 Y8 p0 B& z
then -- no transport order for vehicle @5 G& a' v. E# r+ n
@.Destination :=4 V- e, C) d: B5 Y) S
rgManager.nearestFreeStation(@,track.~);7 E) ?: o4 _5 O! J1 p2 B
newDirection(@);
, ~0 D) l R# w6 ?: W; W+ R' q! H3 p/ W if @.Destination /= void then9 V5 k# U% r& S2 g# _
@.Destination.NumReservation :=
C) ]+ a: {3 z3 a' {' R0 _! H @.Destination.NumReservation + 1;: N; B; z+ s5 F
end;; a* g$ i. L) w
@.CurrIcon := "drivingHome";2 ?2 r% k! [ a9 \/ W1 {- R: v, O
@.DrivingHome := true;
: ^2 ^* G% V9 c1 v* Q0 G end;. m, Z: v! }! O7 J
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
. N- c; d; ]7 @# u0 |2 f* o part := @.transpOrder;
$ \' e: L% Z! R9 d& @ part.move(@);-- load part
. f4 f8 J( T: Y$ k0 r @.CurrIcon := "load";4 u, Z# K# ?: N. ?
GlobalDistObj := part.globDestination;
_5 R# Q4 q8 e. h" k assignLObj := rgmanager.rgAssignL;, _! w) M2 \, q) E( @: j
row := assignLObj.getRowNo(GlobalDistObj);
+ D' f& m8 L6 M5 R& o: @ if Row = -1 then -- since 70
# O/ d' K5 o: ~& I: ?+ d0 f% w if lan=1 then
* n5 N7 _. W% b" Q7 d, r% S: ]6 b promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
6 n4 n0 a) s4 V. Y k% a+ v to_str("in der Andockstation: \"",?.~.name,"\""));) m) P9 l' C2 {0 A& Z
else* R9 P/ z3 u. C, U% x) C" \
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
* d, O7 Q( S, j4 [9 T to_str("in docking station: \"",?.~.name,"\"")); . s" U( S/ ^2 R z4 ?1 W( m; s4 y8 J
end;
7 ?, n: O2 t5 ~) |7 ^1 B9 _, S$ D else
+ n# S7 H3 D" R9 z5 d+ w @.Destination := assignLObj[1,row];! m6 h3 z; L! Z& P% v) e
end;
0 v2 ^4 u# y% |( @! u- J! b newDirection(@);) C1 J) @- l# ^3 q
@.HasOrder := true;
! f. _/ X5 Q7 |' |$ {4 E6 t2 }! L, f end;
- y$ o: d' ]$ J. `! f end;
W( }3 `( w; a4 x; S h& @/ Hend; -- of the method9 }% Z% w2 G+ R4 J" ]
|