/* called by: entrance ctrl of the object 'track'
. J8 X' |* L; S*/( Y. b+ [# M& `1 R, x8 a
is7 D# w4 u$ `0 ]- [3 r
part, GlobalDistObj, assignLObj:object;row,Lan:integer;8 ^( v" R6 k9 `
do; L; ^6 e l- V: a4 Z& [3 s4 s$ D
Lan := rootfolder.Internal.Tools.AOLlanguage;
5 n8 i$ K% r- n# l$ ?7 Z; A if current = @.Destination -- else return8 j+ {. ], b9 v5 A6 W" |' r
then
3 K6 Q2 A! L r- R6 J @.Destination := void;
$ u2 e+ `" b v if @.occupied then
- a. {+ [; N4 i* W, g9 o9 c2 U, K' D3 S part := @.cont;
% P! j9 _( ~3 @# e @.transpOrder := void;
+ x! Q& E) h7 H F# Y% V part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
. }' O( X: c! `# }( E8 Z @,root.eventcontroller.simTime);
( l5 ]6 @5 s# J; P. B9 K @.HasOrder := false;( r# u* S1 o( q m" |+ N
@.DrivingHome := true;2 ` z" ]/ ~% p! {
rgManager.tryToStartTransOrder;/ t, Q9 f6 E- v8 k; [; U
if @.Destination = void
4 O1 a" `& f# ~+ f5 h! a& v3 s' J, ? then -- no transport order for vehicle @# X: U+ {! c y7 t
@.Destination :=' z! S7 N# V8 m* M' T1 a* E" q
rgManager.nearestFreeStation(@,track.~);- z1 P/ J5 A! r& [5 L
newDirection(@);
, s( s% I: Y. O% _! A) t! ] if @.Destination /= void then
4 `1 v2 J; J% \1 W! E. A; x @.Destination.NumReservation :=
' \8 ~; W. m8 V0 @; C @.Destination.NumReservation + 1;' f( }% X% i- {4 I4 p) e
end;5 p# Y+ e5 _5 f# K' L
@.CurrIcon := "drivingHome";
+ d! D5 M A2 w* d" O7 Q @.DrivingHome := true;: ^% d( j* U% q( T
end;
" m& j' M4 W% {7 j" v6 L else -- the vehicle @ is empty, both vehicle and part are in the same dock station
, N6 O3 ~2 H6 w2 U0 c/ P part := @.transpOrder;% J. u3 @. T4 e( m/ I
part.move(@);-- load part
! b' N, z- x/ w) G8 `) m @.CurrIcon := "load";) J6 @' q, s8 A5 [9 y' ?7 j
GlobalDistObj := part.globDestination;+ S% t: Z# U; H" J
assignLObj := rgmanager.rgAssignL;
% Y; x6 _" ] I5 g row := assignLObj.getRowNo(GlobalDistObj);) b! P, R0 r6 j, [# Q. G9 w. p% ?
if Row = -1 then -- since 70, c/ a) Y8 d0 r+ G" n9 A8 y
if lan=1 then# P" C d/ P: l. u; t
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
( G* D6 S1 [2 R3 L$ w% ~! H to_str("in der Andockstation: \"",?.~.name,"\""));
( l% F% [+ }+ L) d! k+ O4 b else( I- X+ [" Y9 C h* k& @7 X& F
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),' x0 g' f, ]& R( i7 t
to_str("in docking station: \"",?.~.name,"\""));
- z# M; J: ]6 ^4 u end;
7 N$ }/ u2 s5 d% _ else
9 Z% A- a4 v. f' {$ b @.Destination := assignLObj[1,row];' V+ t9 Y9 O7 l
end;
& y: C" s2 q0 R( U newDirection(@);% } U+ U$ U6 {* R7 d+ ^2 E1 n4 d
@.HasOrder := true;- [0 a* ?: @) Q9 j0 S) m! f1 x
end;5 `! ?9 W i' m3 d" @; ?- H
end;
Z# P9 n8 b% [8 Tend; -- of the method% t" U5 q) n7 M8 c! T0 O
|