/* called by: entrance ctrl of the object 'track'7 b/ l- T e+ l1 t& g
*/6 G1 ]7 T: S. H; `& \
is
9 l0 T+ M; J/ w4 `1 U. M7 ? part, GlobalDistObj, assignLObj:object;row,Lan:integer;
% ?: \0 w9 R2 z- |4 I% Udo
0 \$ G3 `- r; |" M6 J! m Lan := rootfolder.Internal.Tools.AOLlanguage;
7 A* ~8 H; P: M3 b- r if current = @.Destination -- else return
4 ~" V1 Y5 R4 N# W; p% _ then
- @0 @2 u# n! N2 z @.Destination := void;1 q. s8 a, V. h/ S F, P" b! [
if @.occupied then
7 H+ }/ H- I- W1 W part := @.cont;
G; A' i7 e2 P$ s @.transpOrder := void;
+ }& q, K% X" U, _" a2 v2 _ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
, l J: F$ O2 K. z# m6 Q9 G6 F @,root.eventcontroller.simTime);) I( w# Q0 v; b& |" [+ c
@.HasOrder := false;
) g& S9 X0 b5 `& B/ G; X5 K @.DrivingHome := true;
' v. k/ F) @8 h0 H1 [" i ? rgManager.tryToStartTransOrder;
7 c7 e, G) j$ m$ E if @.Destination = void
0 }# x3 i6 \* \. |4 v& Y* }6 L then -- no transport order for vehicle @' ~3 `, m! e7 G/ m/ w
@.Destination :=( O# U& q& S9 m3 m: m+ Z+ _
rgManager.nearestFreeStation(@,track.~);& i& s/ l, v0 L2 B
newDirection(@); # K+ D" T5 F7 A* [7 @% v6 V
if @.Destination /= void then
1 B9 c0 u8 I/ h1 c- C0 f% _" |, y' e @.Destination.NumReservation :=
) ~: w% R# x$ t' ^6 {4 K! d' S; [ @.Destination.NumReservation + 1;* i$ ~$ {. S, r( ]. ]
end;
0 G1 d- @( d/ ^$ U$ Q+ ~ @.CurrIcon := "drivingHome";
. `0 r* L0 c. Z8 Q3 ]% O. e @.DrivingHome := true;
: X0 G* D3 D* v, l end;8 g: R! ~) B2 i) S; h3 b( B
else -- the vehicle @ is empty, both vehicle and part are in the same dock station" Y) R, V0 T, c1 G+ X$ [4 c% c
part := @.transpOrder;
' K# A! i3 M/ j, `" i part.move(@);-- load part# m$ t, f9 f7 `( K
@.CurrIcon := "load";
) N$ i: l9 A2 \4 D$ t GlobalDistObj := part.globDestination;
1 Y7 k$ i/ x7 P- R0 w) ~1 B assignLObj := rgmanager.rgAssignL;
4 B7 z8 G9 z* z0 @/ J row := assignLObj.getRowNo(GlobalDistObj);
% o: H: s* p0 z$ T9 d if Row = -1 then -- since 70
, S2 J0 o, a1 k+ R' A5 ^ if lan=1 then; G; [- g j8 v# g6 g4 x
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),' ^. j! f/ T% n" p
to_str("in der Andockstation: \"",?.~.name,"\""));) K& ~) g) W3 z, g. S
else, l, U2 |; p6 ]- Q; ~) k4 O/ H
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
0 Y: a0 o) k5 Z9 q( y$ Q to_str("in docking station: \"",?.~.name,"\"")); - ^4 I# F" Z# s2 ~- U5 t1 `
end;* l0 V J$ G8 y j( b
else
0 K ]) {8 Y+ e7 t' b @.Destination := assignLObj[1,row];+ t& Y- E3 f+ I% Q, w2 J/ C
end;
- s" [9 Z5 ?; \ newDirection(@);
5 s( m$ d( U* p @.HasOrder := true;# J% X- s4 k9 F) p& s- N
end;- j1 _* L2 O3 |, W! n
end;
( U% O7 C; s; n. q tend; -- of the method
+ X' ~6 h# ]" l. ` |