/* called by: entrance ctrl of the object 'track'+ A3 o; R7 k h! ^$ J
*/% |! M7 q7 q O( \
is
' @# N' M% l4 D: I part, GlobalDistObj, assignLObj:object;row,Lan:integer;
8 z$ O% f. K4 ~- c, M tdo
" g5 a$ F% y# b# T: [ Lan := rootfolder.Internal.Tools.AOLlanguage;" J. P% j+ x! T& I
if current = @.Destination -- else return
! `% _- F4 G2 Z2 ]' D7 l then3 V3 t2 c3 v6 o/ S5 F
@.Destination := void;4 a* r [3 {% f& s- ]5 i" M
if @.occupied then6 |% h4 _2 p* w% U/ H6 g
part := @.cont;. W9 W% a% W8 G( |; m
@.transpOrder := void;1 z1 K0 X, R, b {# I
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
# I' R: t8 C9 K" F, y @,root.eventcontroller.simTime);5 G1 I7 x( n* F, \
@.HasOrder := false;
+ N: ?2 ^( M, ? @.DrivingHome := true;# {( ]6 ^0 ?2 W' |+ Q8 S
rgManager.tryToStartTransOrder;
( c! N0 u- c4 T: N4 o if @.Destination = void \2 z' `8 x4 r. G- ?) b; c
then -- no transport order for vehicle @
# y6 h: y }% j% k7 [ @.Destination :=% J, k6 m' z, K
rgManager.nearestFreeStation(@,track.~);0 r" r3 a3 _' i$ D% o6 Z
newDirection(@); # j) @! v1 Q5 v( S' W7 {# C
if @.Destination /= void then
8 _% E& _, `5 o @.Destination.NumReservation :=6 S/ g0 L3 r, x! v- ~6 L! J' ?! r
@.Destination.NumReservation + 1;) Y4 `5 ^# c q4 a" X
end;# W) } a, F* {' U6 D, g' P! G$ v
@.CurrIcon := "drivingHome";0 j$ E! r2 }- E9 }: q& H/ c/ P# H! U
@.DrivingHome := true;
: N! }9 v7 N# C! }* _! r end;7 f R/ y6 s K; Q8 w9 l
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
, l" j' P# D, Y part := @.transpOrder;
5 Z3 k" B- }' {' X" G part.move(@);-- load part
; m6 ^- x8 L7 i9 N @.CurrIcon := "load";3 Z3 v% l4 A/ r" J+ A, y
GlobalDistObj := part.globDestination;$ M# ]: ]2 f) y6 n% g
assignLObj := rgmanager.rgAssignL;
: W/ _* D4 L& E% u& ~6 S5 S row := assignLObj.getRowNo(GlobalDistObj);6 ~ W' a$ C' d, Y
if Row = -1 then -- since 70! ?. } f& i* }( V( Q
if lan=1 then
. n& |$ c7 m$ u: F promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
5 O! z0 u o; v8 x9 \ to_str("in der Andockstation: \"",?.~.name,"\""));. d" M# G% y& R; ^( }
else5 i! {( K( m/ m( {2 _* _3 _5 ]
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),& Y5 h. f4 G; e. ^% X6 ?4 s9 [
to_str("in docking station: \"",?.~.name,"\"")); # d! Q3 C( H. b5 D9 r! e- ?
end;
& W7 q+ ]- s5 d6 P else
0 j' a1 b3 Q2 H' l6 A: u$ e @.Destination := assignLObj[1,row];0 n$ e4 K" e6 z! i7 Z0 G$ a3 S: d" t
end; 5 g& p0 v' f! y
newDirection(@);
' w* b: R: {1 ?5 f. g8 |; l! i/ v @.HasOrder := true;: I7 B& F- I. i l) W
end;6 L6 l& R. |+ C$ a7 v g9 F8 G! V
end;0 P" |& N: v; Z! \3 j+ \/ T$ c* F
end; -- of the method3 Z7 P! n( I8 B
|