/* called by: entrance ctrl of the object 'track'# Y9 m8 u- d U8 h1 b. G
*/
' ?! g+ O9 E9 K, |/ p5 U- a! jis
6 a5 ^, ~3 n$ }& p/ U5 [6 `: z part, GlobalDistObj, assignLObj:object;row,Lan:integer;
, G/ X# E3 v1 P! {* x. tdo! F/ [8 G3 w- \: c" S
Lan := rootfolder.Internal.Tools.AOLlanguage;% Z7 _" F. s# T5 c8 m7 m
if current = @.Destination -- else return5 B8 z/ |: d) u* ]8 N
then
7 r9 J$ J5 G, U/ q! k& d k% q5 z @.Destination := void;
9 U2 s2 A$ m9 o' |0 i if @.occupied then& x3 `$ o2 i3 `! d% J% Y
part := @.cont;
# w1 L' y* ]. e* N+ O @.transpOrder := void;
: C" s- Q i0 f part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
7 T9 t: h/ G+ W& R7 P+ Y8 v7 h1 I @,root.eventcontroller.simTime);5 ^( L3 a# K0 t6 O1 p, p' B2 {
@.HasOrder := false;2 j r: B. n; d3 D* w
@.DrivingHome := true;
. ^. X8 w2 s2 } rgManager.tryToStartTransOrder;3 q, Y5 j1 X2 R) f, F! m, m
if @.Destination = void# h/ L& N1 x. m
then -- no transport order for vehicle @9 o+ v1 v" o. b) i0 x9 `- l( L
@.Destination :=3 M! P. {9 z5 i# j6 y' N5 ~( v
rgManager.nearestFreeStation(@,track.~);. W' C' B3 t3 W7 g" S" A3 _+ w
newDirection(@);
5 I1 T1 S; W: s. f" u& N if @.Destination /= void then
$ K6 y& {+ k# c4 \, s, L+ s @.Destination.NumReservation :=
u" {) Z# W+ \3 B' E @.Destination.NumReservation + 1;
) L$ _6 w$ _+ |: W end;
, ]1 x& s! j- z* I0 p' o; T @.CurrIcon := "drivingHome";
. t, }8 z$ L9 \2 K @.DrivingHome := true;) ]6 F g' u0 l J" S
end;0 E7 U& O4 G& ?, g
else -- the vehicle @ is empty, both vehicle and part are in the same dock station2 T4 U3 G+ F% }' {5 ~
part := @.transpOrder;2 q+ S; ?; L9 Y! `" e( y) B" [( G K: |
part.move(@);-- load part) r5 K) O3 S" M- P' J9 R. C* M8 ^- \- H
@.CurrIcon := "load";
6 Z T3 Y% e. J8 _ w- I" Y( v" L GlobalDistObj := part.globDestination;9 ?% p) ]( n& O' C/ Y: e5 k5 a3 n& W# X
assignLObj := rgmanager.rgAssignL;
9 X7 ` o* ^& u2 o row := assignLObj.getRowNo(GlobalDistObj);$ N T2 f5 ^$ T) C8 V5 g1 B
if Row = -1 then -- since 70
- R5 K9 Y: H8 W* G, ?* Y, Q2 J" p if lan=1 then
' n" P! ]: l6 h: [$ o8 R promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),7 j7 n* {3 k; Q) b% C _
to_str("in der Andockstation: \"",?.~.name,"\""));
% l( G: s+ p9 p# w3 b: k; [2 i else
1 J% u, a B! L9 T5 Z1 m7 ? promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),3 G9 G1 T3 G! N# u& T
to_str("in docking station: \"",?.~.name,"\"")); # B$ {' _" v3 `9 f; c: P
end;7 v* H8 L7 p! i! G- z f& s9 h
else
/ v3 E$ {+ c4 x, u6 x8 H! y, a @.Destination := assignLObj[1,row];8 u/ c$ z- y3 i; B9 x
end; ) N1 M( W* O. [ U: k/ i2 K
newDirection(@);- V; Y% B4 C! p" M
@.HasOrder := true;
4 K% j7 [/ p9 _: c end;
: h& x: ?6 M: T9 z9 i* z& T end;0 C1 K4 M; e! N0 H% h
end; -- of the method
5 `. d1 h2 K( H: h |