/* called by: entrance ctrl of the object 'track'
F8 W9 {4 D9 P, M. a3 [*/
% |, @" j; f8 v3 ^" s7 cis' J) w5 h- y: f. v; v
part, GlobalDistObj, assignLObj:object;row,Lan:integer;, s% m. s& X6 }& a- X1 ~4 `
do& i2 I6 k5 T& ]
Lan := rootfolder.Internal.Tools.AOLlanguage;- X3 s6 d9 v( P S" r* M! c
if current = @.Destination -- else return
7 M- @2 B5 Q+ U3 V4 ^4 L then
; L8 V4 Q* r3 N7 y; w4 o( \ @.Destination := void;4 ?9 c! F4 c- |+ ~6 t" g- y- A0 U% u
if @.occupied then
1 D1 b* @9 l ~. s1 f$ i- H part := @.cont;: n' f4 R2 B, l( B8 U
@.transpOrder := void;7 z# B ]1 L0 o8 V7 R
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
( J2 s1 I0 w- Q' \; F" j @,root.eventcontroller.simTime);( W: p- u6 L( V# j, n) R/ {
@.HasOrder := false;
1 d3 m* A: L* d6 ^/ E @.DrivingHome := true;% z' J* g" q; z/ u9 p0 J
rgManager.tryToStartTransOrder;
( H9 h. F% Z4 U# e if @.Destination = void
9 F# G+ {& u+ O7 T, O, U then -- no transport order for vehicle @
$ B9 t! [6 r7 J0 f. @ L; m @.Destination :=* X) y0 Q5 D2 a7 g3 v
rgManager.nearestFreeStation(@,track.~);- m, F/ i4 m/ @% e4 @
newDirection(@);
2 f# R3 a9 i; C$ |" G if @.Destination /= void then2 ]/ H2 y; M1 D; O3 B4 E" y
@.Destination.NumReservation :=9 d$ n' w1 T$ [8 F
@.Destination.NumReservation + 1;
) ]3 a% L6 i j) e' _: g7 Z end;
& N( A- p6 a' U* x- } @.CurrIcon := "drivingHome";
m% ?2 C, J- O' s ~ @.DrivingHome := true;
3 P/ o/ F/ x/ t, C: W5 P end;3 U5 b9 Y& j7 a* ^8 o& o
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
6 }% k4 F& t; T5 e/ ] part := @.transpOrder;; \# Z+ q. N9 k2 U$ B
part.move(@);-- load part, R3 W; X1 T( n0 M1 d
@.CurrIcon := "load";
3 a/ Q% T" ^- L GlobalDistObj := part.globDestination;
+ r2 s) s& C4 \0 P1 j, g assignLObj := rgmanager.rgAssignL;7 i. ^2 \! ]* \. V& }* Y
row := assignLObj.getRowNo(GlobalDistObj);
+ `9 R" ?2 f5 @# H' g) |, }( _ if Row = -1 then -- since 70
/ E a3 j; B C3 W0 E- | if lan=1 then( @, \4 L' z9 q8 g" @& s( M
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),3 S( Z$ I! K2 w" z
to_str("in der Andockstation: \"",?.~.name,"\""));
! k6 L: X2 y' l else
1 ^2 l) [/ f, I; ~+ U, s0 w. R! t promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
# |+ Y z, p4 Q( \3 r to_str("in docking station: \"",?.~.name,"\""));
, f: ?$ r l" f) F end;4 w4 y3 o: X) a6 \% z, j
else C5 [1 Y$ R0 c2 d+ w
@.Destination := assignLObj[1,row];" _6 b5 L; Y# X0 A
end;
* y' [ o. ~3 d3 m" b/ N* j newDirection(@);
; J4 p a; Q0 b. |7 A8 e @.HasOrder := true;, ]* K! M# C; U0 f: `, q0 ~
end;$ o3 W6 }0 |4 z% X1 s4 G
end;
: z* S4 e! h$ S V& M4 e; ^end; -- of the method
3 u7 y7 Q5 U! X I; m |