/* called by: entrance ctrl of the object 'track'/ c. a, d G, b+ p0 I
*/
" B8 B0 `4 l% w& Fis; Y) V- S( h1 Y$ I1 |% V
part, GlobalDistObj, assignLObj:object;row,Lan:integer;, l% u4 h( q$ Y0 g& ?2 Q
do
0 B [7 H) ^, h+ ^ Lan := rootfolder.Internal.Tools.AOLlanguage;
; L9 L5 t3 s8 K# q& |% n if current = @.Destination -- else return5 u0 P X( F* S2 Y
then7 O5 b4 _: }# ~2 s" {, D8 A
@.Destination := void;: R, Q( I( _# M6 C; F3 T
if @.occupied then
& L' n4 p2 Z- E/ }7 Z part := @.cont;
! N( {( Y* { E, U @.transpOrder := void;
+ q. [/ W# }4 A: i$ c7 p0 ]/ d" l part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
+ @ n( Y8 ? x @,root.eventcontroller.simTime);" ^' T H5 x( _) v6 ^; F3 c
@.HasOrder := false;) S& ]& w8 R# `# T( j2 C8 l( A
@.DrivingHome := true;, V! B9 t# f- |, C$ ~
rgManager.tryToStartTransOrder;' b3 |; C6 h, `7 Q
if @.Destination = void
( ]$ n6 h8 I; ]4 ~ then -- no transport order for vehicle @, b" D/ h% [( }2 g
@.Destination :=7 z( y8 k1 L& c' Y4 D
rgManager.nearestFreeStation(@,track.~);
8 |& m( U) j# ?, x3 q% C% D newDirection(@); 6 L0 O; |+ a, p
if @.Destination /= void then
6 P) `6 S* F( F4 W @.Destination.NumReservation :=
& {+ X$ \' L4 q" f @.Destination.NumReservation + 1;9 E$ O) H C2 H; l6 P& t5 P3 h
end;& u8 N: z. O% s3 ~+ Z% y' u7 A
@.CurrIcon := "drivingHome";
_9 d9 Z% G4 ^" [ @.DrivingHome := true;: w+ p$ D) }8 i
end;4 ~: t i( m! J/ V
else -- the vehicle @ is empty, both vehicle and part are in the same dock station: I: l i! S/ d' p3 Z E
part := @.transpOrder;
. X& O+ C; x4 w( [ part.move(@);-- load part
* z$ A/ T9 {( h& K q: i' L @.CurrIcon := "load";
/ _( W! s+ C8 M2 k5 f GlobalDistObj := part.globDestination;
: S9 b! U( L( P. p assignLObj := rgmanager.rgAssignL;
; z6 t+ x6 [* [) w( H" r row := assignLObj.getRowNo(GlobalDistObj);
# ]- }9 k/ D- @1 J4 W if Row = -1 then -- since 70: p" S2 y" P1 {. s
if lan=1 then# L+ ^2 `( b0 d- i/ I
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),- X& u, o1 M0 O N' m
to_str("in der Andockstation: \"",?.~.name,"\""));
( t9 Q' Z3 o3 }( Y9 Y& W: u else/ p0 d& S4 w2 _9 Z2 M
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),. |9 f/ f' V N
to_str("in docking station: \"",?.~.name,"\"")); # j9 q. N" h" \4 g
end;
1 ]0 W4 f9 `/ Y; B2 g. _ else S2 M1 b0 \) g* \5 \- q z7 ^
@.Destination := assignLObj[1,row];2 L1 l P0 H/ K) X' y8 h
end;
% N0 N" u# \3 a& h+ t7 v$ T newDirection(@);/ h' ?2 Z/ Z k
@.HasOrder := true;
( C: z; U# _+ U) z5 A2 ^' e& G end;% A' h1 F$ T. w2 B; j/ @3 d
end;
4 A$ L: M8 W& S5 C& K; send; -- of the method
) Z, S8 y9 I9 [1 M5 D4 `3 }& h |