/* called by: entrance ctrl of the object 'track'1 j- V+ f3 S: S: M, M" l
*/+ O. T$ F E1 o7 d/ D
is
$ T6 g) r/ P! b! \ part, GlobalDistObj, assignLObj:object;row,Lan:integer;2 [& y6 E) `1 r$ E7 z
do
+ o. ~% O! s. G/ W Lan := rootfolder.Internal.Tools.AOLlanguage;
$ g& r- t* z9 X- a if current = @.Destination -- else return, m4 ~9 M" G9 T6 ` J7 x
then/ |+ }, g1 W; c+ ?
@.Destination := void;
5 y _& o) s$ c( \% _ if @.occupied then
" x+ ^3 i$ O2 {. s& q7 u' h3 ^ part := @.cont;
- f! o7 V5 M0 y, q8 L- b @.transpOrder := void;
8 j, E* l* [. }" R+ } part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,: r6 F t1 C) c, f% P; t0 W5 a; f
@,root.eventcontroller.simTime);. r# j! X) e# D) j" h3 @+ i
@.HasOrder := false;3 D7 Y3 t* x. f$ w4 e4 y4 C% h
@.DrivingHome := true;
4 u0 t# a- t3 X8 c9 h9 T& m' I# Y rgManager.tryToStartTransOrder;7 t7 h% Y3 v8 B
if @.Destination = void
6 }4 Q) ~6 V7 \2 O7 W( }* T then -- no transport order for vehicle @& T# ]' P' @: h; c" P7 y |
@.Destination :=
, \1 y) Z: D; e6 T# W4 v rgManager.nearestFreeStation(@,track.~);
8 I5 ^* J8 [9 i4 n" u0 k, ]. z newDirection(@); 8 E: U. D6 L4 a( F) C
if @.Destination /= void then
* Y2 R7 m4 B- x; N @.Destination.NumReservation :=
$ ]# m5 c, p9 H5 Y N1 [ @.Destination.NumReservation + 1;
' N+ |1 @2 u* n& r end;
S/ H$ F# w8 Q. A: f o @.CurrIcon := "drivingHome";
! A" \/ m( D/ L8 \ @.DrivingHome := true;9 A7 K: t9 _' ~3 r2 c3 B
end;1 r0 L+ n0 ~8 M! g) Z
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
& W# ~. G3 c6 q) Z7 [ part := @.transpOrder;
- }& G# t9 n% E# H r part.move(@);-- load part
0 y$ V3 ?& U5 W @.CurrIcon := "load";2 y, D# Z2 b8 G4 P" Z2 T
GlobalDistObj := part.globDestination;6 h# @0 l4 o; F d$ i r# b
assignLObj := rgmanager.rgAssignL;9 k" r: s) p- k) q/ b" v
row := assignLObj.getRowNo(GlobalDistObj);( B9 ?6 Y" |& t. {1 `6 n" v) C& @
if Row = -1 then -- since 70
& \+ _3 Q1 j4 w, R( G9 M, Q' g if lan=1 then% A3 N5 J" E* d$ ~# Z8 V
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),/ {) F2 N8 L- g4 S! G. N& c
to_str("in der Andockstation: \"",?.~.name,"\""));- P/ R) M! Q: M8 a0 [* X
else! R2 t1 G/ c9 |9 a2 `
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
5 S6 u6 \4 T3 O" b+ {7 g1 K to_str("in docking station: \"",?.~.name,"\"")); . _* r' w4 S) V$ m+ h1 _
end;
$ z; J6 _) t9 x3 u+ U else
- E D' {; X' V+ c" W3 \1 ~, U) N @.Destination := assignLObj[1,row];# v4 j+ r! h; o! H P
end; . A. p; A% T" [3 T2 k9 U0 G
newDirection(@);- G: u/ v k2 |0 a' T
@.HasOrder := true;/ n! u/ ?' ^+ [( j2 l
end;1 m9 `4 u0 c- }' j* t
end;4 P& u0 u' B( E8 K8 k" l
end; -- of the method! ]# h8 d2 f+ }* U9 }* S1 b
|