/* called by: entrance ctrl of the object 'track'7 J2 O3 ~# c6 ~2 F. Z* j
*/
+ v7 D! a+ \8 j1 Zis; k3 D* N/ l! L; c i l# i, H
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
6 I0 k# Y; s( `do
* @) I, B4 J# B9 Q& ~ Lan := rootfolder.Internal.Tools.AOLlanguage;% ^$ c7 M# T1 S
if current = @.Destination -- else return2 x0 O* V- o/ x' ~5 X
then/ J: R3 \( a# D7 S/ b R& S
@.Destination := void;, ~4 B3 v3 l: }6 K- @. @9 W* y
if @.occupied then
5 F* m4 u5 }+ M! I, r5 H7 r3 X2 T part := @.cont;) b" ]; Q u- g4 ]: }$ f
@.transpOrder := void;
- ^+ d1 n C+ l$ X: H" [& X part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,0 s. d. b8 s4 [# g
@,root.eventcontroller.simTime);
- y" l+ A0 Z+ p) w8 S2 z @.HasOrder := false;1 I0 ?" Z4 |8 }1 L o& E2 ]7 J
@.DrivingHome := true;0 A) u0 u/ G+ I1 _5 }/ w/ b/ t' g
rgManager.tryToStartTransOrder;1 X+ \9 J/ ~+ {
if @.Destination = void
) R1 p( }! g/ @; l# D then -- no transport order for vehicle @! b @, ~6 @ }5 R
@.Destination :=
$ R1 j+ x8 N" R( }9 z* s rgManager.nearestFreeStation(@,track.~);! ]! H' r8 W- R9 s/ `
newDirection(@);
- q7 |0 N# {3 B* y if @.Destination /= void then
) n5 g ~% y8 [ B5 {2 Z @.Destination.NumReservation :=
2 e( D% u }( ]8 C% }1 ^- g @.Destination.NumReservation + 1;) O# I3 c6 k' L. M" N Q4 T
end; f" ~8 p* h5 x: u# p
@.CurrIcon := "drivingHome";# a4 j) h) x) U7 @6 J! s3 a+ L2 H; Q
@.DrivingHome := true;
, ]6 `3 X" g4 Y3 ]- z1 y end;1 G* {+ M# h4 E/ p+ ]; G t
else -- the vehicle @ is empty, both vehicle and part are in the same dock station3 W, V. i! ?, c J
part := @.transpOrder;
+ _4 X2 g x9 ]2 a6 Z part.move(@);-- load part
5 Y% {, l0 F G+ e# g @.CurrIcon := "load";
- B5 K/ _9 x: v" o. y GlobalDistObj := part.globDestination;
! W. u5 C; u: N1 e/ N- S3 z8 ?2 f" B assignLObj := rgmanager.rgAssignL;
$ I* \, `8 t( y, f2 f4 G0 N row := assignLObj.getRowNo(GlobalDistObj);
' R( z: G1 y7 C2 ?: I# a* d" P; s if Row = -1 then -- since 70
3 ^. x0 J7 J: k4 \% ? P if lan=1 then
9 _" @2 O! h2 R- ^+ }# i% X: Q promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
; d! C8 O" l0 e, c; G to_str("in der Andockstation: \"",?.~.name,"\""));
# H$ v. E$ J/ g0 }+ z5 ~% f else$ r2 s% x- \3 k" L9 o3 F: G6 B
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),7 L9 q$ o. m- D' S* U; j* h
to_str("in docking station: \"",?.~.name,"\"")); % K# L: o7 q. f
end;
9 }, R W3 _1 j* ? else# Y" ?) |9 \/ X r7 F* l
@.Destination := assignLObj[1,row];/ Q6 W( E. o$ V- a! E5 N
end;
$ D' I8 t- _+ f6 C newDirection(@);
X: U6 ?$ `+ g) I. Y @.HasOrder := true;
^" A; V3 [; C+ f2 J end;
# I4 ?! P1 T% p3 _! o3 R end;
8 [: k& ?3 q) v. Qend; -- of the method
, x! \- F; s+ Q9 s% @& u* y( F, i5 } |