/* called by: entrance ctrl of the object 'track'
. _9 q' T6 d. E7 C& A*/ Z, @5 \$ q+ i9 l- q& l
is. N8 D1 {; J3 I$ ]1 R
part, GlobalDistObj, assignLObj:object;row,Lan:integer;$ F7 d: H, T& `5 e5 m" Y
do
5 ?. u1 z0 U1 Y2 D ]+ o Lan := rootfolder.Internal.Tools.AOLlanguage;$ E2 j7 j- j4 M; e0 w
if current = @.Destination -- else return6 Q( v) {0 y. y" Z* C2 v0 e! z4 j- s
then1 m9 h: I% y* B$ v2 _9 W% I
@.Destination := void;' r4 g u+ i2 {$ x/ f" I
if @.occupied then- U1 j/ n( J1 q! X9 r# _4 v2 q
part := @.cont;3 d9 c6 D0 |7 F9 X' ^' [" N! l8 V
@.transpOrder := void;& b2 E, `( a" N% \
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,( a2 d: }" B. b" [0 _% X, n
@,root.eventcontroller.simTime);
3 u) \6 \9 t2 V+ @ @.HasOrder := false;
/ H: n" w7 w: v) ]0 m/ D @.DrivingHome := true;' X1 O' F% v; O5 f" j
rgManager.tryToStartTransOrder;) n" r6 }+ \9 u: X
if @.Destination = void; F0 ], b3 W ]; d
then -- no transport order for vehicle @
5 {2 O# T3 G4 R& y5 \7 Z F6 k @.Destination :=7 |; m2 k& \6 U5 T. `. E
rgManager.nearestFreeStation(@,track.~);- r* u& c3 X6 m7 a l% z
newDirection(@); ) C S, u3 Z7 S' B/ @- n
if @.Destination /= void then/ C% O8 G2 Z& W4 v9 I
@.Destination.NumReservation :=
+ B* c, u9 B' Q" f3 J3 y @.Destination.NumReservation + 1;
; `3 M, u+ N* c/ p end;! `( x- o: \6 p3 p
@.CurrIcon := "drivingHome";
Y9 G) A4 @4 {5 F7 A @.DrivingHome := true;
% N( e! `0 T% j. i! M6 `! g end;8 K/ ^3 A1 I' d
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
7 T5 ~) c) o, _) N f* G! d part := @.transpOrder;7 |& e6 G" {- \$ X) ~) L
part.move(@);-- load part
; M/ g2 w6 s1 N }' |- i% @6 I0 l @.CurrIcon := "load";
- i) f# |, [# F( f3 y/ c# n8 X# s GlobalDistObj := part.globDestination;/ t' x& b) e. b1 N" O
assignLObj := rgmanager.rgAssignL;; o2 @) g9 E2 u8 R3 i0 F2 b
row := assignLObj.getRowNo(GlobalDistObj);% ~! ^! V7 o# r+ O$ r
if Row = -1 then -- since 70
& T+ i2 ~; n: V) {- Z" i if lan=1 then
: ^! ]$ ^* d) `& a) j5 U promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),+ u3 f5 ]" M1 }1 h
to_str("in der Andockstation: \"",?.~.name,"\""));
( R' e, s# J( @7 ` else2 v4 w, \# I4 r. k. j6 F
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),, r3 d/ J2 e) y, u/ `' Z/ P& f
to_str("in docking station: \"",?.~.name,"\""));
! l9 B3 z: k# Z9 b/ y; C end;
8 x6 N: L3 ~- k8 y/ c else
Y) D& B" a! d! C$ w4 r @.Destination := assignLObj[1,row];
! | L+ R- Z. d* s8 j7 R# x end;
3 O# B' W6 A# n& W- M7 `6 n: z" p2 _ newDirection(@);
+ H/ s. c) A0 Z @.HasOrder := true;6 Y/ c+ U2 A. g8 S- n7 K; L( y
end;* S9 ~; }) s( x: G! Z
end;
0 n# x# r8 C W C5 n9 L1 i7 iend; -- of the method2 |0 z' a( `5 L U' Y
|