/* called by: entrance ctrl of the object 'track'
# A; t& P' j h+ w7 S*/9 a) F0 |7 I- d# P, l9 ^! ]
is
8 ~2 W* g: A! ~. E2 j: ?, m part, GlobalDistObj, assignLObj:object;row,Lan:integer;
( X* a+ G8 M0 O' h& x' C- _% ~do+ \9 b( f5 a7 F/ V
Lan := rootfolder.Internal.Tools.AOLlanguage;
5 s d$ q. @" D" U) s+ E! d% }: x if current = @.Destination -- else return1 r! h7 K* ~: H: `/ J4 E6 ~
then. ~' ^' } \' z2 Z3 P- h5 t9 F) V. a
@.Destination := void;
9 @$ P- K- y3 a3 _ if @.occupied then
7 ]' e, Y, y! `! s part := @.cont;2 N: K! d& O# n. j
@.transpOrder := void;
3 c# H. S/ ]8 x' v, o3 c8 ? part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
: i4 t4 n+ r% G3 d' P; F @,root.eventcontroller.simTime);7 k8 U2 P4 n) P- E+ k
@.HasOrder := false;
9 w; f# t5 u2 m7 E1 k @.DrivingHome := true;
4 w' X* p4 K' x) x8 H rgManager.tryToStartTransOrder;
8 q) Q4 o1 {8 D* E0 d if @.Destination = void$ {6 X$ `; Z l
then -- no transport order for vehicle @
' o# T/ N( `+ [& s* V$ } @.Destination :=, N8 a- ]0 C# }) n: m( o A
rgManager.nearestFreeStation(@,track.~);+ M6 _4 S8 M6 h/ p$ g, L
newDirection(@); : A. _- d1 B& k& ~5 I- M
if @.Destination /= void then
: O( \, j' }# n0 ]$ X8 T7 O @.Destination.NumReservation :=2 I+ I7 J( l9 G
@.Destination.NumReservation + 1;' E" @& b/ h2 H. f
end;- d1 k1 d0 O: X
@.CurrIcon := "drivingHome";$ m+ } s( d0 B! X
@.DrivingHome := true;
3 ]( z) Q# b0 l& r end;
/ G3 L% ^- A$ O4 B3 M/ f1 [, m else -- the vehicle @ is empty, both vehicle and part are in the same dock station
) q; ~2 J8 Z& s0 P# ^1 L, F part := @.transpOrder;. J- g- A0 E0 p$ r/ r
part.move(@);-- load part+ D3 K/ k, V+ S/ Q
@.CurrIcon := "load";" l' G# V( A0 V9 Y: v! x
GlobalDistObj := part.globDestination;- n/ g) e! @8 \0 P
assignLObj := rgmanager.rgAssignL;) Y1 c, @$ b& d$ \5 b! E
row := assignLObj.getRowNo(GlobalDistObj);
# L9 X9 y M; J8 v, j; R& v if Row = -1 then -- since 70
$ B$ w. M/ Y* u if lan=1 then8 V8 E( |' H2 `( b- ]
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),* |2 r1 }* b1 y6 D3 E' s
to_str("in der Andockstation: \"",?.~.name,"\""));! c6 J6 ^4 i5 J
else1 |( L5 x R6 J8 Y
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
, ? V r5 S- z) \3 j' I5 M to_str("in docking station: \"",?.~.name,"\""));
' W8 v7 ?4 m" R+ Y) C% e, I5 H3 g4 v end;9 x4 R2 o9 T9 p5 {6 W* k* o
else
4 h. m* y$ ^" S$ F% ^ a1 V0 p) ~ @.Destination := assignLObj[1,row];! p! P1 w6 t- R$ T5 B
end; & P2 [9 p$ N9 [( r! N3 D1 e
newDirection(@);9 E4 r1 N. `! h
@.HasOrder := true;8 J* Y2 n1 f" t2 Y- u! e/ I. q
end;
: `, S& }9 v* ]" d( H7 _2 ?( [% m' ~5 | end;
0 s( h+ o- m* kend; -- of the method: I, s' a! z+ B% ]5 a# y! h' `; f! ^
|