/* called by: entrance ctrl of the object 'track'
0 V1 x( Q9 | ^+ R& Q" Y1 |3 s*/
( g8 l& K2 t5 T5 l$ y+ ois
& \9 Z" ^. R/ m9 {4 D7 I+ h" g( j part, GlobalDistObj, assignLObj:object;row,Lan:integer;) A& w7 S+ e/ x7 N/ h. Q# ]
do9 A/ r& T) m7 M! p) B
Lan := rootfolder.Internal.Tools.AOLlanguage;+ o0 D: u$ f5 ?2 Y
if current = @.Destination -- else return
% q* L, x. U5 d, M8 Q7 n then
7 G1 `0 X4 B6 T, g @.Destination := void;; _1 z$ W9 I* {4 m% h7 r' E5 X
if @.occupied then0 c0 y0 g9 x+ p, p) I- L7 G0 y
part := @.cont;9 w! y/ ^; z# }
@.transpOrder := void;
) w5 p) z1 {- ^ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
5 o: j, |. q. L @,root.eventcontroller.simTime);
8 w! X) K+ r& A% H3 E, V( f @.HasOrder := false;
; A. d% r# X1 ], n @.DrivingHome := true;
2 k# R* Z4 N+ k; I Y% O2 p6 S rgManager.tryToStartTransOrder;
" p* x$ O( w' v! `0 w; w0 o6 u if @.Destination = void
1 h# h0 w) z$ G6 G1 s9 g9 s then -- no transport order for vehicle @+ {( N* V) ^' V4 K S6 S
@.Destination :=: s+ U+ `6 D) B4 x
rgManager.nearestFreeStation(@,track.~); X- W4 ~( I6 j- a/ [
newDirection(@); - a5 W$ A5 H& w, ~+ z9 Q6 h3 C
if @.Destination /= void then( S8 n0 H$ S/ A/ g s4 f1 X6 s
@.Destination.NumReservation :=
7 L [8 t' ]9 m8 @& n& X! | @.Destination.NumReservation + 1;) `( E5 B6 C! G9 x4 h9 U- l( B7 k
end;
" G2 r h5 p u8 \( x @.CurrIcon := "drivingHome";
# }9 s7 \9 D8 p; R @.DrivingHome := true;6 ?# w# x; D- g9 Y' }
end;0 `7 m! @5 J% p$ T% y, S2 w2 \( W
else -- the vehicle @ is empty, both vehicle and part are in the same dock station5 j- R- i# q" H. k" {' P& Q+ n
part := @.transpOrder;& k9 C4 i& E7 g/ X( S6 E
part.move(@);-- load part" ^, s* E* s- u$ r* T. h$ _
@.CurrIcon := "load";1 ~: Y" g" H7 y8 A8 I a2 e3 x9 D
GlobalDistObj := part.globDestination;7 K# Z9 T! U0 z! V, A, e* Z! `
assignLObj := rgmanager.rgAssignL;
2 |+ x! A2 y& E- R R* ? row := assignLObj.getRowNo(GlobalDistObj);6 [! \3 ?) j% ^$ ]2 }3 J2 D8 ~' {( `
if Row = -1 then -- since 703 z: g6 Z9 h. G# v# j' d. E' y
if lan=1 then* x- Y: ~0 Y/ q4 r) e: ~8 O: n
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
- m3 t9 v7 g+ g6 }0 r3 L0 u4 [& z6 m to_str("in der Andockstation: \"",?.~.name,"\""));
? |" S% d0 r, b4 g! h else
9 k; h( k! q2 V3 J& K/ O0 z promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),% `* ?* v5 W! z
to_str("in docking station: \"",?.~.name,"\""));
) c1 h, }) s4 @# } end;
- n3 h N. X+ G2 K$ M; W, o else
. m L3 b8 P0 w: E9 c- N @.Destination := assignLObj[1,row]; C7 R( ^/ V3 d' B& J6 F
end; 3 B. f3 B( M7 Y- y+ ?
newDirection(@);
! k' g3 i! c6 i+ w8 N4 j @.HasOrder := true;
- m9 H7 p0 m7 ? end;
; X4 Z4 A7 j) a! A+ c4 Q end;
" V" s; u0 T! W/ b9 I* @9 Lend; -- of the method% }* P/ K9 c5 X
|