/* called by: entrance ctrl of the object 'track'
0 U! L' X+ @* A" U" |*/
% e7 f9 m/ H& w9 }- o% Lis- `- S$ g, @/ A d
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
6 D5 y: R. Q& V' e1 q( X8 B9 ddo
- L! R% e! r+ J1 j+ o2 e Lan := rootfolder.Internal.Tools.AOLlanguage;) d( G& ?* P8 P
if current = @.Destination -- else return1 z( R5 }* K: ~2 l' M2 h3 r
then
+ E" N; D4 g5 G$ H @.Destination := void;
* C2 z) E9 C& t- z4 X. P if @.occupied then+ a5 F3 c0 B& r) o% D7 j
part := @.cont;$ X' |/ _0 s3 n3 {; Z! i; F
@.transpOrder := void;
; N4 e2 u \2 i part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
' p4 }1 }2 l( ]) W @,root.eventcontroller.simTime);
! f- ]6 w: z! X$ b @.HasOrder := false;
% i4 H* s8 Q) P/ {; C8 X @.DrivingHome := true;! e0 i, X* p6 O9 M
rgManager.tryToStartTransOrder;
8 b! ^4 [$ j: K" Z if @.Destination = void/ |0 A7 M$ L& c0 t) l1 A( I
then -- no transport order for vehicle @
. m6 ]3 a2 A1 d; l' I" u5 x q- g @.Destination :=/ l/ j! |: `5 L" J
rgManager.nearestFreeStation(@,track.~);5 @1 ]7 c$ ^! K+ D% B
newDirection(@);
( h+ L- w' Y/ I0 y8 ? if @.Destination /= void then( C( f9 \9 h" f1 m- g
@.Destination.NumReservation :=
, e4 g9 c0 C, c/ p9 ~9 U6 ]) ` @.Destination.NumReservation + 1;
. B" E! [3 Q: z4 `: R8 J end;
9 V" ~) E# j8 f7 n- B9 w @.CurrIcon := "drivingHome";8 ?5 y; D; V3 `5 ?/ e3 z1 y
@.DrivingHome := true;
8 ^/ x" T7 E3 A' \ O end;' ^* {6 S7 p! L v. s
else -- the vehicle @ is empty, both vehicle and part are in the same dock station$ A% \7 Y0 H& v& l b3 N
part := @.transpOrder;+ f. C k3 p9 i; W$ V( Q4 R, b
part.move(@);-- load part) Q! ^! n4 O! o+ O5 F7 K5 n
@.CurrIcon := "load";
0 P! V! x1 ?3 `8 k* f4 ^9 f GlobalDistObj := part.globDestination;
( W) a& T, f* t7 l8 t. f) X% c' P assignLObj := rgmanager.rgAssignL;2 Y0 n; `* }% I Z6 \8 H! w( f- l
row := assignLObj.getRowNo(GlobalDistObj);* C: I! _6 e3 E& `* x# Z
if Row = -1 then -- since 70
4 v* O2 N3 g# G* D if lan=1 then a' j- \# ^. @# x/ K6 `2 L6 I; g
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),& a# j( h. g! R: a _& y
to_str("in der Andockstation: \"",?.~.name,"\""));
0 x! ^( L5 Y6 ^2 ^3 [ else
& R; f8 D }* D promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
4 z( N4 E4 D( b4 ^! p1 x$ M5 s% n to_str("in docking station: \"",?.~.name,"\""));
* z' u* V# _4 `8 r, p& x- c end;* O! V( u# ]& E# v! Q
else* F3 S- M" ^8 @, H% g
@.Destination := assignLObj[1,row];
9 t5 N5 \) w3 [& `* i end; 4 J: |" Z9 f! I+ Q6 z$ K
newDirection(@);
5 J' X+ ]4 [! s% Q @.HasOrder := true;9 @7 G( ^! G$ k' S ?: N4 |
end;* }3 ~, g0 d: R7 p$ z
end;
7 q- L9 J( a" | p9 Pend; -- of the method
; L5 I8 |3 r/ ? |