/* called by: entrance ctrl of the object 'track'- H" s* O- a$ k/ c0 u
*/
" N' O, M$ q" F; Z8 c7 his! h. p3 T% N9 x' d. o6 l
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
p4 i/ D. K$ d" L5 I8 udo
& S% p5 ^# f) O) u( T7 x! n9 B Lan := rootfolder.Internal.Tools.AOLlanguage;" q) I0 R% N6 s2 H
if current = @.Destination -- else return
& T# k' p* y2 B) M# k2 w$ b then
$ H- g7 o5 b' I, }$ j @.Destination := void;1 y. j* y0 E- C
if @.occupied then# K6 I) n( @8 c& d: E! |# q G
part := @.cont;/ R0 V \9 u4 A" W# Q2 z, n& l% ?
@.transpOrder := void;& K0 T2 N" V3 Q; p& }1 Q
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
: g( j5 E s# ~) @ @,root.eventcontroller.simTime);
* p1 @. x% R3 ~ @.HasOrder := false;
, V7 o2 N7 T3 E @.DrivingHome := true;! @: F3 K% ~ E- M @' G6 X
rgManager.tryToStartTransOrder;! z2 e' y& B7 M9 e9 m
if @.Destination = void
, @; Z" F9 T# f3 J4 C then -- no transport order for vehicle @' { m2 _4 e% P* x K3 [: _
@.Destination :=0 b) E6 _" q0 ^$ z3 T: h( p6 Z
rgManager.nearestFreeStation(@,track.~);
. i0 E$ `& E( Q Y newDirection(@); % z3 I* h# @: _( [1 K+ g! F
if @.Destination /= void then5 O) ^* T* T% F, F0 ~6 f5 k) |* ~* { Y
@.Destination.NumReservation :=% S6 ?4 P8 F- H, e" ?+ V: i4 t
@.Destination.NumReservation + 1;" i- f2 J* c: I; R" s+ W
end;0 `6 W. u, m! k. P, Y' \
@.CurrIcon := "drivingHome";
$ z; g( g8 L* c' S0 m: y2 o @.DrivingHome := true;+ ~2 V1 n7 U& g2 K
end;' H h y) {% W
else -- the vehicle @ is empty, both vehicle and part are in the same dock station( [6 o( g# C( C
part := @.transpOrder;, T8 `* J: g& k. h( t0 z5 W
part.move(@);-- load part3 _" G* E( F( o8 a
@.CurrIcon := "load";3 y1 n1 [1 D) V! W
GlobalDistObj := part.globDestination;% N6 [+ g) Y( A) T
assignLObj := rgmanager.rgAssignL;3 ^1 z& L% T6 h9 J; `/ u! S; }+ K. F
row := assignLObj.getRowNo(GlobalDistObj);( b5 b2 r. X0 L6 L$ @1 d- z
if Row = -1 then -- since 70
1 B2 h: o, A4 Q& x if lan=1 then
! I. H6 g( y H7 T* ? promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
, q# p# }5 c: X to_str("in der Andockstation: \"",?.~.name,"\""));2 h% s2 s( H! `! ]! w* c
else
( @! i$ R% _8 Q promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
; [9 U' ?/ l4 [0 I q) t( i7 k0 k& k! x to_str("in docking station: \"",?.~.name,"\"")); 2 Q# \& p) A+ Z& F
end;% a5 t9 N$ @; K% F5 Y+ `
else
5 b" [) r- o/ `' q6 y2 O# Q0 E1 u* G @.Destination := assignLObj[1,row];6 _3 O; Z% |/ m( N+ h
end; 7 s5 U# A% y" @8 [0 B- ?# [9 X
newDirection(@);
/ A8 A: e1 l: Z6 g; e7 D @.HasOrder := true;6 v( @3 V/ q1 F; w: H
end;
$ F' a% m! l3 ?; w8 W! F end;
3 {3 I- V. Q" N2 o% z2 hend; -- of the method' @7 {7 h$ G* ^4 O0 H
|