/* called by: entrance ctrl of the object 'track'
y5 ?" f' Y8 M3 V1 N+ g T/ ^" M*/
, ]3 e/ M; J9 j5 X/ t$ `6 Zis
) i" D1 ]1 X9 ~ part, GlobalDistObj, assignLObj:object;row,Lan:integer;
; S7 y/ d7 k* N5 I5 [do
9 A: d* m! D+ L: n Lan := rootfolder.Internal.Tools.AOLlanguage;9 t; v2 A+ p/ p1 b8 o0 \/ T
if current = @.Destination -- else return. l3 g' C, c. d: W
then
7 X5 N4 X: q c8 a @.Destination := void;
+ ^$ F2 g2 j' P3 T3 d2 u if @.occupied then0 b7 ]+ l& o Y6 ^
part := @.cont;
9 u* \3 G( f- R/ V! F1 @ @.transpOrder := void;5 R" z+ y* z7 M8 S J
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
1 p) A0 Q3 h% R7 L @,root.eventcontroller.simTime);+ l, @$ X, T. m
@.HasOrder := false;
8 C6 u$ [0 M1 | @.DrivingHome := true;# u( ^2 s' \# g! P: x
rgManager.tryToStartTransOrder;
, V, F7 w. ~4 P4 O& n if @.Destination = void+ v p, x$ {) e/ ?+ G9 m
then -- no transport order for vehicle @
( L7 q+ e" n. r1 K @.Destination :=1 q6 E4 M- M' ]5 Y$ |- N4 z
rgManager.nearestFreeStation(@,track.~);
3 D0 u* O) b9 ]4 I" X newDirection(@);
# Q$ Y* L9 A3 q7 J& M: c3 O if @.Destination /= void then
( s* e3 T' n" N, C @.Destination.NumReservation :=* U" M5 s: x( z! d0 \
@.Destination.NumReservation + 1;
. y c4 U, I) F0 N1 L4 \ end;
3 O) U( {* x% e6 M; t5 H( f% E @.CurrIcon := "drivingHome";
% X+ ?2 x6 a+ p0 Y8 ^( r7 V. p% q @.DrivingHome := true;
2 N% C' F: H6 u end;
1 Y# E0 g6 E" X/ |1 W else -- the vehicle @ is empty, both vehicle and part are in the same dock station" T) |3 v2 E; V: v
part := @.transpOrder;
- M/ W! z, u6 K z part.move(@);-- load part
, b' Y! n+ A, H @.CurrIcon := "load";: K& p' R1 J0 ~* T/ y
GlobalDistObj := part.globDestination;
% b5 m/ ^/ R% p! K assignLObj := rgmanager.rgAssignL;
: b/ x' v1 R5 R8 l* T4 X2 p g; D row := assignLObj.getRowNo(GlobalDistObj);
: L9 Z5 ]) H& N4 k if Row = -1 then -- since 70
K" P& H6 i+ w" I0 g% |: ? if lan=1 then
+ i$ p+ Z8 e8 o4 g promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
& \7 V6 |# T- j5 ? to_str("in der Andockstation: \"",?.~.name,"\""));& K# ?$ L4 ]1 @% ^. x) \& |
else, C3 n( z1 e" ?) ?( }) S8 Y. r, z/ [
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),6 O/ J0 }) Q1 S+ y, B. M
to_str("in docking station: \"",?.~.name,"\""));
3 \4 @" U. l6 j. Z end;* i% L H3 j3 a, q+ o8 V8 ~
else
$ z" M ~& O) Z- [. f) t0 X- l @.Destination := assignLObj[1,row];
. k! S$ S+ A! Y; S* `" i! k( c end;
I) j6 G: V* c ^2 T newDirection(@);' P6 Y4 ]- L3 u. k+ y% A8 v
@.HasOrder := true;
7 j7 q2 W$ ~! q5 `& g$ \2 o end;
! ~0 T3 @2 n2 E z. V' K end;
3 a. r3 z1 z: ` dend; -- of the method6 c0 C( g' d/ N1 d5 }4 N$ |: Z
|