/* called by: entrance ctrl of the object 'track'! }. P; A4 S6 R( o
*/1 F% Q. u* V: M- v$ D
is9 U' k& O- c* F$ G v! l
part, GlobalDistObj, assignLObj:object;row,Lan:integer;1 b2 |( U3 u: F1 s; E7 i
do
& d$ P: p) ^+ N! M; s% _ Lan := rootfolder.Internal.Tools.AOLlanguage;, m' F6 b) ?& m& s$ r
if current = @.Destination -- else return
: `' j( b) x/ V then
+ y0 F3 Y. u2 H1 I2 L3 g: k @.Destination := void;5 f0 l% n6 G5 T8 A) B: n
if @.occupied then
+ C+ O. c7 _+ X1 U3 \, g part := @.cont;9 e* f" I4 W# s& B
@.transpOrder := void;) X$ v2 l5 N& e) U! @- G; I
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
; c# N; `$ ~6 M; n: a# r& W8 M @,root.eventcontroller.simTime);, J! P9 c2 O6 O2 L
@.HasOrder := false;5 M! w; j# u) }( Y# {
@.DrivingHome := true;
0 l/ l s. ]0 y& m8 f1 \9 a rgManager.tryToStartTransOrder;$ e# Z2 t* {- C C
if @.Destination = void
& L* c+ X' S* B then -- no transport order for vehicle @
: i' I1 X0 T7 T: I/ n @.Destination :=; {) b4 u0 c' o+ M# L: C0 e
rgManager.nearestFreeStation(@,track.~);
! _& }6 B7 p& |7 x( O# O4 v( X. A newDirection(@); & f( X- t% @% v% U/ O
if @.Destination /= void then& ?( v+ J, S. X! D. L% D
@.Destination.NumReservation := N0 i1 n* v9 E, k9 j) W6 q
@.Destination.NumReservation + 1;
. t# K3 ?$ n' b$ D7 X end;3 a2 ? @, y, ^7 k
@.CurrIcon := "drivingHome";
/ U( R& J6 d7 y# i& ]: K @.DrivingHome := true;: z& q+ D8 ^! f0 e( I& ~
end;- j |& S* ?+ E, D9 b
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
O: @1 T& L( W x5 c part := @.transpOrder;" x8 }- o$ v( _% a% g
part.move(@);-- load part
5 ?, g) c4 l2 C# F" y: J @.CurrIcon := "load";
2 m9 a! T7 K, ~8 T0 E1 N GlobalDistObj := part.globDestination;4 ~1 o9 o" b. V3 _) K( o" O: }* I
assignLObj := rgmanager.rgAssignL;
& q' o5 r4 O; C9 d% M row := assignLObj.getRowNo(GlobalDistObj);
) t5 G: V1 K( g if Row = -1 then -- since 70
5 y0 E. O" e: n! Y if lan=1 then7 p9 Z7 ^: D* n0 [+ \$ V
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),- c$ ?3 X+ Z0 R
to_str("in der Andockstation: \"",?.~.name,"\""));6 T m4 j# w7 k& v6 i9 }' {3 I. A0 X
else
' e* k6 r2 |3 w* [7 H promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),* N* Q0 x9 K u3 X7 f
to_str("in docking station: \"",?.~.name,"\""));
$ o: |1 z5 ^: X6 X5 w- C6 } end;
7 \; c; ` F3 b [ else4 C2 i, y' E9 k# E6 x4 F6 L
@.Destination := assignLObj[1,row];
- n' t1 |! O; H, ~4 e3 E3 C. r end; : {8 v$ a. s( F/ ~) K
newDirection(@);
# J* D2 e" V/ c1 j @.HasOrder := true;
1 ]) a- ~ @8 ^5 K9 f8 V end;
$ O& v5 f1 M) T, Q# \* V9 m end;
* m; Y! V% L" {6 Y$ {end; -- of the method! k X' A0 |- F
|