/* called by: entrance ctrl of the object 'track'
/ f" \0 j' H, B2 W3 |/ r9 Y*/
: ] k6 [( P: ~- m( ^- Z% fis) w6 N! c4 ~ j$ d
part, GlobalDistObj, assignLObj:object;row,Lan:integer;/ E) t( h2 R. Q) \
do9 P* t& z9 S4 T1 _+ D' @: b% N& k Y
Lan := rootfolder.Internal.Tools.AOLlanguage;
0 u% ]0 N9 o+ S3 h' d if current = @.Destination -- else return
: N8 K( }2 j4 \+ n" G4 E$ @* @- D then
; I7 S; m* Q: ?- ? @.Destination := void;
% C/ @ n8 U! q- T9 w if @.occupied then% R/ f) ~2 z, U
part := @.cont;
! @& z! G1 g5 s0 l! M7 ^. {5 W" ~ @.transpOrder := void;
4 y8 r- r5 ], f+ t& k9 D, Y part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,' s' d" K# }8 l) _, s
@,root.eventcontroller.simTime);
, m! f0 v7 f! K" r/ p$ h- S- p @.HasOrder := false;
! Q9 y A7 @( T" ?* P) n. o k @.DrivingHome := true;
8 Y: C% o3 T' z. s rgManager.tryToStartTransOrder;
* E+ n3 Z, v( _: d; y* e. C if @.Destination = void$ k% a; I* r0 V9 d: d; T1 } ]
then -- no transport order for vehicle @! T# q! B" J$ h- B- Q
@.Destination :=& s5 q. F/ U5 D7 Q" ?1 C! X2 ^
rgManager.nearestFreeStation(@,track.~);
0 Y1 ?$ I7 E J; P* V, ^5 \. g) j( z newDirection(@);
; S( u+ ~) T& x8 F if @.Destination /= void then
8 `$ \) a4 r# T @.Destination.NumReservation := D! p* C. v. X0 M* v5 K
@.Destination.NumReservation + 1;) g5 }: P8 }0 \7 s
end;
+ B# m* \ v. W& D @.CurrIcon := "drivingHome";
# g2 R1 s% I! P w9 A* l @.DrivingHome := true;) m6 R& L& P2 C, ~5 F
end;4 S2 r6 F6 b: C% Z* {( i+ p
else -- the vehicle @ is empty, both vehicle and part are in the same dock station9 a" _$ D0 {6 i4 D
part := @.transpOrder;
1 z6 c- y7 b+ X4 z# X part.move(@);-- load part
' r& h/ w* c6 l! A: x1 ^ @.CurrIcon := "load";
4 k+ A% X' d# Y8 @2 _9 u GlobalDistObj := part.globDestination;3 D8 ]; b+ r2 w, v P0 R
assignLObj := rgmanager.rgAssignL;; V" h P3 Z) _$ c5 ]4 O; s: D: S5 s- G# R
row := assignLObj.getRowNo(GlobalDistObj);
8 R) ^3 O$ }: G' M# { if Row = -1 then -- since 70
, {2 H6 ]7 g0 Z8 | if lan=1 then; R5 p# U: `# u
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
1 `. I! O- O% u+ y1 K to_str("in der Andockstation: \"",?.~.name,"\""));
7 N6 o# c) L8 ?& E! ~ else
: z4 U% w& M& z' t `8 x promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
9 k1 }! G K5 R; Q+ s) k7 Z to_str("in docking station: \"",?.~.name,"\"")); 2 N4 P5 C6 X* q+ A, ~ y2 f
end;; w$ {2 p; |1 V; ~
else( E9 T `' M) |" B* C* c7 ^
@.Destination := assignLObj[1,row];! e, o4 g& ^! A. |5 o2 y, r! j( m* \
end;
" Z6 w0 ]! Z" |% |" l newDirection(@);; f5 K+ P3 l0 h% D2 A
@.HasOrder := true;0 a; z& E2 S# d/ r
end;
' t/ M. o) }: L* z; h! n9 V0 `- s R end;
$ g; ], K! T y ]# Q6 Kend; -- of the method
* }7 D4 Q+ Q1 {# w) t) s; l |