/* called by: entrance ctrl of the object 'track'
k( R: [; m" R+ t; J*/
7 g: j$ M- \$ e5 G% ^7 W; Cis
7 c$ o4 a u9 e4 s { part, GlobalDistObj, assignLObj:object;row,Lan:integer;
+ S, F+ _+ [ v0 X# Ldo
* ^6 f& @$ U5 n) z Lan := rootfolder.Internal.Tools.AOLlanguage;9 S! h8 ~$ o& \1 v8 [
if current = @.Destination -- else return
* ?' @$ H( ~7 g4 j `6 _$ i3 [! P then' ?9 s4 s: h( T
@.Destination := void;' x+ [4 V# A7 o" v, }" f5 ]
if @.occupied then) S) n4 W1 J. X
part := @.cont;: _! O4 v- u' |% e7 f
@.transpOrder := void;& _8 w7 a! Y% ?0 [5 v
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
! F' J* H1 i6 O" B @,root.eventcontroller.simTime);
1 {, [, C6 `# V/ q s' m+ e% T @.HasOrder := false;( B1 ]2 f) _& i5 F
@.DrivingHome := true;5 i, t U2 }* r X. U' z0 S8 Z4 w" H
rgManager.tryToStartTransOrder;9 _+ b( j* u% i( C& t
if @.Destination = void
( k- \* c# L) O6 Z" c+ m# W+ h l then -- no transport order for vehicle @
& C1 Y4 k! p1 ~1 } @.Destination :=
; @# V* l4 p' n, p' z rgManager.nearestFreeStation(@,track.~);" _7 z9 I9 ~+ |, F+ s5 L
newDirection(@);
( S, i, C$ s( }. g A) F# F if @.Destination /= void then: } A, ] ]: Y$ ]
@.Destination.NumReservation :=. x9 N, N' j* @4 ?7 i3 ]9 i9 V
@.Destination.NumReservation + 1;# S f1 a7 k- Z/ b3 }( }1 `
end;
% a) w8 u: B5 ~ @.CurrIcon := "drivingHome";0 [5 a* L* A/ f9 n2 X
@.DrivingHome := true;
4 d! }3 \ q% G* r9 V end;
. w7 M! }3 B$ j7 C5 H# U5 L; n else -- the vehicle @ is empty, both vehicle and part are in the same dock station
9 M% H, M4 V( {& o% c6 Z; N3 W part := @.transpOrder;. Z! ], f/ S6 m, o. ~5 E
part.move(@);-- load part) r- r: q7 C8 p6 r& A: q
@.CurrIcon := "load";
( E e# O8 z) }- t7 T K2 J6 t GlobalDistObj := part.globDestination;
9 H% A+ w: r/ a6 v assignLObj := rgmanager.rgAssignL;/ p) k0 z8 D5 J$ K# i. @! W
row := assignLObj.getRowNo(GlobalDistObj);
. ~5 S" w4 @0 _- P+ u5 o) g if Row = -1 then -- since 70
+ E5 q- s5 g: {. x l if lan=1 then
" G5 @3 e: V/ a6 t promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
H7 h" W' s5 j to_str("in der Andockstation: \"",?.~.name,"\""));1 K2 F& a% S4 p% F8 s- i. k
else
+ h; z" }$ p) y- e ` promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
3 h- Q% p% E$ X8 V to_str("in docking station: \"",?.~.name,"\"")); 3 }2 {$ u) q7 k/ p* a
end;
# ]/ s9 J6 e0 `; q) r else
- h$ R v! m& V; d8 g' N% ~ @.Destination := assignLObj[1,row];
1 D" m, p: n8 B8 \2 ?1 d. M% m% h end; 8 }. Y! Y7 C- G" F3 `2 w. O/ d' E
newDirection(@); _* E) Y* }8 F
@.HasOrder := true;
# F0 T, c2 T0 B( y3 B N6 ]5 s; } end;
/ V; L4 h: N( d, r4 c end;+ B: ], \9 j& }# d4 L6 j* T' s! `
end; -- of the method
, J& G% d9 O, M6 V9 q; F8 j |