/* called by: entrance ctrl of the object 'track'- W$ [) |4 ^4 E: B
*/& {0 Z! W( J4 D3 Y
is# C. X5 b# @ x: B0 e$ T
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
( N" b! {8 F( M5 _5 w% N) ]' @- `do8 V7 a: m3 U s; a |
Lan := rootfolder.Internal.Tools.AOLlanguage;' o' b% l: {$ J4 ~% }1 V. D9 H& C4 ?
if current = @.Destination -- else return
( A% U4 \3 y# W T then& I; O: N! ^% e
@.Destination := void;8 o6 o" M, l$ E) D3 d+ U7 a
if @.occupied then
4 ]3 y1 S8 J. J part := @.cont;
# `: b: b! ^5 ?) V! e/ T, |$ S @.transpOrder := void;
/ B _& e V% ?! F% i: Z: s part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
2 ^* M5 z( J/ d1 V @,root.eventcontroller.simTime);
1 \+ W; \1 \# v, @4 m @.HasOrder := false;
1 k! ]: F2 y5 [' [ @.DrivingHome := true; t3 F' \' i, d1 b# m
rgManager.tryToStartTransOrder;
; O1 i# W, o. P6 { if @.Destination = void8 J: ?( I. |1 Z
then -- no transport order for vehicle @
& s# Z5 ]- M( } @.Destination :=
4 x$ |' a4 J5 f: r9 u9 _ rgManager.nearestFreeStation(@,track.~);8 L& B+ U/ m4 }2 D/ d
newDirection(@);
) Y9 ^6 L" t$ F7 X if @.Destination /= void then
$ Q8 q$ E6 ]/ T @.Destination.NumReservation :=2 y8 L( A; S( w: e' W
@.Destination.NumReservation + 1;
. D& \# l* d- M end;$ ]5 F' H5 u9 c+ C+ I& P7 z5 ]
@.CurrIcon := "drivingHome";/ L, k! d% h2 B( h& G$ ^
@.DrivingHome := true;$ J7 g7 Y8 j& s' p4 ^: I% i
end;7 I q; y; v8 p" u5 P/ G
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
. X7 ?* v* a3 G; ]. T* J9 K part := @.transpOrder;1 z% B7 \; {5 C" y+ E1 d
part.move(@);-- load part
0 y7 t4 \" ?1 V% d2 e @.CurrIcon := "load";
( A: |2 Z2 `! F: q* t7 F GlobalDistObj := part.globDestination;
: S5 P: p" e' m' H assignLObj := rgmanager.rgAssignL;: C8 d( A3 W6 `' a
row := assignLObj.getRowNo(GlobalDistObj);
+ ^8 k! q1 x' f0 \ if Row = -1 then -- since 70
, y+ c9 \; {' H if lan=1 then
+ u+ e9 _% i; R+ _ _ promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
" f) J, |% u# M" P, C# b to_str("in der Andockstation: \"",?.~.name,"\""));
& |! G/ G. b4 \ else
- r" `( {2 H- g. M, h8 X promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),: F: `4 z" Y7 E6 O" G7 a
to_str("in docking station: \"",?.~.name,"\"")); 4 G+ Y4 L- j# T
end;: R2 \# F. \) v4 k4 { b) j
else' O- l, Z( R; _0 |2 x# U& w
@.Destination := assignLObj[1,row];
, T V1 K' `1 K. Z end; 3 f I8 n, f8 ~2 }, V3 a
newDirection(@);# A M7 y' m2 m, O6 ]1 @
@.HasOrder := true;* G" D9 M2 {2 x* ?
end;5 F+ \$ I- U0 N T0 p
end;
( w- E8 t8 e6 A% qend; -- of the method
" E& {: S7 |! t |