/* called by: entrance ctrl of the object 'track'8 R' `7 V3 e" D
*/8 P2 o3 @+ X8 L! d
is$ O+ ~) G1 h: u( h {& j# \6 x* @. c
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
4 g3 O" N- K# i! b/ t( u- V& Ldo
$ o! R2 D8 Q; S* \8 R9 o Lan := rootfolder.Internal.Tools.AOLlanguage;4 m$ M' o, C; ?! y" u
if current = @.Destination -- else return) U2 U$ W$ e$ M5 G
then
. l0 r, R& o% `* O( l X @.Destination := void;* _! ^- I C' C7 E- k! V! L
if @.occupied then
9 ?. e$ L1 A. `1 K b! ]% q i part := @.cont;
- H( F" j! t- `' Q. t# i @.transpOrder := void;$ R0 Q" c9 \9 |+ ]6 I
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,: ~9 m0 v0 k8 O e) p
@,root.eventcontroller.simTime);; P4 h7 y3 c" P4 b) I- C' N
@.HasOrder := false;
1 B7 @+ D+ V% W' ] @.DrivingHome := true;- i* G7 w7 y G7 `: ^% ]3 X; P
rgManager.tryToStartTransOrder;3 P% b- v- w4 U8 T$ i5 A" G F7 }, m
if @.Destination = void
2 [4 P9 A2 X0 T( [6 [2 o# R0 G7 Y then -- no transport order for vehicle @& w4 W7 ^$ I8 o4 \# w$ d% ]
@.Destination :=
% [8 M" r) X) j$ o3 U; Q rgManager.nearestFreeStation(@,track.~);
. f1 f$ D% ~7 T ]3 o' Y* { newDirection(@);
( P1 T: y+ M X# a( s if @.Destination /= void then
$ ?$ r% T- E1 e @.Destination.NumReservation :=
" E7 \" c& T$ N6 S4 d8 i @.Destination.NumReservation + 1;
5 Y+ I! t6 s! }0 T0 R end;
; a8 n8 I1 B$ q1 B: @ @.CurrIcon := "drivingHome";4 u. f8 [+ r8 M: U% C2 S
@.DrivingHome := true;$ q. u+ ~5 \9 p* t9 k" }
end;+ X0 L+ G& i+ l; S0 y y
else -- the vehicle @ is empty, both vehicle and part are in the same dock station5 q; Q+ d+ L" G3 ]. i; X- r
part := @.transpOrder;
! K; Y5 i8 h. U# \ part.move(@);-- load part2 d" G" f, ?# k. ?& z
@.CurrIcon := "load";& Q- j3 @1 `$ s+ ^. g5 j; l
GlobalDistObj := part.globDestination;
& D4 K" r+ P3 E) c# v+ R assignLObj := rgmanager.rgAssignL;
; J% K5 r. F( V( e5 G5 @ row := assignLObj.getRowNo(GlobalDistObj);
! X( C0 ]: w' l+ u! w- l if Row = -1 then -- since 70
a0 K6 S0 n/ L1 n! @$ b0 f if lan=1 then
0 h3 p- m9 U7 Y3 h promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),0 x. V- r/ t+ ?6 N9 u( [1 U5 X0 b
to_str("in der Andockstation: \"",?.~.name,"\""));
, Z2 H. A ^) O6 M' i2 e else1 z6 u6 E/ L: G3 O7 j: z% @
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
$ T5 L8 z g- ^& a to_str("in docking station: \"",?.~.name,"\""));
7 I5 |7 `) s! \+ W8 [+ e$ x end;0 F8 g, |! `1 k' {; G
else+ z- ~3 _; u" o/ J# b, @; J
@.Destination := assignLObj[1,row];
g P0 K- @7 T& {. Z% j7 K end; 8 e/ K& n: _# w1 c
newDirection(@);
D, _4 d) V! a0 _& j4 e$ h2 u5 E4 {3 B @.HasOrder := true;$ }/ S5 U# J! U8 n
end;
' ] j& g4 K5 f' J) M: Q! Q% l1 k end;
; R; I; s4 d8 E/ H$ c: R! U5 qend; -- of the method
- _$ s7 r- `, L: ^ |