/* called by: entrance ctrl of the object 'track'
3 m. o7 L( h- H: r/ h+ e# K+ r*/
& `# _* P8 ~& S8 w* W! Tis
5 ?* N. ~6 N: P, w part, GlobalDistObj, assignLObj:object;row,Lan:integer;
, v. R0 ~' [& S& r U- q' h. Ndo, {6 h6 I1 I6 T+ h3 t$ \8 a# T
Lan := rootfolder.Internal.Tools.AOLlanguage;& T6 p) H& x& y+ e% C9 c
if current = @.Destination -- else return2 H) O7 S3 d4 r: X+ m4 B3 [ F5 \
then0 c) `2 w8 {" M' h5 @8 i/ V
@.Destination := void;
% k3 f! X$ @0 e% G if @.occupied then) \6 h% |* d- \, G- {9 \4 l
part := @.cont;
* U* q- Z, \5 f: \9 B- C @.transpOrder := void;, U- [9 D$ S1 \0 M( i
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,' R9 U, g# f! T4 f& I
@,root.eventcontroller.simTime);
6 S7 n% @6 H. e5 ^7 f. f/ g7 A( | @.HasOrder := false;4 `! W' _% D {. A: P6 k. E$ m
@.DrivingHome := true;
! u/ }% d: g' f4 J; N+ H rgManager.tryToStartTransOrder;
( i" }+ @0 K% @0 T: Z if @.Destination = void
" z0 f% k' i: S- z5 \ then -- no transport order for vehicle @0 z/ w, n2 |3 y$ w
@.Destination :=
! P) r" u! l) N6 ^* I1 p rgManager.nearestFreeStation(@,track.~);
) R, Q3 r" N! H8 l* ] newDirection(@);
3 _0 c: O- \$ l* H7 W if @.Destination /= void then `6 F' E6 ?4 d. Y# B x2 n
@.Destination.NumReservation :=" W! @2 @& B$ `: a0 A
@.Destination.NumReservation + 1;
- q# D$ b* }$ J2 R9 c8 I1 n$ w end;
8 C+ e4 t% Y0 [! z* _ @.CurrIcon := "drivingHome";" g4 j+ _5 o( r( c: l7 w% W
@.DrivingHome := true;) T! [9 T4 q; ^% P1 K
end;
3 `; W1 Q- `8 H1 E else -- the vehicle @ is empty, both vehicle and part are in the same dock station
! B4 m. s* x7 ?8 C/ F4 t6 q part := @.transpOrder; V0 ?# O6 ~9 G5 ~* l
part.move(@);-- load part6 O; S' m1 q9 k
@.CurrIcon := "load";' ^, u/ t9 `: h9 H, m* S
GlobalDistObj := part.globDestination;' _9 R) W" ]! \5 t. _9 E
assignLObj := rgmanager.rgAssignL;2 j! f* b7 y* k. Z
row := assignLObj.getRowNo(GlobalDistObj);
2 Y1 H) S+ J$ N7 r if Row = -1 then -- since 70
6 I# {, E$ p# \/ ?/ U7 m% K0 E8 z* y6 H if lan=1 then
; q! ]2 B* w; [7 S/ i promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
/ i" X5 k/ V2 L6 S( v to_str("in der Andockstation: \"",?.~.name,"\""));
/ t0 v0 s9 H3 {6 _6 p else1 T6 e0 A- V L
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
; S4 x, ?* s) L9 S; W) @ to_str("in docking station: \"",?.~.name,"\"")); % u- _: I. p! g
end;3 W; ]- K; T: b1 x9 i
else
_5 D8 T2 T9 K& R) c @.Destination := assignLObj[1,row];' r& v# V& H$ e! R$ H
end;
* @$ ]" N2 V& |5 U) S1 ^ newDirection(@);
6 y+ d$ p5 Q1 {* u! E% n5 K- | @.HasOrder := true;$ _& J1 q; b5 m& q. D# u
end;
, ]2 j5 I' H; A; ~. f end;
u( h+ N8 V/ ?/ D/ z7 }, N, Qend; -- of the method6 B2 H6 \) B2 ^6 s. F; k
|