/* called by: entrance ctrl of the object 'track' Q2 ^8 U. R$ J( {/ V [
*/" X( l7 z* k1 ^
is0 H* L" h2 v! t: J# B
part, GlobalDistObj, assignLObj:object;row,Lan:integer;& p5 u3 U- \$ t0 d/ d$ ^5 u. S' s
do
5 m; j% u* N& A' G( P! N Lan := rootfolder.Internal.Tools.AOLlanguage;
, i: c: x8 k/ w8 d if current = @.Destination -- else return5 t' A' x8 |! \2 T- j% K
then. A: X# X7 }/ p2 K7 s5 i
@.Destination := void;6 M# t$ B" B7 W7 L
if @.occupied then
, G! W% M: T4 R part := @.cont;
/ i. r; K ~1 m+ |- m) s @.transpOrder := void;
0 _/ b& d Y: p% D$ [ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,# h/ Q% `+ j" o3 q; H, r
@,root.eventcontroller.simTime);
_4 n+ u. h% _. ^7 U @.HasOrder := false;
3 h+ p0 d* x' x E2 j @.DrivingHome := true;) w. {" P9 A" j2 A$ x0 J9 b3 d
rgManager.tryToStartTransOrder;0 y$ L0 v8 f( v7 u
if @.Destination = void
1 A3 v' q P8 i; R+ C9 B9 G then -- no transport order for vehicle @
. N2 N: z z, L" G @.Destination :=
% E# b" A# v$ `+ ], S) t% _8 F rgManager.nearestFreeStation(@,track.~);
% V# V9 c6 D1 @. J$ K) u& V( L newDirection(@); 1 N1 g$ ~# ~6 U" w
if @.Destination /= void then {" W- F* g) }! }0 l
@.Destination.NumReservation :=
; O2 @/ K; w6 E0 O+ B; z$ @0 y/ a @.Destination.NumReservation + 1;3 p' o; x7 [7 `; B$ G4 N2 m- _
end;; M# u, g: _2 p. Q7 t
@.CurrIcon := "drivingHome";
4 N7 y2 u* d- U3 C, e @.DrivingHome := true;
/ f, X4 d& r7 ~4 Q! w+ o/ F! I end;
- w; ]. W5 X4 |+ j' { else -- the vehicle @ is empty, both vehicle and part are in the same dock station6 H' _5 ^9 [* [! i% z
part := @.transpOrder;
$ z$ W+ F: T; c* t: ? part.move(@);-- load part
, T/ T x+ m! b3 y' C! x @.CurrIcon := "load";3 b5 E$ }+ i; E; @% V5 b e
GlobalDistObj := part.globDestination;5 n) }4 P% O3 @' T( k% H4 z; Z
assignLObj := rgmanager.rgAssignL;
8 t) w, T, z: r4 D- t$ E" y row := assignLObj.getRowNo(GlobalDistObj);- L% F2 a5 ~& v( h
if Row = -1 then -- since 704 T8 t7 t7 T7 I" ~
if lan=1 then
1 y( ^1 c3 `2 Z- d: n8 P, F: k2 e promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),4 v2 l/ }8 c5 Y- N+ g5 p5 ~0 N
to_str("in der Andockstation: \"",?.~.name,"\""));$ O: B! I5 I \5 y) Q
else
: B) H0 |8 U3 u6 T7 F promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),* P1 {& t3 v% l- e) u
to_str("in docking station: \"",?.~.name,"\""));
& W% |4 c- P) K3 Z4 o) F% { end;" X" n) }( U1 s; g S
else
: s8 x# C1 |7 ?$ e& U& _4 t @.Destination := assignLObj[1,row];
+ i4 [9 W# z s! D end;
$ }# ^7 h+ [/ ]5 B* A newDirection(@);2 e- o. f3 f. w) s+ b/ j! e
@.HasOrder := true;: x' u& `+ f5 |$ |4 A
end;& z# r1 C, u% B& O. E9 |: v1 c
end;0 o, a$ h, `5 h" t, c
end; -- of the method( g4 N( I0 U: C% O5 f, A
|