/* called by: entrance ctrl of the object 'track'* l* e5 {8 f5 V2 m3 I# c
*/3 z) j+ s+ z$ B
is2 u; K6 w. i9 W1 ~4 G
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
2 r& p* c" E g& \2 Pdo
$ ]2 F/ d' F. _* q" y# q- d ~2 v Lan := rootfolder.Internal.Tools.AOLlanguage;$ `- R2 R7 l& K7 f1 G) P9 ^
if current = @.Destination -- else return
5 S# b4 |& j% U W8 i* L/ }% y then
" U3 S, k f# o9 m V, @& ` @.Destination := void;6 I% [( p9 W* V9 Z
if @.occupied then- W6 \( [5 y( s. s/ o
part := @.cont;
3 M5 J) }4 d& N @.transpOrder := void;. L$ _' J# m/ g9 j) E' v$ G
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
+ Q9 b# H. }( y- M, u* |& y& O @,root.eventcontroller.simTime);
5 i6 j, D0 }1 a! C0 X3 ? @.HasOrder := false;
, L" Y' v# N$ S/ ~8 w6 T @.DrivingHome := true;- ~6 o' h# O0 u. p) H9 P: N% @6 o
rgManager.tryToStartTransOrder;$ {1 |' D) P7 n/ }/ Q
if @.Destination = void( `# F& c Z4 a) p1 x: K
then -- no transport order for vehicle @9 b9 A/ k q4 Y) t) ?
@.Destination :=' k, L5 e, d" b- ]0 R$ k1 H0 a1 N
rgManager.nearestFreeStation(@,track.~);! Y. s5 g) m/ L1 W
newDirection(@);
2 _. T2 d' A- r3 p' M* Q' r# m if @.Destination /= void then
& y5 e9 U& o9 l, V7 u H @.Destination.NumReservation :=% g& N9 Z: s8 ~1 C9 z# e
@.Destination.NumReservation + 1;
, x+ ~+ g& y7 ?: b5 g& m' D end;
# X" F, x$ a' \2 f @.CurrIcon := "drivingHome";
+ \2 S0 P1 S1 J, B/ n @.DrivingHome := true;
) ]) q# a. q) l3 s end;
) R4 e9 l" {/ U1 X& W3 Z else -- the vehicle @ is empty, both vehicle and part are in the same dock station# \9 ]* X5 e+ p8 E1 |- {
part := @.transpOrder;
: L, K/ ?" s* A part.move(@);-- load part
2 l8 A# Z: {, L0 ] @.CurrIcon := "load";
/ [! L# M7 n" W+ @ [" M7 e9 t& r GlobalDistObj := part.globDestination;
3 W% B' z$ [9 y- S. [" [ assignLObj := rgmanager.rgAssignL;
0 d" B8 e, u. A row := assignLObj.getRowNo(GlobalDistObj);9 {, z2 W9 ?) v8 M8 ^
if Row = -1 then -- since 70& D2 h/ z ^( J: c0 D
if lan=1 then0 U6 P2 U* e& R% P" b2 o
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),8 ]/ W7 G/ s) u" ]! W
to_str("in der Andockstation: \"",?.~.name,"\""));
( U9 O) Y! w( n. y' C else
) I+ j3 c0 r! ~' C0 A promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
7 c; j5 i$ r4 _+ t to_str("in docking station: \"",?.~.name,"\"")); ) G3 |9 z: |% L. D
end;
: g8 l. B6 N) a8 K else* D! @( i% \1 z) C: G! F. H
@.Destination := assignLObj[1,row];/ Z$ z- k9 y+ I& w C
end;
' b" ^/ R9 A* E! V( ` newDirection(@);
e, G3 F& K/ u5 T @.HasOrder := true;
G9 j5 P, }& r& ^2 s% \" E end;/ V" V- x! E, b- x9 x! V2 }8 y
end;
9 _6 i7 w* S! [1 d' `end; -- of the method! w% @$ |9 F/ `5 u2 f+ n) a
|