/* called by: entrance ctrl of the object 'track'
2 {( k3 A6 Z8 w8 H$ O, o3 L+ g*/
1 Y( x8 C4 j1 o# Qis+ j" t. C Z7 ?
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
& c1 ]3 W l3 ^6 q0 o8 Vdo F0 }6 b7 ~2 U9 F( T- S
Lan := rootfolder.Internal.Tools.AOLlanguage;
. T& [: \, ?. Z: D. T4 x8 `' S* u6 n if current = @.Destination -- else return7 r+ l, a6 S. i5 p3 U7 i4 l0 {
then% ^* ? ?' ^. T8 @# y: o
@.Destination := void;
! n& D& d8 F8 m4 A if @.occupied then
* s7 b' f! A J1 X" P# s# s part := @.cont;
5 I/ {/ B4 N& p: c* U8 N5 z. O @.transpOrder := void;
% P+ H& `$ k @/ r part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
c' |4 p' C, R @,root.eventcontroller.simTime);
- ]% x, a2 E' M8 k @.HasOrder := false;
& S' ]0 t* R1 W @.DrivingHome := true;7 g; G- s& { N) Z, z3 n& P
rgManager.tryToStartTransOrder;
4 C6 t% J1 W6 ?: s) e4 h if @.Destination = void
% a' | G$ d2 s7 x- n+ O then -- no transport order for vehicle @
$ M2 J8 Q- n. U1 W6 Q. ? @.Destination :=
0 |8 I! V q9 S) i. f: V- Y rgManager.nearestFreeStation(@,track.~);) t9 Z- O7 j4 e: E' G; D$ h
newDirection(@); - j. ^$ x* T) g( h
if @.Destination /= void then
% [4 y' |, x& Z; d0 K! i4 @ @.Destination.NumReservation :=% t N/ G: p1 y/ l) E6 k8 \
@.Destination.NumReservation + 1;% B: W# g4 t& u- J6 H
end;
' D0 o" f: [" h9 b% [ @.CurrIcon := "drivingHome";' i1 I' x, h$ b* }1 }7 H _! }6 Q& c Y8 K
@.DrivingHome := true;4 l0 F) Q' k7 ~0 q
end;
' J: D% q5 W" M1 U6 }, Z else -- the vehicle @ is empty, both vehicle and part are in the same dock station) \/ b$ [7 D4 c- \3 v
part := @.transpOrder;1 G ^, V: m* t$ e1 J% _
part.move(@);-- load part1 m( q7 A/ Q' `" {( [* o( ~9 {
@.CurrIcon := "load";4 i0 s! T1 o2 S4 l
GlobalDistObj := part.globDestination;
' U* _6 s6 a( {3 ?' T assignLObj := rgmanager.rgAssignL;- w: s Y7 y6 C' n8 @) z, T5 n
row := assignLObj.getRowNo(GlobalDistObj);/ B* N5 C4 B5 o3 S$ L# a, V; L
if Row = -1 then -- since 70
5 f% d+ s+ F" l* [3 P" K if lan=1 then
6 c2 X) V0 w8 d. \: S" L* `) e# h promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
9 s4 E, L2 |: z to_str("in der Andockstation: \"",?.~.name,"\""));$ `' Y4 @( P9 h
else
, i; f) s6 c$ p9 l2 d5 V$ |2 { promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),6 N; W4 P3 J: f( g- Q
to_str("in docking station: \"",?.~.name,"\""));
1 G1 s9 N. z9 i5 [: T8 v8 _ end;
* u T- t- @- h: S) u- m else
, f$ [$ b6 }) C% h$ X! @ @.Destination := assignLObj[1,row];
1 S5 U/ R% H) k4 O! r& E( y end;
- m& R; ]: r f j( } newDirection(@);
( T; G0 u, O- ^3 n9 B; ?1 n @.HasOrder := true;
& ~# `$ {% F; h end;/ R. @% u! }( ^! V: s' b
end;! P2 T+ S2 S+ R+ u
end; -- of the method
. l9 m; j( T# A1 V( H1 @ |