/* called by: entrance ctrl of the object 'track'8 i' j, q' ], G) I
*/
# q z8 W5 `' z- v$ j; yis$ `1 N1 n$ b# s5 G2 z
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
) }; w& W5 M) L1 N" cdo8 `0 _' Z. k5 O4 U* c( W# ?' o; @
Lan := rootfolder.Internal.Tools.AOLlanguage;( L! f* o# q9 d4 y$ J# [3 ~% q
if current = @.Destination -- else return
7 {: P/ Z; h5 L6 H* E& T! A then
0 y2 {" e8 B5 d$ |: \. d @.Destination := void;. o7 x4 I0 i$ B1 }, t3 l2 f
if @.occupied then
' z8 M) H% J$ c C( C part := @.cont;
1 |* d: U: a( l5 p& d9 g! v @.transpOrder := void;
% \) Z- a1 _, z q" k0 c4 | part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
/ U5 Q" J6 V: [# x @,root.eventcontroller.simTime);+ X, L3 e; D H& @
@.HasOrder := false;7 k; x7 Q1 ^- \& t) E. g- b
@.DrivingHome := true; r0 \/ e6 Z0 O1 h! m, q# g5 p& v
rgManager.tryToStartTransOrder;$ [3 {- Z/ W" v: H
if @.Destination = void p9 I% H5 w2 q5 ~* E
then -- no transport order for vehicle @: S" u6 |4 H A- d% i
@.Destination :=
5 e3 L! T8 I0 h5 [5 E6 \ rgManager.nearestFreeStation(@,track.~);
& G& @/ l) a6 D* c E% C. s newDirection(@); + O @" ]' @5 Q1 e
if @.Destination /= void then
+ u H" U0 w, W) ^ @.Destination.NumReservation :=/ G8 _$ D' V; G2 }2 c8 y+ b t6 B# [
@.Destination.NumReservation + 1;
1 p. x- j. N N end;) r& e# `9 A* X& ~
@.CurrIcon := "drivingHome";
( I3 {3 ?5 s0 _# z @.DrivingHome := true; F5 B8 s. K& \$ T
end;
. n. c# s' I8 U2 O else -- the vehicle @ is empty, both vehicle and part are in the same dock station' d2 ~2 b; X) {: x. R' ?, f6 B
part := @.transpOrder;
' {' A3 u1 S7 X9 s8 n' d) C' K6 \ part.move(@);-- load part
# e) U7 P( S3 u2 V7 U, i/ l @.CurrIcon := "load";% y8 s! m* v: z9 Z2 \
GlobalDistObj := part.globDestination;
; C7 R' l7 N3 b+ o4 d assignLObj := rgmanager.rgAssignL;/ ~* Y- X3 U V" U$ w, y' \( u+ o
row := assignLObj.getRowNo(GlobalDistObj);7 b+ _: Y l. I0 F
if Row = -1 then -- since 70
0 q7 ]5 Y& N) ?, E- _6 D, b g; R if lan=1 then
/ t5 ^2 d& x" m( ]2 {" z9 n promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),: M4 Y) f: I7 g
to_str("in der Andockstation: \"",?.~.name,"\""));
. d6 V5 q' M! e. V8 {5 t" f else
) B6 X$ s% K& j) k1 V0 z4 `! c promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
# R2 H. y% _0 B/ b) S) f- J; q to_str("in docking station: \"",?.~.name,"\""));
; H/ `3 B3 Y( J, @) B* Q end;+ b! D0 d) j4 |' c" e- U8 `
else
3 V, ^2 H% d% E @.Destination := assignLObj[1,row];, a. v8 M& y+ o. X, X
end;
! U9 q( N5 p: T+ f newDirection(@);; C( @/ ]- d0 d8 S+ C: N9 [% ~
@.HasOrder := true;
" R7 B3 g* x$ s5 G end;
8 s6 E0 ~3 n) b' c/ g- V G2 h end;
1 m; |# z; G: O: m, nend; -- of the method! d* T `+ E$ I" B F0 n/ H
|