/* called by: entrance ctrl of the object 'track'
@4 p- M7 h$ }3 W*/
/ p! d8 w& \, pis5 @6 {9 O% ^: A9 }4 x
part, GlobalDistObj, assignLObj:object;row,Lan:integer;- j! c( E7 ?9 Y* d
do0 e7 L6 R/ H1 f6 [/ z
Lan := rootfolder.Internal.Tools.AOLlanguage;; ?; M) b8 o3 }+ K4 k3 y1 K
if current = @.Destination -- else return) m; H, j) G- O# i% c
then+ z" b: g: \% c
@.Destination := void;
& F6 c, e9 D+ a6 h2 N* h$ i if @.occupied then
% _ i/ D. H( _- b3 v* B1 v6 j% h part := @.cont;" A" r O' F$ B/ j# @0 K
@.transpOrder := void;! d4 K" U8 |5 _7 a b
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
* r0 G3 X6 f7 t* Q5 r- h @,root.eventcontroller.simTime);9 U% @, E4 m8 r- b3 A, L9 F) A, d
@.HasOrder := false;& `% m/ J& B( }
@.DrivingHome := true;& x$ Q& c# y5 c. z2 X' E o) z S# a
rgManager.tryToStartTransOrder;
# b" v: g% Q4 a$ `9 `( A9 }9 U if @.Destination = void
! j& Z4 M6 E# n7 S& Q8 N then -- no transport order for vehicle @7 s4 W' t' u E. l c4 |# u
@.Destination :=* \0 N3 V# u% V4 ^
rgManager.nearestFreeStation(@,track.~);
0 r4 L! H9 `; D3 K$ J. Q6 s newDirection(@); - @7 S$ H+ c X( P; g9 G) F3 u
if @.Destination /= void then
7 c. c0 @' i! q" E3 X @.Destination.NumReservation :=
' l3 ?& h* y$ w2 A/ D3 x, F& @ @.Destination.NumReservation + 1;8 h8 [0 T% K2 P; ?# u' B9 Z. n% T
end;
n1 K V8 i) H: | @.CurrIcon := "drivingHome";4 i H* R, V* f
@.DrivingHome := true;
# ?4 K, O1 R1 U: d& M6 ~# Z" M/ Z; I end;; i2 D7 x9 P0 e' L
else -- the vehicle @ is empty, both vehicle and part are in the same dock station+ Y' k# A3 |- T6 ?
part := @.transpOrder;
1 W9 W. B/ b8 S2 f3 {3 e part.move(@);-- load part& X3 \# v1 g, ?) G# c
@.CurrIcon := "load";7 r% W$ w, ]5 H. f
GlobalDistObj := part.globDestination;8 D7 G" c0 O: i$ d o6 B% v& i6 v9 U
assignLObj := rgmanager.rgAssignL;7 ^5 l7 `5 f1 y7 j1 d
row := assignLObj.getRowNo(GlobalDistObj);, F% l J6 f- q4 X3 U' M
if Row = -1 then -- since 70
/ x7 e; @: M, A4 u5 _& t if lan=1 then
' H- [1 x+ s/ X* M promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
9 m$ m% U) G& U to_str("in der Andockstation: \"",?.~.name,"\""));" y' |7 C. i2 u. C7 V; V! @- G
else$ Z5 L/ H% U4 l0 ~
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),0 Z; @/ k# b) q, B- q; d
to_str("in docking station: \"",?.~.name,"\"")); 5 k8 [; a: P: a7 |
end;- ]0 f3 L6 d. a7 @# h- |
else6 ^, n0 s3 v8 Q) _5 Z2 ~* n
@.Destination := assignLObj[1,row];3 Z6 `' c. L. V" [ K5 ~( D9 B
end; & ~7 I, T0 B9 y* g9 A: e
newDirection(@);
* W3 r' M3 i- D. n7 G0 H9 P+ s @.HasOrder := true;
2 l, q1 r& V: ]3 k end;
7 B2 Q! M% K9 J) q% B7 S/ x9 Q end;
6 ]; D# P$ y' Z3 Lend; -- of the method5 ]; n' d( f9 s: `- S% P6 z
|