/* called by: entrance ctrl of the object 'track'
9 }, }' F/ w* O9 | W( y*/7 |3 Y$ K- k0 Q c
is+ n& z! W4 w5 e* X$ _5 w* y$ i
part, GlobalDistObj, assignLObj:object;row,Lan:integer;% k. K( i! _6 n2 B; e
do# h4 ~: c) @: ?: m
Lan := rootfolder.Internal.Tools.AOLlanguage;1 Y% {9 O& ^7 z: Z. n; ~# m; c
if current = @.Destination -- else return
5 J/ g2 I d" S8 `! p3 b. t. r4 m4 i then
# _, @* V4 F. c; E# A @.Destination := void;, F& [( ] b7 E% L4 @
if @.occupied then
3 [1 p1 q: U" O3 ^7 u part := @.cont;+ n9 i+ ^2 B* j4 n+ V# v8 K0 o
@.transpOrder := void;3 Y5 t; A3 a( |0 e% @: Y Y
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
* s- t. o% x: a9 l @,root.eventcontroller.simTime);9 h8 I2 [# F; B3 u! `
@.HasOrder := false;
7 I9 S3 }/ O7 s0 m F$ k @.DrivingHome := true;* m. n+ ]. t, O9 M
rgManager.tryToStartTransOrder;* V/ L$ }( \1 x& Z/ O+ A; ^. e) I
if @.Destination = void
9 a: K& @/ |/ z then -- no transport order for vehicle @
8 G' N# ]* M& F1 o7 g- E @.Destination :=
7 t6 i" Z8 S# o0 w$ X0 q rgManager.nearestFreeStation(@,track.~);# U, `4 c: f$ H& C! x9 b, o
newDirection(@); ; i- J; }, c/ h& [1 z3 \, w# y
if @.Destination /= void then
5 c% O* ~# S- A0 x% T0 F @.Destination.NumReservation :=" q- f) [ R b: f2 ]7 j/ y
@.Destination.NumReservation + 1;
# D& O9 F4 ~+ W1 _! \5 J end;7 c; Z6 m2 C2 G" x2 X- l
@.CurrIcon := "drivingHome";/ k1 x% j( h/ Q& F3 s
@.DrivingHome := true;
; G7 o: S5 v# G7 W3 ?! S7 x9 ?; [5 I end;
, n- S6 W# E. u; G7 F$ n6 d else -- the vehicle @ is empty, both vehicle and part are in the same dock station
3 @7 C: P: Y* A! f3 b+ G! n part := @.transpOrder;& j: h% v: {, \ j; X
part.move(@);-- load part& G/ r* M: o" x+ h2 k, ]
@.CurrIcon := "load";
3 [6 V$ b1 M' G- D' R7 y$ h GlobalDistObj := part.globDestination;
. W7 _# r' a) h E; }0 T% N) Y; j; W assignLObj := rgmanager.rgAssignL;
5 D6 ~( ^2 J' O+ k: [! k! }2 M4 J: l row := assignLObj.getRowNo(GlobalDistObj);# _% t4 j+ X/ W; l
if Row = -1 then -- since 70
+ q/ m5 W) f7 H2 X6 w1 Z. E+ y if lan=1 then5 r) C& C5 F- ~* ~5 ]$ W( N) s- @; p0 m
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
" E) \8 \/ M. [9 M to_str("in der Andockstation: \"",?.~.name,"\""));- I, _- R! ~. o$ @
else
x( @/ i" ~8 H4 w9 C. d promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
. d, A7 }$ Z* R/ S! ~6 B to_str("in docking station: \"",?.~.name,"\"")); ! j0 ? \ ?) X8 T" S. k( Z! v
end;1 \+ Q2 ~# R% V. {5 f- `" e b
else& N2 l4 z& E2 p& O$ }/ p/ ^+ S
@.Destination := assignLObj[1,row];
" C* _2 ]; ]% `7 D; v end;
) _, p3 A, o; g: h$ M newDirection(@);
2 y, t$ m% Z' ^ @.HasOrder := true;( p8 X/ m4 C( K
end;% y" l$ F8 N H: ?
end;
6 f* a3 e" Q! }- nend; -- of the method# V$ V9 q p$ F" f
|