/* called by: entrance ctrl of the object 'track'
- n. O- M4 k9 h' f*/
! Q+ {4 g* ^, D! I- eis
8 j6 W5 A" P- r! e& j8 O part, GlobalDistObj, assignLObj:object;row,Lan:integer;7 Q+ `7 G6 O& c; d% y' z
do+ m/ Y6 s8 L6 |( B! z
Lan := rootfolder.Internal.Tools.AOLlanguage;
5 J1 |0 |# |# O# l+ ?& L if current = @.Destination -- else return
% h* j: `$ Y4 p6 b! A5 B then; Y# A7 B y" e
@.Destination := void;0 W+ a1 ^; b* Y5 M
if @.occupied then4 \$ k4 i& F }2 c/ q
part := @.cont;
& q9 q3 ^' i- N @.transpOrder := void;* V- T0 v9 u/ f0 ?6 l
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,! }2 X$ _. K% h$ f1 G$ a; z
@,root.eventcontroller.simTime);; k- r5 ]; N9 U* O
@.HasOrder := false;2 [4 O1 d* y& Y; `/ Z5 R3 q, t
@.DrivingHome := true;/ e# L5 T2 \8 G! n+ E
rgManager.tryToStartTransOrder;
0 `& P$ Z6 d# t D H if @.Destination = void
- G. k9 b4 d Y4 f" [9 J then -- no transport order for vehicle @
4 E" `( \8 \' u0 L5 Q. N3 J0 x4 C @.Destination :=
4 R, q0 h; U) v5 S1 M& F$ t rgManager.nearestFreeStation(@,track.~);6 [6 M7 X2 X9 i9 ^7 B- _# o. G* d
newDirection(@);
% }/ _, W- ]6 ?6 D) }) f if @.Destination /= void then
. C0 t9 W) m; u @.Destination.NumReservation :=
* H6 r( i8 J! @1 p) } @.Destination.NumReservation + 1;+ C5 B- k/ o+ ^- P! \
end;
9 R! O o6 _ K+ @5 g$ n @.CurrIcon := "drivingHome";+ G. B7 p& S1 c `1 [" X
@.DrivingHome := true;& O. ~0 X. M+ j' V- h
end;
8 n- B5 p: [/ C5 p- R6 ~ else -- the vehicle @ is empty, both vehicle and part are in the same dock station: Z. g% D$ k; W4 |, A
part := @.transpOrder;5 W; W" Z$ v1 T+ K) P
part.move(@);-- load part, v, N* N' a8 F6 E
@.CurrIcon := "load";
8 y- U3 Y6 w* ~) H( h6 X" j- S GlobalDistObj := part.globDestination;$ X* O5 u+ }& R0 }9 r2 H; {9 v' ~
assignLObj := rgmanager.rgAssignL;
* p; k( _+ e& |) M( A row := assignLObj.getRowNo(GlobalDistObj);' Z& |5 w! @, d
if Row = -1 then -- since 70, _: d- g- g( n3 i% ~- W
if lan=1 then
" v* T' b) }/ U$ _0 i& t4 U promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),2 v4 f0 g+ t9 c) V" ?/ M
to_str("in der Andockstation: \"",?.~.name,"\""));# p/ `" z: ^6 P7 R! N$ w
else+ v8 Z4 u" S {. Y$ W: a# y/ U
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
8 C; [8 t6 M5 _) W; k to_str("in docking station: \"",?.~.name,"\"")); . E w( H5 n7 l9 H |7 ~! @
end;5 j' f" P1 J8 d. Y* [3 u" X
else. ?5 a; }1 ?/ n9 l! q% P5 U
@.Destination := assignLObj[1,row];, O6 d0 s+ [ P& F
end; - R/ c. o, f9 e F b3 _+ y% O
newDirection(@);
3 o: n9 p, a- J: _7 p: ]4 e @.HasOrder := true;4 P+ C0 G1 U1 f1 {* c* M v
end;
" J' g- d8 P$ @/ C9 c2 N2 C [, | end;
8 r+ c. V; f5 e$ g- ?, f+ N6 _end; -- of the method
( Z# T% [" I( k) q( F/ t |