/* called by: entrance ctrl of the object 'track'4 ~+ o# h: j/ m0 X) d' X
*/
6 X, ?$ m Z( H0 _! U* c" ^is
0 Q9 X, d) p, L, ~+ |2 F1 K* v part, GlobalDistObj, assignLObj:object;row,Lan:integer;
5 X$ K$ I6 p$ Z; y0 P0 ]4 Ado
2 ^2 e4 ^+ k1 n+ @5 h1 o Lan := rootfolder.Internal.Tools.AOLlanguage;
9 X/ ^9 a4 m) d( p if current = @.Destination -- else return
3 O! x$ A t* e! q7 J" K8 m$ F then0 X# W0 Q! e5 b7 M
@.Destination := void;2 D+ S0 Z3 S. R V
if @.occupied then b* S7 _5 Z6 L# n
part := @.cont;# l1 d% h9 P1 ?1 O
@.transpOrder := void;
* p. j C; ^0 X5 ~" Q: j8 M part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
( K* @( a2 w6 B; F4 |% I# L4 C/ } @* n @,root.eventcontroller.simTime);6 l* T; {% r4 J. F+ h8 j) P, [
@.HasOrder := false;
, a" G% M; E1 G4 b( v8 X @.DrivingHome := true;
3 d* g) |) b" y! N5 K9 I6 Z0 N rgManager.tryToStartTransOrder;7 Y( J) x) b4 p2 \9 c' g/ L7 V8 c; t
if @.Destination = void
: X# G" o" F* E% J+ b then -- no transport order for vehicle @; {2 `$ c) o1 \6 d9 W4 s3 W) G8 z
@.Destination :=
' u P/ _, @2 H0 Z+ Q rgManager.nearestFreeStation(@,track.~);* M; {+ a8 A Y+ [
newDirection(@); - n( ?) U7 }# M
if @.Destination /= void then
, ~7 Y" Z5 n& j1 w5 P2 q* ~# K @.Destination.NumReservation :=& H9 s. u' [/ N$ ]. P, N8 h; N1 Q
@.Destination.NumReservation + 1;7 L0 F' V2 a6 s. @+ F3 Z% x
end;
. w8 q) N5 d6 X" w5 p @.CurrIcon := "drivingHome";' u% V3 H5 w" ~- o* n3 D
@.DrivingHome := true;
' G( V7 ]( w* [. H- u/ S ~ end;
V/ Y. l% B1 O1 j else -- the vehicle @ is empty, both vehicle and part are in the same dock station
( F! {( n/ Q2 R. _5 d: a9 t! ]( s part := @.transpOrder;
4 Y3 E6 r4 t/ f7 \' ^ part.move(@);-- load part; R2 D! j" E1 X. B
@.CurrIcon := "load";9 } r: {/ ]0 W+ x. `# X+ d- o
GlobalDistObj := part.globDestination;
/ }- H& q" s3 V& ` assignLObj := rgmanager.rgAssignL;# w& q3 \& L4 P5 _: E
row := assignLObj.getRowNo(GlobalDistObj);
7 a6 {4 s" k& M8 f' k1 C9 m9 K' L* ~ if Row = -1 then -- since 70
& V: E$ ?3 M9 W( v0 @* n. B if lan=1 then
! h5 P4 \3 I a2 M promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),3 t$ i: o) _" W* Y5 v, j6 {& ?
to_str("in der Andockstation: \"",?.~.name,"\""));
$ S3 d& P$ F0 e" Z6 e else
3 P2 n$ q; ]& O+ N2 Y( y promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),* Y7 F. f- W. V: w$ E! i
to_str("in docking station: \"",?.~.name,"\"")); 5 p T% ^ i% V! d F5 T
end;: K% k5 h, O* @* }8 K
else6 w3 k1 U M& ^2 X- j
@.Destination := assignLObj[1,row];" S& ^, x) x6 g3 d7 @; ]+ q
end; 2 Z& {* N- I( A+ L2 t
newDirection(@);
' ?; _$ |# ], A! w8 | @.HasOrder := true;
8 }7 W* Z4 F3 |5 p7 G4 t/ a end;4 D$ A! F5 J" J7 u1 `* I* o5 `7 z
end;$ }$ Y- K: ?8 Z6 K6 H! _
end; -- of the method/ H# m- b2 |; M2 g) n2 k" w v
|