/* called by: entrance ctrl of the object 'track'+ p" I7 L2 O2 [6 {- D0 V
*/
! B- v/ C, G7 n" Jis- U$ N0 {7 `* N2 a3 v7 }8 O
part, GlobalDistObj, assignLObj:object;row,Lan:integer;/ P% H; k9 J) z6 Q5 q& Y- Q
do, i+ A, m1 A* s( _, H6 T* J: d
Lan := rootfolder.Internal.Tools.AOLlanguage;
$ g$ M: `7 g2 @: G- v if current = @.Destination -- else return j8 ]% E+ K$ z
then
/ }" [+ N2 b, _ |6 \8 n5 W @.Destination := void;
3 c7 S, T9 s+ T: r, U% ^, l if @.occupied then
9 e5 \% W0 l8 | w% M1 u. F% G" T part := @.cont;
$ E1 t# I- z/ Z! N' a @.transpOrder := void;
. g# `4 |: c" ^% N part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,7 D! |% j' A, R! I! O
@,root.eventcontroller.simTime);
- d% G( R0 B1 w; I9 }2 g @.HasOrder := false;: ~' L) _7 v- f6 j& D4 R8 A. K/ C( M
@.DrivingHome := true;
. V! [9 A2 n3 q# _ rgManager.tryToStartTransOrder;) |. t0 a) D+ v
if @.Destination = void: v1 W/ J9 O2 ? O- h' S
then -- no transport order for vehicle @& I3 Q0 U6 ?; W
@.Destination :=8 W9 _2 ^, ?$ b6 q. ~
rgManager.nearestFreeStation(@,track.~);
) ?- l: t, K- l9 e* o newDirection(@);
. O# T' Z& a% r" d) T8 c" }) A8 { if @.Destination /= void then
" R, U% R& l+ [4 o1 \) X @.Destination.NumReservation :=6 |/ |& F: ], V. L- I1 n
@.Destination.NumReservation + 1;
1 M3 V+ S: z2 P" m; A4 N9 _* c _9 S end;) h# e; M) b) H% a% S2 B) o
@.CurrIcon := "drivingHome";
% G: g' A$ d6 R/ I @.DrivingHome := true;1 P/ ?6 b( y7 U
end;0 E4 }( P4 U! q8 L) ~1 Q
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
; u, a3 l# @/ o1 |) G part := @.transpOrder;! \" o0 _. f7 F f. y6 v
part.move(@);-- load part7 p7 P G# ^0 ]4 p/ I
@.CurrIcon := "load";5 x; v; m; K0 n4 z+ f+ n
GlobalDistObj := part.globDestination;
3 f" y% q4 e# o3 P2 Q7 {5 r' ^1 \ assignLObj := rgmanager.rgAssignL;
) k/ u1 D- C8 D; D6 H* @ row := assignLObj.getRowNo(GlobalDistObj);# Q1 W" e& \/ f" B9 `
if Row = -1 then -- since 70& p! Q. w1 v, U; _& G! R
if lan=1 then
* P+ Z8 E9 P" h& H* {3 _6 H promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
( \7 W* d1 V4 O* \$ A to_str("in der Andockstation: \"",?.~.name,"\""));& }0 j! _# @6 i8 [% @ x
else( n3 @% N8 o) z; X
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
2 H }+ w" s4 d0 W5 }/ L! a) }4 I to_str("in docking station: \"",?.~.name,"\""));
5 ?' t0 |% i, g r. u- }8 r' B7 c end;
) n# g; d7 I0 d+ f: b4 }: _) ` else
/ s3 [% [ P5 p0 I @.Destination := assignLObj[1,row];
: Q* }3 O3 \( P' e. R( R2 _ end;
; F& O& u6 o, g$ c- x+ J5 z& D3 k newDirection(@); k# j) @" ^; G* o) \) v+ s V
@.HasOrder := true;
1 I/ ]! i* b& e6 [- ]4 ^7 B, d end;
* V0 D; I5 Y; w- M end;
2 o' t v& Z4 ~+ wend; -- of the method* P! s1 M& J" }' Q
|