/* called by: entrance ctrl of the object 'track': Q6 W6 F& r# `$ K0 S3 A8 I( H( g
*/
7 L! [# }5 U. t$ e) K9 m% [is
" P* k! P1 j7 v6 R" h2 m part, GlobalDistObj, assignLObj:object;row,Lan:integer;# `+ J. q+ y0 \2 y9 @$ M
do6 u: [( Z: v3 g
Lan := rootfolder.Internal.Tools.AOLlanguage;
: l9 [9 G, K. o6 l1 a if current = @.Destination -- else return) f) F# J) ?" K, o' M3 D
then) ~' }/ c, P1 |+ T" D y$ Q
@.Destination := void;; N* ]& e0 P3 }3 ]
if @.occupied then
% C2 L. X) `( n# R+ X part := @.cont;
* V5 j& G0 D8 W! r0 K; n" A @.transpOrder := void;, { p- u$ }, D: u
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,7 \! |4 T. d# Y: V
@,root.eventcontroller.simTime);
7 K" ^5 c* W2 ]) u! l$ Z7 ]5 j @.HasOrder := false;. J5 \8 j) f7 n5 s. z0 `7 v( Q/ a
@.DrivingHome := true;9 O; p# E' h& a* N
rgManager.tryToStartTransOrder;) |: j! j% t- ~; o$ H
if @.Destination = void
4 U4 x& g; h+ g5 e5 v then -- no transport order for vehicle @3 Y/ H" ^0 C. H" m8 P1 Y1 [
@.Destination :=4 Y7 I' {- E3 o# d1 w3 G5 s( b% p
rgManager.nearestFreeStation(@,track.~);" B* Z+ B' n& E# a& P/ K+ Q v
newDirection(@); . ~7 M3 F, {. D( m% K2 k
if @.Destination /= void then# _0 c" q: F# [2 w
@.Destination.NumReservation :=
1 J# L/ v1 U- v @.Destination.NumReservation + 1;6 R) ?% m5 ]- B% ]. ~$ W
end;/ r: J+ u+ t7 G7 a
@.CurrIcon := "drivingHome";$ n5 M/ H% Q$ {; H$ k
@.DrivingHome := true;
: ], q+ q, a% |2 Z end;
: v8 u3 O: v) A( Q% I/ T& q else -- the vehicle @ is empty, both vehicle and part are in the same dock station
8 w" Q0 P0 b# n' t& L; Y6 F part := @.transpOrder;
" F; _" w# ?( S; { part.move(@);-- load part
1 D. ]+ K9 t$ }2 T6 i; m @.CurrIcon := "load";. a: @0 _( ?3 ^" I, E i
GlobalDistObj := part.globDestination;
* h, h5 V2 [# p K3 I6 u assignLObj := rgmanager.rgAssignL;
' O& m0 {, _- U row := assignLObj.getRowNo(GlobalDistObj);
" z% K4 v @% j6 ~3 m: @ if Row = -1 then -- since 701 {5 K# T5 N) O, G, z
if lan=1 then( Q1 m& Z- j8 _2 p+ D! e' P
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
2 A5 ^. ~% ` h$ S to_str("in der Andockstation: \"",?.~.name,"\""));3 f# `9 h% k' \
else; z/ J- _, _5 I
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),3 B) f2 \ q) L( ]! i U9 B
to_str("in docking station: \"",?.~.name,"\""));
& P) g% \; E3 k, ^) b0 y end;
* Y& V" N; H5 N7 W else, R/ @0 v4 y- ]: O* ?8 n
@.Destination := assignLObj[1,row];
* f9 d; x9 N% [5 Z- B+ O. k end; " R1 D1 _) M2 k) g8 I
newDirection(@);; X) w' v T6 p+ ?
@.HasOrder := true;* J) t1 v- P$ F d6 o& B
end;
$ H2 v8 s3 |3 a# \" K end;
8 E2 S, X3 W1 r6 B# J' Oend; -- of the method
6 y& e( D% m6 s |