/* called by: entrance ctrl of the object 'track'
8 }: b' C) M" H8 m*/
& f# O& i8 c L) i" L3 j% N' T: X$ i% q: gis9 q7 |! N& i& w) M
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
1 J" j/ y" F- m7 A" q3 u. i2 pdo* C# o3 |: j4 F3 [, M7 k
Lan := rootfolder.Internal.Tools.AOLlanguage;
6 l j/ B& }) ?% u9 ]7 [ if current = @.Destination -- else return
. h0 ~$ K( a& ?& t+ j then
: i+ g: h& I# ~1 B& O( A @.Destination := void;
5 D5 U+ D( _1 K0 M if @.occupied then- ^# ^0 C: n1 d( P+ F
part := @.cont;
6 x" ^6 c) [$ o# H/ V3 N6 L @.transpOrder := void;
( j3 T. ~5 P8 E part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,9 {' X( A) j. Q3 b+ p
@,root.eventcontroller.simTime);
* Y0 \/ r8 q' X6 ]) H @.HasOrder := false;% m9 b1 E7 A6 Q C) i
@.DrivingHome := true;
$ X* h/ K- B# ]8 P: i+ v rgManager.tryToStartTransOrder;2 A% B4 ~* B" _& Y! ]' K* q
if @.Destination = void
! ^+ S; E0 ?% K/ N then -- no transport order for vehicle @1 Y5 M0 u7 @4 N2 l6 D! f6 V
@.Destination :=1 I5 m9 R" X5 [8 X/ O1 t1 w
rgManager.nearestFreeStation(@,track.~);
! G8 }9 N5 [: \3 k$ {( d newDirection(@); 3 ]) ^/ B p( a6 f7 \8 c
if @.Destination /= void then, R5 ^, t$ j3 t6 \9 i1 b0 u0 ^
@.Destination.NumReservation :=
J) o. G( R# \) N; I3 t @.Destination.NumReservation + 1;' T- M" N4 v, `9 |' b# S2 }
end;
& S& `: p# Q3 I4 |4 t @.CurrIcon := "drivingHome";* G% s( i6 R% r
@.DrivingHome := true;
: T V M: V- I& ?4 c9 Q! g6 Q/ { end;+ [. M' U, {" u s7 Y4 v
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
5 L0 n2 }8 W1 I9 f/ M9 P3 t+ \ part := @.transpOrder;
/ ^# J3 l6 m0 y7 w1 B5 A4 c7 i- [ part.move(@);-- load part, V: e& U! [1 Q9 {$ g
@.CurrIcon := "load"; o8 p9 V1 {' y+ T# ?! L% o r& L% V7 n
GlobalDistObj := part.globDestination;: f. L5 T/ a2 a% e: o6 Z
assignLObj := rgmanager.rgAssignL;
" d# H0 S7 R1 A5 i P row := assignLObj.getRowNo(GlobalDistObj);
6 A3 C$ G a9 x! w3 [+ K if Row = -1 then -- since 70& E8 t) }; b% t
if lan=1 then
) z) Q$ h0 O! x. k! f, W% p promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
. J# v5 m9 U# L$ |$ [2 \- s; d: v to_str("in der Andockstation: \"",?.~.name,"\""));1 o$ e7 ?/ ]" V, x8 ^7 c0 g# j
else5 F# e1 k# L ~* V3 [' c
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),8 c9 L" k! i7 H: j5 t3 @8 P- }0 s
to_str("in docking station: \"",?.~.name,"\""));
6 d# p& o3 s/ w. t# V7 B end;
) U! V8 B4 T- X1 R! }$ K else% e9 w; O# u8 f& h F8 `
@.Destination := assignLObj[1,row];. E: D3 b- F, x' {
end;
% q3 G, n h9 ~' G+ c newDirection(@);
: q& ]* }7 S, ~6 j! m8 n @.HasOrder := true;
2 Q T+ i: \7 h G& k$ K end;
7 J: m$ V" l# a! ~* m6 b' O end;2 K$ a. U0 F1 n) {, I
end; -- of the method
3 {) \/ |$ Z& j# k! @8 M4 t: | |