/* called by: entrance ctrl of the object 'track'5 Q. E1 m$ l# |9 a+ A& C
*/
: s h# A% A3 Cis
, [; ^4 ]% u0 o0 w part, GlobalDistObj, assignLObj:object;row,Lan:integer;
/ r, z1 U- _" W, Zdo
! R/ ^' V8 b3 j% ^. K4 ^# r Lan := rootfolder.Internal.Tools.AOLlanguage;
; h |* J/ O0 ?4 @& I if current = @.Destination -- else return
F* o" Q- a. n! n then
8 A4 U8 n: B2 q; H) d7 c @.Destination := void;1 @( p- w, X7 P
if @.occupied then0 Z* n$ x+ r# a! O
part := @.cont;
* p4 C' w1 G8 W2 z# n! ?" ~# t; B U @.transpOrder := void;/ U8 m8 h6 l( f) O; v: _
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,6 f0 K# S) v# X( z
@,root.eventcontroller.simTime);
1 A0 s2 e( o) a3 ?: z$ l6 I @.HasOrder := false;
/ C' V% D5 p: i+ |7 `# j9 t @.DrivingHome := true;
& f: P$ |& ?3 i7 Y8 g rgManager.tryToStartTransOrder;# e; e @/ }2 Y5 C, _$ h& t4 u" m. b
if @.Destination = void$ C; W# r0 M: x* \: i
then -- no transport order for vehicle @
4 W! @+ A% @6 G; E% e @.Destination :=2 W( ^4 `7 c+ W0 _2 j1 `, I# e
rgManager.nearestFreeStation(@,track.~);
) `" q& O9 x- M/ s& I5 } newDirection(@); u" t0 m4 S$ D+ \! W
if @.Destination /= void then
7 F# }( F; Y& j& A: U. ~- G+ ~8 u9 n @.Destination.NumReservation :=5 _* c' D! V' I. Y& m
@.Destination.NumReservation + 1;* w% p7 P {9 s. z8 C8 i* |
end;" Y. b) n2 i1 k1 | S
@.CurrIcon := "drivingHome";
. ]. O s9 I8 s" d; S9 B @.DrivingHome := true;
! d5 O5 x9 r" g1 P8 A end;
! L) `) `$ B2 G1 k7 Z else -- the vehicle @ is empty, both vehicle and part are in the same dock station% _5 W& x: W: T+ X6 y
part := @.transpOrder;) w( d, C, O0 ]: t2 V( ^- j" _& g
part.move(@);-- load part8 v7 h4 l/ x* _: \
@.CurrIcon := "load";
% M* D" `% L! z, z$ H GlobalDistObj := part.globDestination;% Z& W% O: e, [5 k2 K
assignLObj := rgmanager.rgAssignL;
6 @& }: [& G' T9 [% h2 X row := assignLObj.getRowNo(GlobalDistObj);& s( T: A% o, d7 Y: U+ R! ~
if Row = -1 then -- since 70/ F9 z9 X2 M# \: y2 K; N) v
if lan=1 then+ v: u" I6 Q9 V% o) A4 t
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
( c& ^6 m2 O1 o/ i" R to_str("in der Andockstation: \"",?.~.name,"\""));8 ]& J/ t- ]. }) X! K3 A, @
else
+ i) e |4 X' g* | promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
1 n/ \5 Z( `9 K to_str("in docking station: \"",?.~.name,"\"")); 3 }, b5 r- @, u- K, w# o
end;* A7 ]$ \1 D/ Y. Y* B$ m. X
else
3 G# Y3 m% m" {* _% G @.Destination := assignLObj[1,row];
' `" R* @; j! |' q6 F end; 7 \# u5 }8 y! i8 I. e6 e9 |
newDirection(@);
" l" j7 n) E' V" H$ D5 U! d @.HasOrder := true;8 W8 u' |: d! n# D/ L w
end;- n5 [6 X, s- q- w
end;
; l2 s4 y& |' j0 k; }2 Gend; -- of the method
( f& v( \* h0 m @ |