/* called by: entrance ctrl of the object 'track'
! ` K" |: j; C*/
& J! K, R; j+ U, o) Jis
: \. F( r* y3 O! T4 n6 I$ o( @# { part, GlobalDistObj, assignLObj:object;row,Lan:integer;
3 c+ z/ l7 ?$ S' q4 _' ^* y8 \do
/ ]8 o. K, J) r1 W+ n3 ^* k+ k Lan := rootfolder.Internal.Tools.AOLlanguage;
0 ~4 R& h/ z# Y. { M if current = @.Destination -- else return0 ~$ K5 l. e, @ w5 y+ U6 ^
then
4 S% {; J/ r; W4 _ @.Destination := void;" z4 a+ J; K- |2 p2 E5 q. |
if @.occupied then
/ n' h% T5 ] v/ |* R part := @.cont;
6 _9 L" ]2 x' M0 r6 o @.transpOrder := void;. Z* n! E" y# `8 b O+ v
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
( a- A% s4 x; `0 o3 m( n @,root.eventcontroller.simTime);
2 t1 }$ B7 F" s0 a$ v/ d5 d @.HasOrder := false;9 H) T5 R, P4 ^2 {& {
@.DrivingHome := true;
: P0 Y3 D' D" C" V. _ rgManager.tryToStartTransOrder;9 [0 G' W% E% ]( V9 _& [7 V3 [
if @.Destination = void
5 X- R! _' r5 R& f then -- no transport order for vehicle @4 V$ @3 V0 S% o' j7 v4 s' s
@.Destination :=0 s1 X3 K! _: q* v; a( N8 r
rgManager.nearestFreeStation(@,track.~);7 [2 f3 j6 y! D6 z6 g0 ^8 x1 ~
newDirection(@); 1 {/ O9 _9 ^* T: c3 r
if @.Destination /= void then& _( n3 s4 I7 u
@.Destination.NumReservation :=
/ a! P$ N- u8 t @.Destination.NumReservation + 1;# `, R Q: ]# A2 S' d Q
end;4 r9 f6 a1 @( V" f% k! C
@.CurrIcon := "drivingHome";
# E# K+ h; t( {( \3 W! r; h @.DrivingHome := true;
. M* S0 K# |% }' o- f6 E# l8 f end;
1 b' ~6 l' p& R5 X else -- the vehicle @ is empty, both vehicle and part are in the same dock station
. b4 T H7 Y8 D: X6 E part := @.transpOrder;
; {7 {% C% f# g& p part.move(@);-- load part% K* h. x1 a- k1 ~/ ~3 q% | f
@.CurrIcon := "load";
! e& R6 c( b3 T P( C1 q# ^' K GlobalDistObj := part.globDestination;; ~. h! i- D( c
assignLObj := rgmanager.rgAssignL;
: {" K6 J9 x4 [$ \ row := assignLObj.getRowNo(GlobalDistObj);
5 {/ W9 f2 n/ Q+ A$ w' p* H4 n if Row = -1 then -- since 706 ]$ M/ E: w2 L" u
if lan=1 then
; e( V0 G# y! {) Z7 H0 z) W promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),- b, Q6 `! X: N8 C- l4 X
to_str("in der Andockstation: \"",?.~.name,"\""));
" n5 [' g, C/ X' K* O9 D N5 L else- W% g9 ?: B0 j- H# j
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),) N F# L1 s# l/ t+ `, X, k6 f
to_str("in docking station: \"",?.~.name,"\""));
8 B4 Y% w9 K. a" `+ O end;
# ^. O% p( T4 j$ [- O% A, P6 |' N else
, z- s' p( g# n: e! C4 g5 p @.Destination := assignLObj[1,row];
1 d4 F' y+ p" @$ L end; + F, q/ R6 Y: w
newDirection(@);( Q3 d* u8 z7 o* i) H
@.HasOrder := true;0 c* n6 U6 w4 v
end;8 B& ] W1 Q m; Z7 X4 `
end;# O# i8 o0 l% S" [5 q
end; -- of the method* r' ~" N* P% d/ ~
|