/* called by: entrance ctrl of the object 'track'
/ C' X1 y0 v4 q*/# K& Q; h! U: p# N" c7 ?. w* w
is
, d( k% R' P) j: a; h* y6 q' { part, GlobalDistObj, assignLObj:object;row,Lan:integer;
9 p# C! ^# |2 gdo/ L/ C1 K* ]8 x# R
Lan := rootfolder.Internal.Tools.AOLlanguage;+ f+ C+ O b0 F$ Q% s; k: H# ~
if current = @.Destination -- else return9 l" o: `/ A) Y7 E/ G: G% S
then' I; Y: W1 E6 K k+ X" a
@.Destination := void;: C# s7 \' ?! T0 @
if @.occupied then- m+ M* @* j3 E- P
part := @.cont;
4 I& h' N5 [( q @.transpOrder := void;9 b0 z- C6 O$ W2 U
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
' K# r+ j# P) M4 k2 G ~ @,root.eventcontroller.simTime);
. P$ |9 h8 n C: S/ Y! Q, i1 ` @.HasOrder := false;4 j i& N$ ? q% Y, H' t# w
@.DrivingHome := true;$ l7 E( n* W! n2 q( k3 ]
rgManager.tryToStartTransOrder;6 ?- ^+ {4 j/ |+ L) N" s
if @.Destination = void
- o9 R" z: u. i+ z0 M then -- no transport order for vehicle @, o6 \, @2 w! d ~0 ^- m/ V
@.Destination :=
; F, B' o2 t' t k+ d- T rgManager.nearestFreeStation(@,track.~);
. b( q; c" }$ k {" D, X newDirection(@); 3 O; M- k# r9 n2 w6 Z7 }/ y
if @.Destination /= void then! y$ F& g/ W2 [6 x
@.Destination.NumReservation :=# p; j" f- g# R5 l8 q$ `+ Y- F
@.Destination.NumReservation + 1;
. p" \+ o9 S) n9 c end;4 s- h+ t9 {4 g( v* g
@.CurrIcon := "drivingHome";/ |: @7 H8 w9 ^8 j* j* l
@.DrivingHome := true;
* a3 D6 T) j: r" r# d end;- x8 U8 {; r6 l4 Y0 f/ J1 P
else -- the vehicle @ is empty, both vehicle and part are in the same dock station9 U, x5 ~1 X: x4 x( v5 q
part := @.transpOrder;" c0 C, ]% @; j1 M! e# f) ~
part.move(@);-- load part
) c: A5 y- I4 E/ I5 V1 Z. z7 l* m. I @.CurrIcon := "load";
/ \% ]& w( y' @& [/ h! a GlobalDistObj := part.globDestination;0 b3 A6 i3 d0 K4 t& O6 ^! k- ?
assignLObj := rgmanager.rgAssignL;* W% p+ H M* z1 o5 q3 J
row := assignLObj.getRowNo(GlobalDistObj);
1 v- e) D/ N0 b, g) F# s: y, f$ r if Row = -1 then -- since 70
$ X; e' C# G6 w6 S' L if lan=1 then' z8 D- G: ?6 Y! P! |. `
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
, s! e* H7 u+ J9 l to_str("in der Andockstation: \"",?.~.name,"\""));0 }9 A3 F9 E z* L; P3 _0 D3 @0 K
else
2 P' U7 a& E- j promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
+ k, f- J0 ]7 }1 ]5 Q to_str("in docking station: \"",?.~.name,"\"")); # t0 K: x J3 S6 H9 Y! b9 E U( ]' {
end;9 G" _$ ?( E* @' \
else
; A& i, a4 `1 \ S @.Destination := assignLObj[1,row];, m: Q; G5 Y4 `# ?. U2 D
end;
: L/ i/ V3 m* G5 w newDirection(@);8 l3 c+ g! u' J: s7 _ b: g
@.HasOrder := true;( r; G1 \7 Y+ f5 l$ n) u) i. J
end;
9 h5 i; Q4 p: g- i) ~& N end;/ i I/ c$ T6 k1 q7 \
end; -- of the method7 R. s/ F/ ~7 Z
|