/* called by: entrance ctrl of the object 'track'
S5 f& _8 o; M: U, k*/* t) C" S' `% i9 ?% X/ P
is
+ B* t/ j7 J6 Q" [6 }/ K part, GlobalDistObj, assignLObj:object;row,Lan:integer;
$ ]0 y# h% l/ O Vdo
! l, t) t X, A- h& C0 d6 f& Q: P Lan := rootfolder.Internal.Tools.AOLlanguage;& E' z4 r& g3 v
if current = @.Destination -- else return4 |2 `, ?( y, ]! y# M" e0 y
then
( D& V4 d- Y9 B2 R# l @.Destination := void;
6 o! B( p; ^7 B6 w if @.occupied then. y3 x+ K% S; R
part := @.cont;0 l/ M( w2 x. }3 U q
@.transpOrder := void;0 n- e/ t6 R1 w/ ]
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,0 @1 k1 _" F! g4 w
@,root.eventcontroller.simTime); p; v) W) a& \) y' `1 B X) A6 }
@.HasOrder := false;
3 q6 S, P7 b. l' s- W2 w @.DrivingHome := true;
! Z/ {! a6 C1 ]7 `$ D6 }9 C) z% i rgManager.tryToStartTransOrder;# `) J; \- m; z
if @.Destination = void
7 X7 L/ E# K+ S then -- no transport order for vehicle @
& r4 E! K. ~; ~" Z3 b! h @.Destination :=, o2 k/ R! {! ^# l6 L! S" p
rgManager.nearestFreeStation(@,track.~);
% k3 m: F- b* w8 T" b7 e5 D4 Q: a8 t newDirection(@);
& [; u3 X# T1 P2 s. `# K if @.Destination /= void then
/ |, e2 A% d+ v, @9 x) n, d @.Destination.NumReservation :=: c0 P: C2 e( q. m
@.Destination.NumReservation + 1;
8 t# b; F0 @3 y: W end; ?9 u3 o* A, w" {; w! c+ e
@.CurrIcon := "drivingHome";
; L8 }' |2 w0 v$ q# l/ i+ P: E @.DrivingHome := true;0 ~9 ]$ M: k/ l' G
end;- M9 ]0 x9 O1 k/ D
else -- the vehicle @ is empty, both vehicle and part are in the same dock station2 A3 u) b5 @: @6 k* J
part := @.transpOrder;3 e7 I: X5 J3 a2 `, L
part.move(@);-- load part
* A) v0 e, b% x* v+ k. y# k2 p @.CurrIcon := "load";
: l! C( B+ U5 i, r! {; p% b GlobalDistObj := part.globDestination;% o9 R8 h0 X+ L6 r: u6 h B+ v
assignLObj := rgmanager.rgAssignL;
/ n7 \- `8 ]& j4 }" F! L/ G row := assignLObj.getRowNo(GlobalDistObj);: y$ P6 @5 p; j) d9 a' [, C
if Row = -1 then -- since 70
$ J" L2 }, d" G' ^% ^ if lan=1 then$ W2 ^( W% [5 V8 }0 N _5 Y
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),* D$ P6 |9 g+ r1 `- }0 [5 L3 d
to_str("in der Andockstation: \"",?.~.name,"\""));' q- t! D# O% f! H7 {: g; W/ B
else: I! ?3 g! t4 `
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
9 k+ `# q/ i4 a/ ]; q) K2 _ to_str("in docking station: \"",?.~.name,"\"")); 9 X* ~9 S, M& H2 L8 p3 m
end;
- E2 C- K, h% O, T( W- n else
& z* |# E1 F% D& R: \: F @.Destination := assignLObj[1,row];
9 x6 T2 D. t0 }- U. T5 K/ | end;
7 i8 q$ C, N' L" h4 m( ~ newDirection(@);
- q3 K0 ]" b9 G$ B. M0 ?; e5 l @.HasOrder := true;
% x- m- t% h; Q/ F5 y2 n; s end;+ o- C: _1 C% N, p! g( d8 y
end;7 s i C" o+ m. i9 ~& ^
end; -- of the method& r! T1 |& t" B! _) p; E% `( O
|