/* called by: entrance ctrl of the object 'track'5 O3 t0 H! y ]) v( r
*/
$ v) B3 v3 z# Y( Q7 g. ^* uis" ?2 }$ N& ?. @/ x- x6 W; A; A8 a4 ?; i
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
: \" u- P% D4 a3 B/ B/ U, U& pdo) Q1 B/ A9 `! G0 I; }! {4 m% a
Lan := rootfolder.Internal.Tools.AOLlanguage;
1 \& K* ?; S' q( H% |- _& s if current = @.Destination -- else return
Q* q' c1 [ a7 L9 j: M9 O8 Z then
7 V8 m: T4 q; C/ p+ J2 h' | @.Destination := void;
. T& O N, q9 K) }& C9 F8 T- v if @.occupied then
4 W/ R) S& @$ u" X3 ?5 r2 _ part := @.cont;
3 U3 \2 |8 m( I& ]% [$ |2 T @.transpOrder := void;) A% v7 {1 o4 C/ Q1 g/ W
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,- T9 a9 e( V0 j4 ^8 z
@,root.eventcontroller.simTime);9 ]* l; [0 }6 B! j0 e
@.HasOrder := false;
# @4 F* @! _8 @5 h$ g2 b: t; I2 O @.DrivingHome := true;
5 A4 z$ k) r3 c/ ?+ z0 S5 {0 l rgManager.tryToStartTransOrder;
) H3 h1 u, M, |( @' P7 P if @.Destination = void& o! ?3 s# K( F% p. C! y
then -- no transport order for vehicle @
+ T' Z* O/ o* i @.Destination :=/ m, p t' w: O4 q) s- W7 t7 ~
rgManager.nearestFreeStation(@,track.~);
4 b$ s% }0 B; d: e$ @ newDirection(@); 1 X- a% y2 e- M; Z
if @.Destination /= void then
7 _& S# z) R( k' e @.Destination.NumReservation :=4 ?8 U4 r+ u C* V$ [7 r0 M& ~
@.Destination.NumReservation + 1;
2 l$ Z' }$ a0 h7 ^! K( }6 ? end;
5 h/ K7 G+ f$ @! b @.CurrIcon := "drivingHome";; v$ }7 P% A! n5 i) d
@.DrivingHome := true;" E" Q2 |- B7 q5 D' d
end;
0 F3 J/ O8 r) I- ^2 o6 Q1 t else -- the vehicle @ is empty, both vehicle and part are in the same dock station/ n5 Q: M! A, X% n/ b, Z
part := @.transpOrder;% _( ^8 H- E# @7 N+ l
part.move(@);-- load part
2 d& }/ s- b* z; b @.CurrIcon := "load";
5 }' E2 P" C" ~& e& F2 W GlobalDistObj := part.globDestination;
: F3 h" q3 ]# s' C* h! m) J6 m3 l assignLObj := rgmanager.rgAssignL;( O8 `. J. C% U$ {' J, ]/ z( ^& Z. C
row := assignLObj.getRowNo(GlobalDistObj);
X# w* \# z5 m" } if Row = -1 then -- since 70, K2 D* |( Z5 x6 p$ i2 |/ `
if lan=1 then
+ o7 s5 Z1 Z* E7 E) f, ` promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),# @& j$ [7 Y9 M
to_str("in der Andockstation: \"",?.~.name,"\""));
/ C. C. t2 k( f5 ] else
# y, I! ?9 H+ t4 d# ]& g promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
# N/ v4 h) G `0 z* m to_str("in docking station: \"",?.~.name,"\"")); # P7 a0 y1 ^/ P5 d# u
end;
+ v# ~ d( f9 z5 d else
) H6 @6 {0 |6 P2 { @.Destination := assignLObj[1,row];) J- g; ^' F5 } e% s5 i( \
end; ; T; `7 H: n4 }0 W. f- u+ P
newDirection(@);( x# Y: Z: G" ~7 N( S' g
@.HasOrder := true;: i# D+ R1 ~7 f8 Z5 o% Y- s
end;
, I0 L9 o2 t; @ end;
% Y, \. w* g2 ^) |( J7 ]+ mend; -- of the method
/ T6 \: S% u+ _1 ` |