/* called by: entrance ctrl of the object 'track'
5 d' z/ C% S8 ^7 b: l& K*/% ~. a8 p7 K9 {
is7 C3 N, c+ E: U5 F _( P! a# J: H
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
# a5 k( a* |0 P, k% X8 gdo* B, t. B' P/ E( ~& ?) y
Lan := rootfolder.Internal.Tools.AOLlanguage;) D7 B& W4 J! |' ]8 F9 x/ t/ z
if current = @.Destination -- else return8 B! i: A6 h6 Y q
then" K4 Q! d9 M) y
@.Destination := void;
7 I! a; N( A( k- i5 w0 o* j1 \ B3 p; t if @.occupied then6 @! T Q! b& p( g
part := @.cont;
7 w" E6 h; n6 m2 P. } @.transpOrder := void;: R+ [ i U, `' g1 U
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
1 m8 s, W) G. R- A @,root.eventcontroller.simTime);
/ }4 V+ ]: @6 e7 e$ {6 }) T7 i$ n9 N @.HasOrder := false;
! F: d! L( }6 A' c& J0 D3 F @.DrivingHome := true;( i! g6 m5 K/ u# A6 I
rgManager.tryToStartTransOrder;! l/ w( e+ F( m7 Z
if @.Destination = void
8 d) A+ j( S5 N+ I4 x then -- no transport order for vehicle @/ f" g0 _5 T8 f
@.Destination :=( j6 L% D$ |8 R
rgManager.nearestFreeStation(@,track.~);# @0 z& c, t5 @
newDirection(@); + _) t+ e3 L- i( a' Y# [
if @.Destination /= void then
: P+ P5 U6 Q4 D4 o' l7 W @.Destination.NumReservation :=: n$ j% F# J% w# }; _, T
@.Destination.NumReservation + 1;9 V% b0 @3 |# u& K# G7 Q3 v
end;
0 n' D' j% V# |; |5 _ @.CurrIcon := "drivingHome";+ I2 V7 v1 X- [+ R* F
@.DrivingHome := true;1 z. ^6 l' i I- E4 T
end;
+ ^4 p/ l9 T& A0 U. g& R else -- the vehicle @ is empty, both vehicle and part are in the same dock station8 q- D( m( x6 d1 H2 r
part := @.transpOrder;5 `+ I) L( }& v# W1 j( a' c4 Q) Z
part.move(@);-- load part- s/ G: T, z: w" W2 j
@.CurrIcon := "load";3 u5 c* G( j: @. {. t# E) g1 i4 E
GlobalDistObj := part.globDestination;: V7 }4 g2 o) q: V
assignLObj := rgmanager.rgAssignL;
: x8 I8 U3 Q( ?) a1 } row := assignLObj.getRowNo(GlobalDistObj);; g( J: n# H6 F4 ^( r6 r
if Row = -1 then -- since 70' z% b8 v9 F; }# s# ~5 _" d
if lan=1 then
8 Y! L$ h: l: R" ? w promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),) ~7 C4 A8 i" N6 S
to_str("in der Andockstation: \"",?.~.name,"\""));8 q+ C8 S0 E% r9 E+ y' f
else
2 y; U" U: N, m3 C' _% ] promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),+ [$ M6 O& U) ]$ @6 [" @* ~1 l
to_str("in docking station: \"",?.~.name,"\"")); # u) j0 e1 T9 l2 t4 O# q, T1 @+ A
end;
2 o' [1 j- K: M( U0 a7 e& Z else1 b4 ` I# m: H2 o9 s, Q/ U& i
@.Destination := assignLObj[1,row];
5 N7 a1 B0 P& D/ t end;
( ?7 K$ R% H' b9 s% N# A" a newDirection(@);
7 Z, Y! k9 c) T: g6 l- w @.HasOrder := true;+ }$ C( _5 V* [) g
end;' {3 ^- k' T- K# G# A( H
end;3 V# E2 r7 E$ J4 a; [
end; -- of the method
$ a' Y5 h e) Q |