/* called by: entrance ctrl of the object 'track'
2 T1 J. N& k8 I! o) W*/# v7 z+ C( l% ^5 O% }/ Y
is2 w! I% U# |; |- y8 l- \: s
part, GlobalDistObj, assignLObj:object;row,Lan:integer;+ S5 L* l2 D3 G
do
; t- a( m& ]: U/ i3 E- ^. Z Lan := rootfolder.Internal.Tools.AOLlanguage;
" N: V( g4 k) N if current = @.Destination -- else return% C1 y0 B* `. x a7 P) J, t
then
3 U1 m% r( C5 p3 r! B2 x2 ~ @.Destination := void;
3 J& i7 ~7 @* E! X3 _( \; [/ A5 S if @.occupied then
7 d5 ?* g( i" U$ g5 C% G part := @.cont;
) `# u) b* a5 P: u0 J @.transpOrder := void;8 B; |. Q: B" P2 }
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
O; @2 L6 x1 C' u' W6 ? @,root.eventcontroller.simTime);
3 d2 s3 x, g0 W4 y @.HasOrder := false;+ G' P- }5 z+ `2 C' O+ t" i# T7 W
@.DrivingHome := true;4 ~3 c8 @9 E, O" i2 b# `
rgManager.tryToStartTransOrder;
+ k4 O! Q, [2 J. }& X/ C, d if @.Destination = void9 `# L7 F/ n4 k
then -- no transport order for vehicle @
0 n Z2 B k3 [6 w- A, R/ H8 X @.Destination :=
! J4 }( P8 e. v' P8 O1 H; v7 g rgManager.nearestFreeStation(@,track.~);/ j# `6 i+ t- F7 `8 p6 {: y
newDirection(@);
" G) ]" j! P" p6 S8 T) m& z( G if @.Destination /= void then
. l. O" b1 q: A @.Destination.NumReservation :=
) i8 ?8 ^6 f% F" [: Z) v @.Destination.NumReservation + 1;
" d+ B; d/ }* [8 J# y$ ]' ~( ?5 K- } end;
8 t' {& `1 ?2 s/ H9 u @.CurrIcon := "drivingHome";
. {( v5 ~4 W* C. P3 T2 @ @.DrivingHome := true;
6 E `( D# ] O0 [5 \" x/ C end;2 S$ S. s* e* Q, _! G5 q+ h
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
( l: H6 ]# A' w1 Z& l2 Z' H part := @.transpOrder;
7 W) ?+ x, ^2 E' m2 } part.move(@);-- load part
" D: D! H2 J1 w' X6 \9 R2 k) w @.CurrIcon := "load";
8 W& C0 `5 Q; D# S- d GlobalDistObj := part.globDestination;1 q6 K2 x% ?/ z+ S3 s: F
assignLObj := rgmanager.rgAssignL;: v. i# A2 V. x9 y: |
row := assignLObj.getRowNo(GlobalDistObj);: w1 }6 u) _7 q. h' w5 ~
if Row = -1 then -- since 709 Y+ U; D# _ b" l0 F
if lan=1 then$ Y4 Q& j+ m; j2 S4 ?2 N, o& ^
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
8 K# }8 b" f* |. {3 l/ S, f# e to_str("in der Andockstation: \"",?.~.name,"\""));
0 x. N/ o/ l0 F( y/ F% K. N2 V else
) o6 \3 \( C2 E promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
8 {4 A" d, S4 y' ]& x( f$ z to_str("in docking station: \"",?.~.name,"\""));
3 X. X! w: Z6 {( P* i end;' J5 N# Z3 y2 Y' o/ S; S
else
) Q3 c9 A) w6 K( Y: ?; u% F9 h @.Destination := assignLObj[1,row];
3 K5 m; l* ?. m0 y end;
! U' c; L8 v6 c/ R/ ?4 M. p8 A9 ~ newDirection(@);( a7 o! K; T. _3 `; k$ v8 j
@.HasOrder := true;7 e" b: V% q4 v6 K( a& @5 x' K' J
end;
" {: F P$ N+ {, z, T end;( P. [, x4 F4 m6 x" ~9 n
end; -- of the method; c( m4 T( [( D+ G% p# K
|