/* called by: entrance ctrl of the object 'track'! M& b+ H, e) `6 T
*/
2 y" X* r6 [4 F. r; ris
8 G8 F) z2 S- O& G3 H4 n, E* F+ K0 v; Z part, GlobalDistObj, assignLObj:object;row,Lan:integer;: J ]( r9 }) u- ^3 J% c1 Y
do
) E; [2 z" G9 u- ^" d$ @) d Lan := rootfolder.Internal.Tools.AOLlanguage;
* q& K$ W8 v, B if current = @.Destination -- else return
+ M+ @8 A0 D r$ l5 x then$ I( F6 T) }/ A' }
@.Destination := void;" J5 i; n4 S+ c9 Q
if @.occupied then) x3 Y4 V- B3 A2 i" J
part := @.cont;0 [+ r% U1 f* x! {/ \: \4 }
@.transpOrder := void;- S' K4 m4 s5 c
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
) B0 w8 u* U, I) Y @,root.eventcontroller.simTime);9 H4 s8 i7 t+ e
@.HasOrder := false;
; H: h- |: A' e3 g! Y. s @.DrivingHome := true;$ _' \& e" i ^* f/ w. [' w5 q
rgManager.tryToStartTransOrder;
% @+ G* Y# M- l7 w6 B4 {9 ]9 [ if @.Destination = void7 Y; S7 L( G" g7 I: E* o
then -- no transport order for vehicle @- J# ~( O# y% H8 C/ c$ M+ L
@.Destination :=" }' L/ ^: ? S* {* B; R
rgManager.nearestFreeStation(@,track.~);. x1 _$ O, o4 P1 o& n9 s: G
newDirection(@);
4 ~1 b, C: |% R1 E6 ?2 P if @.Destination /= void then
# H! c# Y8 D/ b% h$ a @.Destination.NumReservation :=* v% V- v; g! ~3 e) O) T0 z. C- q6 K
@.Destination.NumReservation + 1;7 Y+ Y6 R/ L" d
end;+ q' e( o+ A0 N0 k4 n
@.CurrIcon := "drivingHome";" k0 ]8 W6 |% Z, T
@.DrivingHome := true;) o8 z* N$ X6 D8 y& S; Z: f
end;
( z0 A" ~5 b4 _) s& e else -- the vehicle @ is empty, both vehicle and part are in the same dock station8 A" d2 R, H3 D2 X5 T& E( D! J
part := @.transpOrder;
( o% L) ?$ w7 q2 H7 ]" D) A part.move(@);-- load part1 H1 N! \: a4 `7 t9 G1 @
@.CurrIcon := "load";/ W& f8 g7 X% v' B: q: Q% ]
GlobalDistObj := part.globDestination;, O0 A* ?1 Q6 [$ Q$ g. h
assignLObj := rgmanager.rgAssignL;6 E% S( ~- I6 D+ `' K8 b2 b0 @
row := assignLObj.getRowNo(GlobalDistObj);6 C/ |$ U/ u/ }) J2 j9 @+ Z
if Row = -1 then -- since 70
& t/ [# F( z& N% B2 [ if lan=1 then2 v& j$ ?2 D: t0 L/ I# Z2 ?
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
; w: g- y: h* x8 _$ K5 @% L3 p% e to_str("in der Andockstation: \"",?.~.name,"\""));- l8 d. J1 h7 W' b- N
else( a. O1 p8 B; b4 a' V' C( S
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
; ?; I; O% h3 ^ to_str("in docking station: \"",?.~.name,"\""));
Q: c* t) v+ ?: G% C end;
4 k/ x$ `" Q9 w! O1 I4 O5 L. l0 m else8 N, R/ h& \5 r6 j% D7 P2 e
@.Destination := assignLObj[1,row];
1 o' d3 e$ Q* Z7 ]# Q6 R3 J end; / h1 u H) x+ f2 V; S
newDirection(@);3 |7 |. l! [7 P& F8 z
@.HasOrder := true;
3 J# M# \! A! v' }( B end;. Q! T# U& M( y6 i/ t1 C; c1 n% \; W
end;5 t! [" j% U# u/ ^& m2 t
end; -- of the method% |1 E6 ]0 ]: z: d- @: {9 a) L/ b
|