/* called by: entrance ctrl of the object 'track'
! Y0 S3 Y" l( R' @( w! \5 E3 }2 u*/
, z: R! Q K+ Kis
+ f" ?( P$ O+ t' [8 O part, GlobalDistObj, assignLObj:object;row,Lan:integer;7 c0 v: m. K2 f4 V
do' g& q' K# t$ c2 \* {
Lan := rootfolder.Internal.Tools.AOLlanguage;, `% e3 v# J, g# O4 }
if current = @.Destination -- else return; n5 ?' ?/ A) W
then
2 N* O8 L6 X3 R @.Destination := void;, g8 Y, E1 w" \8 [% A+ h) A) _) g" z
if @.occupied then
+ X$ D; A# w* U$ Q4 w( ^ part := @.cont;. `1 A) e% ] a7 ~8 o
@.transpOrder := void;
9 b9 P. E$ x. V1 S part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,* D/ ]: O) c, S; b O: t8 P: O7 T* _% t
@,root.eventcontroller.simTime);2 E, J6 }( ?; e( I$ Q5 {
@.HasOrder := false;/ X2 w" v% e; a! E; Q! c# T w( a% O
@.DrivingHome := true;0 u* E0 G' F4 x- W
rgManager.tryToStartTransOrder;; } m% @# c, d4 h+ a5 K9 ]" \
if @.Destination = void# E: g# @2 r) ^! u5 @ ]
then -- no transport order for vehicle @
: e5 E( h0 Q0 h4 f/ G- a# c @.Destination :=! p& p* R+ ~0 [+ }$ p w
rgManager.nearestFreeStation(@,track.~); R# C9 |/ g5 K1 N1 X
newDirection(@);
5 `3 Z8 j8 I: J; D' t: o if @.Destination /= void then
4 G4 ?) r- m' b/ t @.Destination.NumReservation :=
3 L5 ]' i- L2 y2 |& x3 o3 Y @.Destination.NumReservation + 1;
1 [; s# S) u: A7 n end;1 ^6 ?. a" G5 W1 T; u
@.CurrIcon := "drivingHome";
6 _* ?' b s: ?' M1 v% y+ i* k& t @.DrivingHome := true;* b) o, I; v8 O: s+ ^
end;& j8 @9 ]' |$ t
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
" |# D, X/ @8 ^+ S part := @.transpOrder;8 ~! E* v# D' O$ o' O" y
part.move(@);-- load part2 G* Z0 A6 }# q) _5 _' A
@.CurrIcon := "load";" h, C3 C5 d0 ^9 T5 F+ m
GlobalDistObj := part.globDestination;+ L6 ^2 X8 o7 v# Y( I
assignLObj := rgmanager.rgAssignL;# Y4 T8 T. ~* Y. g S r- i% J
row := assignLObj.getRowNo(GlobalDistObj);
# A, h4 \' o0 t6 C if Row = -1 then -- since 70+ m+ J; [3 m1 {; q
if lan=1 then9 w2 b( D" n1 n* j- G7 N6 t2 F
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
- d8 ?1 a/ i2 ]1 }. B, ^ to_str("in der Andockstation: \"",?.~.name,"\""));! a* R+ X( i6 H* J5 p8 \2 m+ I
else4 P2 W% s; y$ ^
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
0 |6 ~! j( p5 ^4 R3 A1 e# A% ~8 @1 Y to_str("in docking station: \"",?.~.name,"\""));
8 g/ r# j7 s1 s! f( a7 g9 { end;6 w# A* S4 |8 Z% ~
else
' j9 D: F& G O, V! O8 H @.Destination := assignLObj[1,row];( E' v+ a3 |4 [. u+ i( w
end;
; [" x" d/ M5 r newDirection(@);, P6 G+ `$ |# c: w8 A# Z# g' G
@.HasOrder := true;% O- J& {* D& o" I7 B* ]
end;
9 ?7 ?0 n8 Q" Z/ |: ]* @) } end;
# Y7 M' {7 f- w& y3 eend; -- of the method% w: y( r& b* g9 \1 _5 K
|