/* called by: entrance ctrl of the object 'track'0 Z, C: Z2 ?. z& a. ~- Z
*/
& g: }- h0 Q- x+ w- E: s4 |is9 ]" x+ D/ y8 i. ~) V7 n7 y8 f+ `
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
- N! z+ g5 R0 E+ r) pdo
2 P2 w2 j6 G* d7 a; H Lan := rootfolder.Internal.Tools.AOLlanguage;# q6 f& d6 c9 S& d
if current = @.Destination -- else return7 D+ J( |- a# S, `7 \
then/ x; T. T! M5 l2 x( o* i
@.Destination := void;' t# s4 p3 F( }9 u
if @.occupied then l7 H V3 Y% r" g/ A: r! y
part := @.cont;4 \! @. G& o8 q) r
@.transpOrder := void;+ Y3 Y0 i& [% C2 J( h5 u3 q
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
8 o# c3 I% H3 Y# t9 q" r @,root.eventcontroller.simTime);% d) y- O6 N; D/ S& S2 \
@.HasOrder := false;) d$ a! k) a% K4 X4 X2 q# t
@.DrivingHome := true;; K* q9 e9 ]6 f* x) w' N, `) ?! ?
rgManager.tryToStartTransOrder;9 k) v% d# L. z
if @.Destination = void
- S1 }6 X3 ] o* M; y% v6 @" [ then -- no transport order for vehicle @0 n8 I% U' P+ X5 @' i
@.Destination :=
' A# ~% o/ D& ~ rgManager.nearestFreeStation(@,track.~); _- G3 y, ^0 N C8 J
newDirection(@);
4 x+ j, {$ N# ~1 U if @.Destination /= void then! x n: z. D# p6 E
@.Destination.NumReservation :=
4 c: l! r ?" F* D \ |4 x1 P. j @.Destination.NumReservation + 1;
( ?; r5 |. Y+ p8 [! \. [. v# u5 v7 G end;3 Q+ z2 a5 n0 [4 V: B o
@.CurrIcon := "drivingHome";$ v/ v* h, Q7 ^9 ^ e. U
@.DrivingHome := true;
" l9 Q( K" @; k y* O$ j- L2 p P end;
U7 @# N' ^7 E0 Z else -- the vehicle @ is empty, both vehicle and part are in the same dock station
, f' Z4 w/ C# p, i" h; ` part := @.transpOrder;* g2 a+ i) s* Z6 b
part.move(@);-- load part6 \: K( C! \3 Z* d
@.CurrIcon := "load";
0 g6 L+ {$ c- D" {9 H GlobalDistObj := part.globDestination;
* H. M% o' L5 e: B3 ^ assignLObj := rgmanager.rgAssignL;! I2 j1 k& b2 _, B" I
row := assignLObj.getRowNo(GlobalDistObj);3 N; m3 v e3 q6 i" d
if Row = -1 then -- since 70
' g) B* I: ^% p0 g' J if lan=1 then; w) m. t7 A* C/ T
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),1 H% H; \2 t d* @: j9 P; O
to_str("in der Andockstation: \"",?.~.name,"\""));
; a: o: }' G) H! u C* @8 z else
) m! g. h q0 ]2 M! {: D9 \! ` promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
, B$ t8 l( U& l: z6 P* o to_str("in docking station: \"",?.~.name,"\""));
X: P0 @& \! t$ S c4 b. p; t end;: m; H9 l0 r7 a7 e: z! n/ `
else0 x; J3 x& A. Z: F
@.Destination := assignLObj[1,row];2 H( ^# h2 ~% X! d+ Y" m
end;
% [% F1 h2 r& Z- z6 G9 i newDirection(@);9 n5 v% D$ T6 U; W, u U# W, u
@.HasOrder := true;
! V, b% _4 |% f end;3 {4 s% N/ ]3 _2 \" u# y
end;
2 G1 k$ W6 `- |! s! _3 Qend; -- of the method
$ Y9 H* v* ^! ]" V9 l/ I ^4 ] |