/* called by: entrance ctrl of the object 'track') q9 s8 `6 G# n6 O% `
*/' V# m! q: K9 R) r/ r
is
7 j1 z( c) F5 g5 X part, GlobalDistObj, assignLObj:object;row,Lan:integer;
2 ^9 [4 C4 U/ C k% ?% A" u, \do
6 _# t' W4 }1 {; r. V Lan := rootfolder.Internal.Tools.AOLlanguage;3 D6 B6 J2 x1 j+ b; D4 l% v
if current = @.Destination -- else return+ R8 f* {0 k5 d) C9 w, }, J7 ^0 s
then
4 ~" f# W) b6 J @.Destination := void;6 g1 H4 M: g+ b# d3 [
if @.occupied then
) l5 N. M0 g4 G4 D) U2 N! v part := @.cont;5 v( x2 w! A8 J% x
@.transpOrder := void;
2 ^ ^- l, v3 |3 e$ O part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,$ C/ I0 ` |# l* k! i9 V4 D, |
@,root.eventcontroller.simTime);6 n! j( B, K: ]" Q
@.HasOrder := false;8 v* g3 }4 G! j2 T& B% g k
@.DrivingHome := true;- W1 Z: ?. S3 F& `% B8 m" }
rgManager.tryToStartTransOrder;* ?! g7 S3 x/ V5 u8 N J) \) ^
if @.Destination = void0 T' G+ }$ }3 H9 K' m [. n
then -- no transport order for vehicle @5 g' }2 w; U: e j; `$ z
@.Destination :=
# b2 z6 f. _ ~2 i5 U& q3 j rgManager.nearestFreeStation(@,track.~);! C& V- b3 k' s; W8 q* x1 j
newDirection(@); 9 a( a% K0 a/ G, a1 J4 Q# ]+ f+ f4 f6 v
if @.Destination /= void then
0 O* V: x1 p/ u+ s- A% v, A; L @.Destination.NumReservation :=0 r3 z- {7 s0 j
@.Destination.NumReservation + 1;
; a+ ]4 y. B9 I! K) U$ _ end;+ N8 ~! M7 r. l
@.CurrIcon := "drivingHome";2 P& l5 b1 L9 q0 H" L
@.DrivingHome := true;( N! x$ u6 I% P( l# o
end;5 X" O A" y: `: r
else -- the vehicle @ is empty, both vehicle and part are in the same dock station( I+ D, l% Z% _7 N5 q6 z
part := @.transpOrder;
2 Y- f8 S+ M3 y+ x! ?( { part.move(@);-- load part7 `! K& |. ^8 U, D) s
@.CurrIcon := "load";
9 `, j' n; Q( C4 O6 E3 B9 b6 s% S GlobalDistObj := part.globDestination;
. p' m' x# L) Q assignLObj := rgmanager.rgAssignL;
/ c& J4 g5 K( l' J row := assignLObj.getRowNo(GlobalDistObj);
+ {: G" W! H+ E# R" S% K6 o, F if Row = -1 then -- since 70
* I1 t3 v @7 O3 G4 N7 F if lan=1 then
9 D4 M& E; N) B5 n/ z) b) p9 w promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),! V# D7 n7 }+ F+ t
to_str("in der Andockstation: \"",?.~.name,"\""));
! \# [3 x5 `2 Y% x# i2 b) o: d$ K else
/ f% ~2 ]) \! ], S% a# H" [ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
4 @- T* X2 E$ y% P to_str("in docking station: \"",?.~.name,"\""));
; h3 }" E* e7 I/ b1 E end;5 |, s3 T, V5 V+ `, ?/ V( F
else) X) N& g3 Y9 j2 j
@.Destination := assignLObj[1,row];" ]% X- t3 M! C5 f" r- N
end; . @/ f* b# Y, Z2 N: `6 W1 [
newDirection(@);
- Q6 L* ^$ N8 C) X @.HasOrder := true;
( l1 }8 \& p, Z+ d' p end;
, p; `; r6 q$ a# M6 s end;
8 B& | }$ @* K) x' Mend; -- of the method R8 z6 @9 v$ |% l2 p
|