/* called by: entrance ctrl of the object 'track'1 s1 H+ l0 y7 x) J8 x" z! |
*/
0 p/ V% G5 Q4 Z8 C5 n7 k# Bis) D& d2 ^; _8 T
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
* w1 |" _9 h7 pdo
' k* o) }7 ~% w, ?( P2 {3 A. \6 _ Lan := rootfolder.Internal.Tools.AOLlanguage;) ], ]" X$ |7 k0 \) x/ N; C
if current = @.Destination -- else return* @ T6 [% S/ h- D+ A
then
- o: R' d: H" X8 H. V+ @ @.Destination := void;( A, ~5 ~1 H; V3 r5 X9 {! \+ T
if @.occupied then# n( e; y) Y+ _1 z9 {) o+ ?+ P
part := @.cont;/ @( S3 `; ^) x- R
@.transpOrder := void;6 D( e) g6 \/ M2 c n; R5 l
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
' r% e8 k& e/ Z# o+ w# R @,root.eventcontroller.simTime);, Y$ w% H; F- `+ T( d4 y! B4 h0 @
@.HasOrder := false;! h, P+ K1 `7 W: `& ^- O
@.DrivingHome := true;: z7 u7 R* ^$ f& M
rgManager.tryToStartTransOrder;
# T2 O% A' F. D9 U3 h7 X3 T+ Y' D if @.Destination = void
/ f) Q) M. y- b5 c! x% ?$ F% i then -- no transport order for vehicle @2 d% J! i) \6 @6 P9 k
@.Destination :=
; K* U: `8 S6 |+ r4 c& S* p9 U rgManager.nearestFreeStation(@,track.~);& b( E" n) N/ D5 k; R8 \# P
newDirection(@);
0 m& A3 i6 T! l0 G if @.Destination /= void then
/ I% W3 K8 ^4 `4 q) \5 \ @.Destination.NumReservation :=
' Z3 U: h# |7 C7 @% Z @.Destination.NumReservation + 1;0 m7 U! R& e# x" l. G' d
end;
: k% t! Z t0 y* F @.CurrIcon := "drivingHome";
5 @5 D7 w+ t, Z& R: Z$ C @.DrivingHome := true;. S( ?, Z* I' E% E
end;
9 `+ r7 j u( m4 t else -- the vehicle @ is empty, both vehicle and part are in the same dock station
. G9 U( e3 b- O/ \+ H; _2 | part := @.transpOrder;
3 P+ h; b1 m/ x4 { part.move(@);-- load part
: l! P C6 ]3 {/ A3 k# y! _, _ @.CurrIcon := "load";
- f" y5 ? s3 Y) G GlobalDistObj := part.globDestination;9 P5 j9 k9 K0 |* y; U2 h
assignLObj := rgmanager.rgAssignL;& {4 `' o- I9 h* Y
row := assignLObj.getRowNo(GlobalDistObj);6 i7 {! r7 {! T
if Row = -1 then -- since 70
6 O1 E4 V! q0 X# c4 F0 W1 E! R if lan=1 then3 J8 U' W3 }1 u# J
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),6 Z1 [" x8 `: f- B- [
to_str("in der Andockstation: \"",?.~.name,"\""));! k% H$ A! _: Z2 S8 u
else
. u' l0 S8 P; e6 v0 T$ _$ B promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
! Z1 x" k6 K% I& @4 k9 U) }3 ] to_str("in docking station: \"",?.~.name,"\"")); + Y3 X: |. }& x' a2 z3 h
end;
' q: ?8 l( Z* m6 d2 Z% _& W else
2 F0 ]/ h/ u/ Z% D/ R& W5 `2 C3 T @.Destination := assignLObj[1,row];
, I% q+ ^5 `; z) A/ @ end; 7 M; A9 D. D7 ^; M) R
newDirection(@);
* d+ v( m9 p2 D @.HasOrder := true;
$ o$ i8 \) ^6 I6 @1 m# _ end;, f7 c7 F, h4 e2 Q' c+ P: Z
end;
3 F- k) z5 B) k+ R% uend; -- of the method2 N2 \% l/ f7 C' |
|