/* called by: entrance ctrl of the object 'track'" {0 R) I7 K9 j- k) C7 a
*/
; k! h" E# S- O5 g2 gis
% ?. g$ m8 T' b" H! m part, GlobalDistObj, assignLObj:object;row,Lan:integer;1 L' c% @; c/ s6 J; f5 R1 p
do
- J9 J4 |* m+ }& W) C1 c% T& g' I Lan := rootfolder.Internal.Tools.AOLlanguage;& n, i. d. G5 L9 c
if current = @.Destination -- else return
6 ]5 Y' g ^% v, h( J$ j then
+ v4 u4 Q' A- k0 p9 n1 `' A @.Destination := void;
; o W% `5 ~$ }+ m7 s' U: ? if @.occupied then! y9 e" o2 j& w; D9 }4 K
part := @.cont;
% Q9 l# c# Y% r% T1 x( j9 c2 ~, f @.transpOrder := void;
- v1 A. q) V( @8 T. Q part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,5 o4 l% K: h+ A1 m/ w
@,root.eventcontroller.simTime);
. R: D1 w) `& E% F' {+ l @.HasOrder := false;
# r; _# Z: y* T( l1 K+ U: q @.DrivingHome := true;
p5 w* h6 B8 |6 t$ M rgManager.tryToStartTransOrder;
4 K8 l+ N' u& w1 U if @.Destination = void
, P* J7 g% w9 U$ p" H+ I then -- no transport order for vehicle @
( G, [) M2 s$ ^3 g, D @.Destination :=
; }# a/ d0 y2 F& m rgManager.nearestFreeStation(@,track.~);2 P* N) ~+ E: b5 Y$ ^' ^1 [$ e0 ?5 l
newDirection(@); # f$ ]$ I, Q: y/ @
if @.Destination /= void then" o( A/ @) E# m v7 d
@.Destination.NumReservation := X3 r) x; R+ M/ `& @4 d* ~$ j
@.Destination.NumReservation + 1;- C7 s) }& ^$ @7 u0 Z" d; W7 t$ S6 g$ b# Z
end;
. X) b. r! o) G+ r, ]- t @.CurrIcon := "drivingHome";
) y* @& a3 n+ Q% r- T# S9 B @.DrivingHome := true;
1 b6 N" B# G: q" L3 K7 j9 i3 C end;* w. B& D- Y/ S. u
else -- the vehicle @ is empty, both vehicle and part are in the same dock station; x2 R+ c& @9 ]/ J! F
part := @.transpOrder;# R3 G9 E3 L4 R; N* ]
part.move(@);-- load part4 L4 H* E0 h. _ w/ B
@.CurrIcon := "load";
* b7 e/ b: |! p8 N+ ] GlobalDistObj := part.globDestination;7 p; T1 y" M9 w! L/ h8 n
assignLObj := rgmanager.rgAssignL;
/ b' q% u& B5 i3 g( P4 s* ] row := assignLObj.getRowNo(GlobalDistObj);
; U, z; J: ]# J8 t* f if Row = -1 then -- since 70( j9 v S* T8 U+ ~4 R
if lan=1 then9 f. B P% }# j8 U8 r( ]
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),- L* g9 q. l A q, ]+ C% l
to_str("in der Andockstation: \"",?.~.name,"\""));4 l" x1 @* z6 l5 I, t$ y0 P7 R
else& i& ]- }' M3 M4 U, z) `6 Z# e
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
, C" i* ?, ?# d. ^( N! y& c to_str("in docking station: \"",?.~.name,"\"")); 1 A6 M2 m1 o/ V+ p3 X0 N
end;) {% x" S9 c- Y2 j
else
7 M. a3 p! Q8 e4 a' F& S# Q' d @.Destination := assignLObj[1,row];
& b% w: K4 j O2 k+ b0 _ end; 3 Z% e, Z+ _% f9 G0 f
newDirection(@);! b2 e- R8 G0 M/ R) F1 T
@.HasOrder := true;
# H8 L: Q, d+ c) |! ], }7 l end;
2 d# }$ r" k' S( M end;
4 S4 v& D, v- Y1 W3 @- h3 Eend; -- of the method' |* O2 I) E, i. j% r+ q! W% [
|