/* called by: entrance ctrl of the object 'track'0 I h7 ^/ ]4 o P, `* ~5 O
*/
- t: u; F e! F8 Y! r% [7 v. i5 Iis
q( Z! f% i" s4 B/ W# i% J part, GlobalDistObj, assignLObj:object;row,Lan:integer;' Y6 A; `) W; \# H
do- Q) e3 F8 Z; u( Z) G( t! Q
Lan := rootfolder.Internal.Tools.AOLlanguage;7 @0 f1 P5 G. A
if current = @.Destination -- else return
6 W- b5 |. |* I$ L/ V/ p7 t7 O then
3 z& b }; u+ B* j* F @.Destination := void;
2 d1 [/ C, G% k: X if @.occupied then5 D% [6 V: l" y/ }3 a
part := @.cont;
9 Z2 j& T+ ]; l) P3 U @.transpOrder := void;
. c5 I9 h! z) f" D* P' o, |4 c part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
1 R6 h( I% _* O) n$ Y! W& t @,root.eventcontroller.simTime);- |+ [0 G: |) N7 t
@.HasOrder := false;
+ V# \6 t1 \+ O( c1 i @.DrivingHome := true;
( m. g( S y1 v1 h7 L) h rgManager.tryToStartTransOrder;
9 D: j2 Q* U, H% f% x* [ if @.Destination = void
9 `" ?6 o, P7 K0 g, K$ F# |2 i! B: o then -- no transport order for vehicle @, G* L0 o& q3 g0 }
@.Destination :=; i, A1 j2 \0 w, N
rgManager.nearestFreeStation(@,track.~);4 s O4 M( P: v# T/ g2 B. @
newDirection(@); / p- V; d B1 p M
if @.Destination /= void then3 L0 x2 N" v5 k. r
@.Destination.NumReservation :=* j# e3 T6 g$ y w
@.Destination.NumReservation + 1;
, x9 V5 m; }8 i' {- ? end;* C. s# Z* }) x; R
@.CurrIcon := "drivingHome";2 L. D t, m8 o( v6 j
@.DrivingHome := true;
$ I; O# [5 T0 a7 }4 L end;
. b: E4 z# p" m2 C! X5 G% [ else -- the vehicle @ is empty, both vehicle and part are in the same dock station/ x8 ?# R# o- H* e& Z
part := @.transpOrder;. n" @7 h% P3 s7 V. j$ Z( U
part.move(@);-- load part
& H' l# ?; t# k5 J) D @.CurrIcon := "load";0 w, p% l3 {* L; O( s7 q
GlobalDistObj := part.globDestination;
" q% L4 K: ^! K6 u3 `' X4 K assignLObj := rgmanager.rgAssignL;; _ q4 {/ o1 o
row := assignLObj.getRowNo(GlobalDistObj);& c8 ?) k$ J, e3 r" b# X2 Y) F
if Row = -1 then -- since 702 U0 S3 ~2 q9 A9 h
if lan=1 then
$ C9 D8 ^. A2 c1 O* u/ O, p promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\"")," J" g8 m6 y/ Q7 }! Y$ Y
to_str("in der Andockstation: \"",?.~.name,"\""));
2 {/ J L: h1 ?) p& z: [ else
0 w2 G% O u! T promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),# Y k1 a, c/ M3 s
to_str("in docking station: \"",?.~.name,"\"")); " k0 s. x. g/ K6 q
end;4 D/ v# ^! l" }* L8 l
else9 e# u' b% D% j& Z/ n9 V! L
@.Destination := assignLObj[1,row];* O; Q+ }5 @% p1 n3 {6 { i `8 |
end;
/ u6 S5 x8 ], G/ a$ H newDirection(@);
3 X3 A5 H- a2 [5 n3 X% A @.HasOrder := true;
, f) b# z4 |. W) h) \) { end;
J0 y+ K& T- B6 P end;
& H8 X2 u* r6 H( ~end; -- of the method
4 z6 H H$ o& i9 b0 @* { |