/* called by: entrance ctrl of the object 'track'( D3 N# ?. u5 z3 \
*/
" d! D) q0 [1 K- x6 j; jis5 o( y' I3 O- g3 i$ {' u% H) j1 f+ m
part, GlobalDistObj, assignLObj:object;row,Lan:integer;5 o4 Q) @, X- H8 ^" ]7 t
do
7 j, [4 U( Y; D Lan := rootfolder.Internal.Tools.AOLlanguage;
9 B6 h# k3 m Y! g4 T9 h if current = @.Destination -- else return; p g& j- E2 N, K
then
7 ~% b" \, o) W. Q1 f @.Destination := void;
+ A, N+ h4 V2 }1 X/ ` if @.occupied then
/ s: R; y; Y, p' P6 F part := @.cont;
# {4 o/ s( `4 l+ S! ^ @.transpOrder := void;
3 {" ?# e' M8 J+ |8 @ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
1 G0 n) e* J5 W: b$ M @,root.eventcontroller.simTime);
) I* N. _( g2 \4 h2 q4 j @.HasOrder := false;
1 y6 O# i) p: x @.DrivingHome := true;
* y, `% u _4 U$ G rgManager.tryToStartTransOrder;2 ^; H5 W- O; }2 Y
if @.Destination = void
; j( K4 m! I* x3 I- w then -- no transport order for vehicle @
$ T" K+ x1 u8 a, G @.Destination :=
5 t! M ?+ D( A# N- I% ^8 L) ^" E rgManager.nearestFreeStation(@,track.~);( s/ f/ `8 h4 Z8 g% H
newDirection(@);
& ^3 I* D$ [4 ?: q% E a if @.Destination /= void then; i- }1 M0 Y- I- x2 k
@.Destination.NumReservation :=' {% }# L p) k$ V
@.Destination.NumReservation + 1;9 j4 Z/ @; `' y7 z
end;- q- q% _! t% E3 f
@.CurrIcon := "drivingHome";* n9 n, w" Z) t9 O2 U
@.DrivingHome := true;# T0 N$ n/ S% w: n3 T1 z+ a
end;4 k3 @* r+ O7 B5 x4 B; E
else -- the vehicle @ is empty, both vehicle and part are in the same dock station9 _ {! o7 h4 g6 h9 z
part := @.transpOrder;
# `: i8 d) M6 ^0 ^" A* _ part.move(@);-- load part9 U1 l6 s& N& _
@.CurrIcon := "load";7 d& g. A; `1 L5 I7 \
GlobalDistObj := part.globDestination;7 k$ q# b1 M% B
assignLObj := rgmanager.rgAssignL;: q; K4 V/ V5 [! N7 S
row := assignLObj.getRowNo(GlobalDistObj);* s& J* e, L' b7 c8 N# \; i
if Row = -1 then -- since 70
5 x) k; C4 ~& {! I K if lan=1 then
$ T/ l" U+ J6 r& R8 ?' V promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
: }- v7 P; m) ]2 s: ?3 l7 L to_str("in der Andockstation: \"",?.~.name,"\""));1 C9 i9 x6 _1 F$ Y
else
4 l( \% h, C* H) s* Y promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),8 C7 W) z. O' H+ M2 B
to_str("in docking station: \"",?.~.name,"\"")); : Q2 B. k7 I& @/ Q4 V m' H5 ^
end;
" B! @: V8 r. J" r( {' e; T else
" W9 j( \% H$ z4 D4 g) M @.Destination := assignLObj[1,row];& K/ Y1 m4 B/ Q4 R1 D/ _3 S
end; ' l) o( S# t1 v$ @: b" @
newDirection(@);& M1 O2 V+ e# ^! X: F* V/ H
@.HasOrder := true;
& T8 |+ h5 `$ y: b end;! t- g, d- Y5 j- ?7 i
end;
: Q$ I& F, k6 } yend; -- of the method8 H* ^/ W& h" |: U, v/ G# c
|