/* called by: entrance ctrl of the object 'track'5 d) ^' }" o8 P& A' u4 j: T
*/5 y. k+ b4 r3 ?! K7 [; Z1 m
is( B ]+ ~* E3 |' H+ u
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
! {, H# d" {% q* Gdo
7 r, ]( E9 H# [# Z& Q4 K3 d( F r! W Lan := rootfolder.Internal.Tools.AOLlanguage;6 L7 u8 U! c. v' g7 v; M
if current = @.Destination -- else return) D! `9 U- A3 F! d5 t; s
then0 a2 x& B) J# y5 Y8 R X
@.Destination := void;
; u0 b! S& n, N/ k3 w5 p if @.occupied then7 j+ ]# V6 i9 Z% q J
part := @.cont;
6 P( v. X9 t$ @. a @.transpOrder := void;
. y: H; |$ S/ d( T+ |6 \/ |* v part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
8 d8 I" X9 e u5 G' q+ }1 A @,root.eventcontroller.simTime);+ }) @7 F" J F7 e0 n
@.HasOrder := false;
% ^! j3 p, O A1 a o$ g7 y! _ @.DrivingHome := true;2 T. w/ O9 |" o" U1 k& P. e
rgManager.tryToStartTransOrder;! D, J* T- T+ ]% c% j3 |
if @.Destination = void
0 r' Z' Q/ Y/ p/ d8 _6 u+ \& o then -- no transport order for vehicle @! u3 E5 u( Y, j7 \6 Y1 A
@.Destination :=2 I$ b' M: L& d. m G+ {
rgManager.nearestFreeStation(@,track.~);9 d/ S" A ~8 S
newDirection(@);
7 r: {* E; X6 w. V if @.Destination /= void then
# D- ~5 q# ?8 l/ U: h1 H @.Destination.NumReservation :=0 c* a+ U$ r3 a0 `
@.Destination.NumReservation + 1; `3 ^& i: J: u( S3 t, r
end;1 _; [# |+ u6 \$ s" u
@.CurrIcon := "drivingHome";, q) ^# F8 L! U7 `
@.DrivingHome := true;
9 P6 A( z4 M T end;
( o2 b/ h# z: J0 ~5 ]9 V2 S( j! N else -- the vehicle @ is empty, both vehicle and part are in the same dock station1 N; y+ Q6 }" ?1 J8 }1 T$ R
part := @.transpOrder;
+ f7 `; l' k G! V9 K" x$ j F part.move(@);-- load part
6 ~: ^& Y# o, ~ _! n @.CurrIcon := "load";/ y, e$ a' ~( I4 V" u/ I3 ^$ ~" ]
GlobalDistObj := part.globDestination;/ @7 L- m$ P) b) m
assignLObj := rgmanager.rgAssignL;) |7 r# [" t. G F1 g9 i2 C! i
row := assignLObj.getRowNo(GlobalDistObj);. b2 H9 O* _; g# ?! i( b2 d
if Row = -1 then -- since 70 C& \$ [. @0 t. } A" R9 ^7 _
if lan=1 then# z( a+ c3 T7 R* v5 T+ z0 T3 D& `0 s" D
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
; z( c P; M. f, k' `+ w0 u to_str("in der Andockstation: \"",?.~.name,"\""));* k# |" B7 l5 [% ~- R; Y
else- q3 f5 u; I& |8 i+ M5 [3 ~
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
) i4 Z$ e3 Z! _1 u to_str("in docking station: \"",?.~.name,"\"")); " b* G% m c) X- E2 X
end;( @0 ]. K* w! X6 V4 Y7 W3 v* M6 S4 j
else$ g- d" s. ~. c# `& A
@.Destination := assignLObj[1,row];# M! t- g. ^7 r9 }' {2 e# j
end; ) Q O5 E/ A0 Q* W/ s
newDirection(@);/ q5 |& \% [0 {9 c$ p% @
@.HasOrder := true;0 Z t: n* p1 u! h% T0 w
end;
/ X' i2 v) X2 l- Q0 T4 l1 ^ end;
/ `' K3 o: l, q; Rend; -- of the method
6 N& C T+ @* T# u |