/* called by: entrance ctrl of the object 'track'
' i' c) E+ t( m) k* Z*/
* G3 h w6 M; s8 G9 Z& S& ~is
: Z, ~! k# B% T% D5 a part, GlobalDistObj, assignLObj:object;row,Lan:integer;
2 p( |" T u2 l+ ndo/ P( d H* ` i& G. L
Lan := rootfolder.Internal.Tools.AOLlanguage;
# n1 V5 P2 u; j# V$ Z2 ~; V+ I9 o if current = @.Destination -- else return
w0 r, b+ v s1 K then
' L& Y7 _* _( G/ V5 i @.Destination := void;
5 d+ ?7 H+ ]7 H" n! y if @.occupied then) b; P" a" o3 X7 b1 j# \ s9 t$ r
part := @.cont;
7 K9 c5 Z( k! {; v! m8 A @.transpOrder := void;
, g% _0 D% D9 U( m part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,' ^- @( a" `* P/ f6 x2 m& W
@,root.eventcontroller.simTime);
1 z/ i; w8 C. y* \7 f# c @.HasOrder := false;
X0 H2 ?9 G3 q! o, k2 W @.DrivingHome := true;
; u* G: r! s# y; X' ?/ l2 S7 x' _+ ] rgManager.tryToStartTransOrder;
2 ~! I8 P% e1 G# F' ]/ [) | if @.Destination = void8 X# D' ?# j! c. T+ U9 S$ T! l- E
then -- no transport order for vehicle @6 s% d- K: n) _# w
@.Destination := |3 U- h0 n0 B! o+ W+ B' y' `* e
rgManager.nearestFreeStation(@,track.~);
! \& `+ r0 h! F$ y' k& e' W% j newDirection(@); 6 O) m/ I& @( `$ Z
if @.Destination /= void then
7 m& @) [, s2 v7 f8 Y @.Destination.NumReservation :=
3 k! _4 O; k' s4 x! S E @.Destination.NumReservation + 1;
1 B! r! v+ V! W# Q' W end;4 [2 {7 d9 ~0 O5 k& |
@.CurrIcon := "drivingHome";( s. p8 Y: B1 Y$ |
@.DrivingHome := true;
# \; y' O1 d j1 b1 C1 ]' N9 _ end;: ]7 _; ?. z/ t( v+ g( O3 d
else -- the vehicle @ is empty, both vehicle and part are in the same dock station7 r& O: z, \* P5 P0 c7 v
part := @.transpOrder;( @7 v1 i8 o% g9 M$ |6 J
part.move(@);-- load part5 v9 [! x2 [2 M0 x: U) H6 r
@.CurrIcon := "load";
$ }( \1 v' u2 A7 z4 v# X3 ^ GlobalDistObj := part.globDestination;
3 l' T5 S1 |4 T- I/ [% x assignLObj := rgmanager.rgAssignL;
$ z: j7 R; ~& h1 q4 O2 }# p row := assignLObj.getRowNo(GlobalDistObj);* A5 _: P9 D* J+ a4 c
if Row = -1 then -- since 70
+ ?3 z8 k; x/ L- p if lan=1 then& x G( b! C. k. z8 ?9 ~
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),. O- ~% d1 o" L4 y9 g+ y# {
to_str("in der Andockstation: \"",?.~.name,"\""));
3 S& v" F6 G9 ]/ E else# M* Q& q+ S9 V$ F( M
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),, \/ r4 L+ `# A# _7 V
to_str("in docking station: \"",?.~.name,"\""));
" O# t4 v% f" g z& m+ \ end;
' W' o9 E) W0 J/ G else# b: n: R8 i/ A0 ~
@.Destination := assignLObj[1,row];
, h; A9 \+ D7 w t! G( S end; : L- B0 M; C" U1 ?8 V
newDirection(@);
7 \% N) p; R" p a# K @.HasOrder := true;
: F1 Q T9 ]: E0 N+ s% Z end;5 E1 C! Z) z0 m1 ]. M7 i! b
end;
3 q$ A$ c d& N2 M5 t4 Eend; -- of the method1 c& s. `/ T7 G R4 d v: X J
|