/* called by: entrance ctrl of the object 'track'
, I3 M0 @$ b9 d, i# ]. t*/
! v7 I# }# H& a% S0 f- vis
: y( R7 T0 T/ H) s6 j/ A! K& l+ m part, GlobalDistObj, assignLObj:object;row,Lan:integer;1 v. k- `- C( b2 c. |
do7 j3 s( Q2 B0 y& n1 g* H
Lan := rootfolder.Internal.Tools.AOLlanguage;
! f5 f+ \7 ?8 |5 n' T0 ? if current = @.Destination -- else return
3 i# k+ P, D$ u# e! _+ z# F0 o then# V, H2 B2 }' |- h$ D- z
@.Destination := void;0 |! s: H; H0 C- G Z7 g
if @.occupied then$ H6 A; A& S, X" p& Y( w
part := @.cont;, [3 \. z, j4 \! e4 l. C
@.transpOrder := void;
3 k0 j' r1 z. ^ S part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1," Y' B7 Z( j' P$ @& N, n
@,root.eventcontroller.simTime);: T$ o' {" Z) R* U3 p' @
@.HasOrder := false;
4 {8 h7 @- J- \6 u8 U! { @.DrivingHome := true;
* i. M$ h, u% n5 {. P, l9 B! ? rgManager.tryToStartTransOrder;
! q$ W4 T* Q7 H4 ? G) a. f if @.Destination = void
7 {3 o1 l% J$ B* q then -- no transport order for vehicle @
; C( k' S- ^1 Z! p @.Destination :=
/ G E d" ] N/ R6 f: z% p rgManager.nearestFreeStation(@,track.~); m3 [* D1 \5 X" M& j
newDirection(@);
# T5 {& ]% k+ \4 W$ {2 N if @.Destination /= void then
" I0 j5 i* N) J \* S" ` @.Destination.NumReservation :=
; H% }; I7 P2 z5 |4 E9 e, S @.Destination.NumReservation + 1;
, \+ L+ @3 _, q1 F# o6 K$ W end;
0 [: D6 Q: c/ T" I7 [, V7 o @.CurrIcon := "drivingHome";- R( N" ^8 m& \$ V2 c
@.DrivingHome := true;
, t! Z: x. _; m: [ end;
" Q& ]! Q# m0 H( c1 ? else -- the vehicle @ is empty, both vehicle and part are in the same dock station, m# T$ e" {* t6 X
part := @.transpOrder;
8 b: ?9 y' c5 z part.move(@);-- load part3 K4 p' f9 g) ^7 e4 \- Y- L: `
@.CurrIcon := "load";8 I: Q$ R+ e, a
GlobalDistObj := part.globDestination;
8 E& z. i/ i4 I6 X2 Z, {8 A5 y- f assignLObj := rgmanager.rgAssignL;
& @7 x3 X' {- I& S% o row := assignLObj.getRowNo(GlobalDistObj);8 a+ A8 c n2 G9 f
if Row = -1 then -- since 70) c2 I) |! E# d: l4 |- Z4 O; Z; Q0 S5 E
if lan=1 then
8 W7 O" F1 _" L [: X" U3 H promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\"")," U8 j& M+ P. x7 d6 C
to_str("in der Andockstation: \"",?.~.name,"\""));( P5 a$ _. Z l9 b( A1 K4 V2 x
else
: S7 A U5 U7 l( U6 \# Y8 T promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),! c2 l4 F5 V, e+ ]
to_str("in docking station: \"",?.~.name,"\"")); + I7 `+ v# C7 K5 X$ G4 l& ~5 |7 m. ~
end;5 |; D& N( ~& l" a# q: u$ V
else
: C6 i) I$ r2 c$ v4 B @.Destination := assignLObj[1,row];6 b$ k: E7 C6 M, l8 v. k
end;
& w0 S$ B7 x9 [ newDirection(@);
4 x0 @5 y$ f& ~9 X2 y @.HasOrder := true;% n$ i* _- J+ U( L) L+ p# U
end;. F F( S0 I" [4 Z8 c( m$ ~
end;
! u/ v- z( [- M! ?2 vend; -- of the method- M* t' g& D5 W }$ P- U$ u
|