/* called by: entrance ctrl of the object 'track'
. |+ T# a. s' D! W6 G8 W. @/ U*/
+ E& u! \4 L" L* P& F3 pis
$ @' r/ z1 T/ v( J1 H% h8 Y part, GlobalDistObj, assignLObj:object;row,Lan:integer;# Q. g: `" E6 a' \! M/ y5 o* [
do9 r3 D( F& W) Q2 z
Lan := rootfolder.Internal.Tools.AOLlanguage;
5 N2 K: W, i X% h, |' f. y$ T if current = @.Destination -- else return) N9 Q; N0 q' ]( [* V
then6 _8 V7 M, R, P/ S/ @
@.Destination := void;; B0 _8 _* u2 x+ f0 G0 F
if @.occupied then
% t3 r1 n/ ~, L: @8 m part := @.cont;, e/ u. l3 C3 Y& l7 t b
@.transpOrder := void;# {8 _1 F, T7 D7 v: ^
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
2 H2 S) ^2 H9 R' F0 ] @,root.eventcontroller.simTime);) p; x3 g% S2 a+ ~
@.HasOrder := false; `1 X9 ^/ t3 c* T
@.DrivingHome := true;! j8 O# F9 B' |2 C# @
rgManager.tryToStartTransOrder;
( I1 v# W8 K/ \" z9 S; A1 i; ] if @.Destination = void1 u- q& T; L' u$ k" ^, r2 l p
then -- no transport order for vehicle @, A# B/ i3 e& @6 H5 _. ]
@.Destination :=2 x! H) K2 [1 w+ y) M" V+ U
rgManager.nearestFreeStation(@,track.~);
. `6 x0 O2 M1 f; M( o) G+ H! ] newDirection(@); 0 M' l9 R' q# Y7 I% u
if @.Destination /= void then _6 J. g* P8 A1 n/ k& `7 j& S4 P. x" h" h
@.Destination.NumReservation :=
$ i7 }3 ^6 u! s& i @.Destination.NumReservation + 1;
8 }+ o7 g/ _( e0 N end;
" r7 r/ U( ?* r! f) T! o2 U( M @.CurrIcon := "drivingHome";3 \( S7 i+ x& Q1 i% z6 l3 t8 g
@.DrivingHome := true;6 G* T% n0 n& c' z
end;7 u3 o5 q$ y- R& S ^
else -- the vehicle @ is empty, both vehicle and part are in the same dock station5 i# c3 @# E& V: y! ]% M' o% `1 h9 X
part := @.transpOrder;
3 u9 B# c2 `) j7 T. ] part.move(@);-- load part$ I% @* ^( \4 Z: j0 m
@.CurrIcon := "load";8 U8 U# }2 F0 v
GlobalDistObj := part.globDestination;3 s, W V0 _- r% W1 |
assignLObj := rgmanager.rgAssignL;
! @9 h {. _2 h1 a. [2 R( V row := assignLObj.getRowNo(GlobalDistObj);$ S' w9 f6 J! R! C
if Row = -1 then -- since 709 o" Q9 n" v. ^! d. f+ c! a
if lan=1 then
: {& f: l% U3 q$ O+ J promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),$ q" b0 ^4 S8 i. c6 K
to_str("in der Andockstation: \"",?.~.name,"\""));
; I# e& l. |4 d9 w else" r+ ~: o# [ J
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
" m: B+ H' j7 O+ n" ]% G to_str("in docking station: \"",?.~.name,"\"")); 8 z3 f! G& v6 ~! M# a
end;
' W0 ?2 q+ M7 r5 V1 P& f$ N else
/ H* U3 R8 X' K/ T @.Destination := assignLObj[1,row];' p* \9 Z/ Q, L! z& Y$ p- T! i
end; 2 F& n5 ^# z2 p4 _9 q) Y; e
newDirection(@);+ Z7 k/ D$ l E& h( Z7 k1 t1 L
@.HasOrder := true;
. H' t! d1 c1 V# u end;! C9 B1 |- c0 _
end;
$ x8 k7 @, @0 e: I6 F/ F ^end; -- of the method
" m. U# v3 X X( v6 \- W6 e0 @4 x |