/* called by: entrance ctrl of the object 'track'" O- B, ~$ o' Q( w
*/
5 O1 w6 I4 D1 o. Y& \8 M9 \& Dis* B, E3 `) c, z0 ?
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
# p7 z0 O3 s: v7 o6 h2 a( w9 Sdo9 \* [( H% `% b! ?
Lan := rootfolder.Internal.Tools.AOLlanguage;
$ O( k- K" s* `( }2 d" u) ` if current = @.Destination -- else return
0 e4 l% ^4 W2 n0 ]8 {9 }7 N8 I4 }! r then
( B* F- {7 {. y+ E @.Destination := void;% r2 F% O+ \: y- M
if @.occupied then b" @! d$ A8 m* z* {! A* |
part := @.cont;# J9 I' p; p4 J' G' l# H! G
@.transpOrder := void;
3 Z7 p0 } B( g) v( M" Q7 N part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,4 t2 h+ F# r' F9 S5 l
@,root.eventcontroller.simTime);$ h2 ~9 i* H, C2 _& V( a* m4 w7 V, @- c2 f! C
@.HasOrder := false;
7 @3 b; U% k/ q @.DrivingHome := true;& J7 `1 m# i, a: G7 m( ~
rgManager.tryToStartTransOrder;6 |( G: w/ ^6 @5 B* V, ?
if @.Destination = void
; ~1 K; P, |& I3 R, h3 V then -- no transport order for vehicle @
( p; {. }: T/ i3 [! D2 J2 g$ b @.Destination :=% Y7 K: P$ c, U+ P. S9 c
rgManager.nearestFreeStation(@,track.~);0 v; J, d$ B' {9 [& G
newDirection(@); 1 w/ j$ b: M, L. E# d8 J6 j
if @.Destination /= void then1 @, D# V! T- k& K2 J8 j" c
@.Destination.NumReservation :=
% l1 |$ B$ u. `- o @.Destination.NumReservation + 1;! @& c1 v5 s4 I/ C
end;, w$ m# u& }% U: b% X6 C& e
@.CurrIcon := "drivingHome";
( t1 |' _7 b8 R# a$ v* E @.DrivingHome := true;9 A) ~/ ~3 R, }: ]* F8 S4 z
end;
/ P" q% @, M8 r& I8 o else -- the vehicle @ is empty, both vehicle and part are in the same dock station
3 L% |( N3 m3 J! [" o part := @.transpOrder;( X% S8 I% F3 Q3 i0 y
part.move(@);-- load part
/ i8 B3 o m* ^. U! W4 n @.CurrIcon := "load";
' q- d5 F k3 |7 J3 u GlobalDistObj := part.globDestination;) |* j1 w3 k9 j8 {7 I
assignLObj := rgmanager.rgAssignL;
9 ?. I B; |: ]# r6 M; E row := assignLObj.getRowNo(GlobalDistObj);
* ]% }. D5 Z: _9 Y, O if Row = -1 then -- since 70
- F+ V( e$ R- M# e2 Q if lan=1 then) z! s# y+ e0 _$ A
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
v8 ?! I8 p1 \, Z$ w to_str("in der Andockstation: \"",?.~.name,"\""));
$ t h8 F3 G7 C' C! H% P else
/ \5 D1 T5 j: d" f! c: d% o promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),$ O% S T/ E$ m7 }
to_str("in docking station: \"",?.~.name,"\"")); 1 }; L1 i/ F" Y! J2 t- u
end;) L; x/ Z$ ]& k4 U2 A6 z4 K
else6 v8 z* U/ H9 S; x6 S# P! M' E
@.Destination := assignLObj[1,row];
" @; P* V: u X0 T' r end; ! K* y9 y; e: r. l
newDirection(@);. v' |1 \+ t! C" e
@.HasOrder := true;6 f2 F5 m$ T' `) E
end;
& b% K( X6 \9 c2 l* O" @: D end;5 q( k, C( j* v) R/ D3 \1 S: t. P8 O1 q
end; -- of the method$ C! [- y; |, I; A7 a5 L! ~+ A, l
|