/* called by: entrance ctrl of the object 'track'& `5 p' C7 o, Q
*/
7 I0 j( A& e, J! |! ~3 `3 H) w. v. a- V7 o3 Mis: l$ l! I+ d+ R- q2 i( O
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
6 b- k* m3 Y1 s$ f% `do
7 L3 B) Y" g! X' D1 b! B9 m. D5 q Lan := rootfolder.Internal.Tools.AOLlanguage;- ?+ o \' `% i8 N
if current = @.Destination -- else return
* v4 ?# X9 L. \& Y/ J$ L then# G1 r1 e9 y4 w
@.Destination := void;
: J! ]! c. N6 o+ Y if @.occupied then! \' z$ }+ Q' C% F$ G
part := @.cont;0 t O2 g. P( ^% P7 ?6 _9 Z
@.transpOrder := void;
8 F4 M- P) d! p part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
# @/ Y, z( Q) x F @,root.eventcontroller.simTime);
8 Y8 W/ v; b9 z- V6 R' x1 Y1 Z$ | @.HasOrder := false;% J& k3 f0 ?3 {, m$ R! w
@.DrivingHome := true;( e" b% M' G. P9 {8 g' E
rgManager.tryToStartTransOrder;
' i$ E5 l% G, D; @ if @.Destination = void
' ]6 X5 v, x$ F8 Y' l/ f3 D then -- no transport order for vehicle @
; L# j5 z1 k0 i3 D; x4 p @.Destination :=2 D) m f) m3 [* f$ a' y
rgManager.nearestFreeStation(@,track.~);
9 w! E/ z6 R; g3 V+ x6 t newDirection(@);
* q* F( s$ U) M O: ^5 i if @.Destination /= void then4 ?5 j+ s6 [& |8 Q& K4 o
@.Destination.NumReservation :=
3 z& m) D+ X' a4 w, C @.Destination.NumReservation + 1;
- h) m3 w$ ~' `7 ^2 J end;
" C8 l( J% t# h% x/ `/ w, T @.CurrIcon := "drivingHome";
( p; a) ?; q) H% W. a @.DrivingHome := true;
( O7 |0 E6 S# {2 I/ F* t9 F( n end;8 n- e, y, C9 B4 U; G0 C! J7 t
else -- the vehicle @ is empty, both vehicle and part are in the same dock station- G1 G. g1 i4 \: W) H0 [9 y
part := @.transpOrder;
* c Y* G$ Z' n+ ~: G3 ^1 ` part.move(@);-- load part
1 w- @. K0 {$ ?* G @.CurrIcon := "load";
6 [$ P' L% E7 I$ t GlobalDistObj := part.globDestination;
+ u+ m" R1 w0 g2 U assignLObj := rgmanager.rgAssignL;' Y/ G! Q6 K3 F8 q& [5 K
row := assignLObj.getRowNo(GlobalDistObj);$ R# l* H9 i" }! K$ o
if Row = -1 then -- since 70. n: G- y, _ g$ ]4 g
if lan=1 then
0 d2 E2 }! a" Q7 p- L promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
, i% g. I: V, s$ _+ [/ e" h5 X2 i to_str("in der Andockstation: \"",?.~.name,"\""));
% Y0 }; ]4 |( h/ A$ y k) M else
2 l3 F& b% {, K% h promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),: h# |+ ~$ T3 ?0 u
to_str("in docking station: \"",?.~.name,"\""));
& B( j% _4 C- Y3 j) g+ [ end;( m& Y4 `0 ]) K! v7 S2 b1 o
else
: v# H4 }; g2 o. v @.Destination := assignLObj[1,row];& u9 G8 [; \- \$ f, p
end; ' h8 T+ n- g' r. _: z1 t
newDirection(@);
/ X! i5 [" ~- n) s5 y/ G @.HasOrder := true;
# N! X9 `8 a( N2 n end;
# c+ T4 L! X) L0 b3 u end;1 }0 f5 \3 W. a+ V) x
end; -- of the method
9 ]2 B5 _6 \, @/ S" H" ` |