/* called by: entrance ctrl of the object 'track'
6 E( F+ _% D0 ^. H+ _1 `6 J*/
% j/ \# u* h" x/ j3 @- W( kis" [" f# \" p' X: T( ^5 b
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
; f; `7 `/ O4 P- Zdo
" T$ u# ] e. B% e2 Z7 d Lan := rootfolder.Internal.Tools.AOLlanguage;
4 s9 }" X* y5 D3 f if current = @.Destination -- else return1 s0 ?* g; ]: C& v2 n$ o( R K4 {
then! }& o' C" P8 D9 z& ]4 d5 {, B( {
@.Destination := void;1 c; D- i3 e! ]) l Q, Q7 M
if @.occupied then
) X" V3 j2 i6 b; }0 P! `4 ^8 t8 G part := @.cont;
; ]% S& ^! r5 i2 x/ T' p @.transpOrder := void;" D0 u/ F. @* X8 Z; d
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
# Y$ Q2 W( m; Q3 H9 P. e% v @,root.eventcontroller.simTime);
7 ]. `6 {) H9 t a* w3 }, Q3 i @.HasOrder := false;
' }2 M E& D3 S2 k( D" D& ^ @.DrivingHome := true;* I" m$ N9 @+ b
rgManager.tryToStartTransOrder;; n: o3 |- Z& E; U' w. i$ Z
if @.Destination = void
( C3 ^8 P( ^0 E9 L6 e1 w. S& N then -- no transport order for vehicle @
& r0 K9 w* U1 c5 e: H# Z @.Destination :=2 a. Q! a9 D+ A0 v: j1 o+ b' Y" U2 t
rgManager.nearestFreeStation(@,track.~);! G- I( t0 k9 `7 `0 t
newDirection(@);
: a, F; n* u+ W; H8 L# X if @.Destination /= void then% I2 N8 M! Y6 L" I/ ]% k' }6 c8 z
@.Destination.NumReservation :=
% M h; v3 H. g$ a C! h1 M! k @.Destination.NumReservation + 1;. E1 s& h3 E" P6 s( o% H7 m
end;
+ N) j4 m! W q @.CurrIcon := "drivingHome";
/ p8 C+ P& |+ J& n @.DrivingHome := true;: t/ S5 j% R9 B/ O/ R# B
end;! ^, [. T1 g$ U6 n' Z; B7 E5 L6 u
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
1 J. u" E; u$ {. U part := @.transpOrder;$ _8 S; s7 m) K0 Z) P" K0 ]2 S
part.move(@);-- load part) ?0 f# h1 V9 e
@.CurrIcon := "load";
: r, Q* V$ o1 G9 X" c GlobalDistObj := part.globDestination;
5 U" [' Q# O9 n( }# U5 L6 ^ assignLObj := rgmanager.rgAssignL;
6 B2 J' O' j. d; F' l! ? row := assignLObj.getRowNo(GlobalDistObj);, h6 D, ]: @! ^6 i$ k
if Row = -1 then -- since 70
4 M" H) T. w8 @- h if lan=1 then
* V6 T# H5 V- x2 B+ f! s9 Z promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
V o9 p8 b c/ i" S to_str("in der Andockstation: \"",?.~.name,"\""));& {3 R$ W% [, S
else4 d9 o) q, e/ j, j( ~8 T
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
. I* P- a5 [! D; S4 H: }8 ] to_str("in docking station: \"",?.~.name,"\""));
- ?" {' i, m) ~- q; X8 `8 x end;
6 [+ N: ^' s& Q' V5 c else
u* a1 c8 X2 h6 R. x$ j; y @.Destination := assignLObj[1,row];6 E1 }* ~+ a: o; J0 b* a1 W2 l
end;
- j4 {: X& V8 [( J newDirection(@);
1 M+ x2 j7 s3 @! ] @.HasOrder := true;! k9 e* f: n. X5 c, S' u
end;0 B6 t" Q% ^+ N$ a. v9 R7 F
end;5 w5 n3 F. E& U4 H _
end; -- of the method* H* F! Z, l8 L( a4 n7 Z N
|