/* called by: entrance ctrl of the object 'track'
2 G0 E: N6 O! U: g; R7 }*/
' W+ I. t0 `/ r, G) R4 O( Cis
- b8 u# |/ K5 k- S" J0 W9 ? part, GlobalDistObj, assignLObj:object;row,Lan:integer;
4 ~0 Y9 R( y- L; D. ndo
9 S' W4 [4 j; Y% a6 |- Z# u3 x; S9 Z0 W Lan := rootfolder.Internal.Tools.AOLlanguage;
4 p e! v% J& N P9 B/ B3 V, X. i if current = @.Destination -- else return: a! w7 b l3 ^1 _) |
then6 g A' E' `1 n; Q4 x* N
@.Destination := void;! K+ F6 S& }* S' V( {- y! b2 G( {
if @.occupied then& E- u$ G/ x* [
part := @.cont;5 r* ~( c L# `9 J/ }
@.transpOrder := void;) r8 N) s: e5 v+ k3 J8 h3 T
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,& d% [0 u# O! t/ y
@,root.eventcontroller.simTime);
' P( F) k* V, p" V5 M @.HasOrder := false;- ?- w2 \" S" d" g
@.DrivingHome := true;
; P/ U3 |% v! W# G: h3 Y# Y/ G rgManager.tryToStartTransOrder;3 r8 {1 A) v6 B! i
if @.Destination = void
, g6 V. S$ P/ k" @: M then -- no transport order for vehicle @
% x/ y- T. l+ z1 y @.Destination :=4 F# @: v X4 r, Q. f. ]; ~, q
rgManager.nearestFreeStation(@,track.~);# D% ?( Z3 s3 a4 H& `
newDirection(@);
- a. i) J: _ s/ q: l' k% _/ P, f if @.Destination /= void then
+ U, I5 d7 _6 x9 |3 R @.Destination.NumReservation :=% E2 E, d; }$ P+ y# g5 \/ i
@.Destination.NumReservation + 1;0 {6 @. l$ ] `: q L' L
end;: T: k1 ]2 F$ J/ a- m
@.CurrIcon := "drivingHome";
# j% l# W) Z5 K+ S1 e @.DrivingHome := true;
7 `; H' Z; J5 V9 q! [5 z- f/ }0 v end;, Z3 B6 T2 C4 e9 K
else -- the vehicle @ is empty, both vehicle and part are in the same dock station& I( t v' B+ Q3 a5 K3 Z/ K, H6 v: ]
part := @.transpOrder;$ |4 j7 O4 ]# ]7 M* r7 N g$ |1 ^9 H
part.move(@);-- load part
* I' H: D7 |0 z4 ` @.CurrIcon := "load";7 A) g$ c* ?# S6 O N
GlobalDistObj := part.globDestination;3 v, G& U: Y, J. ~ f
assignLObj := rgmanager.rgAssignL;
/ u6 k+ L4 q0 Z" H( s; k row := assignLObj.getRowNo(GlobalDistObj);* e7 F" D# @' z+ T4 Z
if Row = -1 then -- since 708 q: K( I- F; m/ @9 n# X# u) C$ b
if lan=1 then
/ j) N4 B% p8 J# o promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
+ {; A+ ]8 M- o) o to_str("in der Andockstation: \"",?.~.name,"\""));% N, n+ t+ m9 E& o7 b( X' l
else. r5 N9 P2 y: J" _: C( o
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),4 W% a/ N. F. z: ^& T
to_str("in docking station: \"",?.~.name,"\""));
, g* X( \+ g4 M4 C' `6 e, h( Z end;
$ i' x2 i: w6 M5 k: }1 J" c else
`3 o2 }# \, ^ @.Destination := assignLObj[1,row];
9 r9 e M/ A$ w; R: ?6 u; _; l2 F end;
+ i0 m+ m' R5 x* X1 c newDirection(@);0 d1 [; B6 G5 t# ~8 e( i, G
@.HasOrder := true;
: Y* z, A1 r6 O) j0 f end;
( r3 F2 ]9 z& S+ K2 `2 k" D; y end;
5 M$ h7 G3 u5 R. {: send; -- of the method
8 R, i8 h! U* L; j7 @8 e: {7 K |