/* called by: entrance ctrl of the object 'track'
" @2 g0 ^1 [! w*/
! ?0 W) d$ l; w, s- Y: ^is' {' M! L% `8 g. j* {# X. P
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
8 E$ U7 J3 _. Z# x# G; `0 ^do
1 _% g1 j) }# V5 p" L# u$ T Lan := rootfolder.Internal.Tools.AOLlanguage;
5 a. s# w1 Z8 X- H$ K2 ^ if current = @.Destination -- else return
0 [- i# r2 |# u* U- P1 z5 ?+ M3 H! n then% _( b. s9 N& Y4 ^+ O/ q8 Y! ]
@.Destination := void;
. X0 C- k6 u2 Z9 [: K, o* |! k3 y. @ if @.occupied then
! f+ r- s0 v( s2 ~) Z& I4 _7 X! f part := @.cont;/ n) Z$ A# J# T
@.transpOrder := void;. N5 z7 n/ @ h9 L/ C& H+ t4 |
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,+ q/ R& G' N8 E3 g
@,root.eventcontroller.simTime);: _/ s" ^1 _$ c" N
@.HasOrder := false;
3 ?1 R3 f/ @+ R3 i- o @.DrivingHome := true;; p8 O! m% f+ v5 O2 r
rgManager.tryToStartTransOrder; ~* U8 F" k4 ~0 _/ K; P
if @.Destination = void( O; J; @0 C, j" }
then -- no transport order for vehicle @% f) K/ ?0 p+ U0 [! B7 j
@.Destination :=
8 O* h }' D( G3 w rgManager.nearestFreeStation(@,track.~);1 c) n6 _. F* a; S, Z( {6 X' R
newDirection(@); 0 v5 z. _! z0 ~' {: R, y/ x
if @.Destination /= void then. A, v( z5 s: H# \/ L2 \
@.Destination.NumReservation :=: \& e1 @# w/ S
@.Destination.NumReservation + 1;( G, s& j2 W5 y: a* w d. D
end;
) N$ Z2 Z6 ^% _8 F2 i2 i @.CurrIcon := "drivingHome";
/ ], k. v& ?" b @.DrivingHome := true;
8 [; u) z d3 ^: p+ r* Q end;( k: R. Z X6 z+ q
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
2 n' E' X# ^# e$ T, j$ r, c6 z7 B part := @.transpOrder;
: ^/ |2 E% w0 b* n8 E3 I0 K part.move(@);-- load part* H: p8 T. a0 q& `) _ A/ n
@.CurrIcon := "load";) ]. R# c0 b' d5 Y- l+ h
GlobalDistObj := part.globDestination;9 p. x* ~$ s2 ?
assignLObj := rgmanager.rgAssignL;
2 G" S7 X. t9 q8 X$ F row := assignLObj.getRowNo(GlobalDistObj);
$ f9 X8 V% j& n' O$ O8 ` if Row = -1 then -- since 70
) G) `- e: \/ v: N if lan=1 then6 Q k# Q, K% G* r2 Q
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
* U" i$ d( d6 L. ~: a to_str("in der Andockstation: \"",?.~.name,"\""));. v N% s- J. s6 D
else
5 d3 P0 |' V7 G& E% S* p promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
0 n' |, X- D0 r. u, |, V to_str("in docking station: \"",?.~.name,"\""));
. X3 b$ e* n" O( o/ ^ end;
3 K( N$ Z! O: Q6 r. i8 ] else3 ]0 y+ U' K- z" d" `7 ^& T: Y0 w
@.Destination := assignLObj[1,row];
+ D9 H& b( `) Q7 o) k7 \ end; - O% S4 P1 q1 u% z+ Y! p
newDirection(@);
" t5 v5 W5 j8 L; V- K8 r @.HasOrder := true;# [/ V; \+ {% S3 `% M
end;6 Y# m3 E: E! Q3 ^! r+ J ?# G
end;5 _( v6 V( P, ~9 ~# M
end; -- of the method
" M6 t6 D6 W& ^" X |