/* called by: entrance ctrl of the object 'track'
2 M: l7 t0 Z# L" k2 d5 q6 g! U/ g*/
6 w3 C2 n( h) Eis
y' b, i8 m1 |+ _. C( R part, GlobalDistObj, assignLObj:object;row,Lan:integer;4 X, ^. N8 ~% ^# t
do
- p! B) Q- w0 i N Lan := rootfolder.Internal.Tools.AOLlanguage;
2 n9 h& W' v0 o: s/ g if current = @.Destination -- else return
! B5 Z' X& a/ O( r* o5 G, I then
: J2 g- M& U0 o( a1 d% p- I* e @.Destination := void;
3 f7 S8 P, j0 O. \0 L+ L. z if @.occupied then& L" x5 V: H4 z% Q
part := @.cont;$ U9 M( {8 u3 s4 d% F7 ?+ T5 D" j
@.transpOrder := void;
; D/ ?. c$ l+ I% M3 F7 [) h part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
8 j% P7 g( X- g# {, _" { @,root.eventcontroller.simTime);
4 W3 Q- N+ `8 d @.HasOrder := false;6 x# S. ^8 Y0 W7 m5 S2 @1 u7 T
@.DrivingHome := true;
4 X' L U8 N4 F# S" V+ Q rgManager.tryToStartTransOrder;* I* e; J( D) p9 @
if @.Destination = void2 J6 E. Y+ F! X) B2 @! i5 ?
then -- no transport order for vehicle @
' e1 D7 z0 {$ P, ` @.Destination :=5 @6 i2 t" b8 U
rgManager.nearestFreeStation(@,track.~);! w3 A4 W& I$ c5 `* v$ ~& r3 ~. Y
newDirection(@);
+ Z6 H6 Q: Z3 e" ^6 Q if @.Destination /= void then2 d' a1 ?, K9 Q* s1 P
@.Destination.NumReservation :=
5 E9 q' x2 D( c, D$ z @.Destination.NumReservation + 1;
0 L1 b5 l, a9 t3 r1 O# l/ @, O9 E; K end;8 u% N) C& r0 |6 M/ C
@.CurrIcon := "drivingHome";, E* V2 H% N, z# f
@.DrivingHome := true;) u5 @; s) N/ k2 E( N) Y# z B
end;! [ B* R- w8 A5 L& t
else -- the vehicle @ is empty, both vehicle and part are in the same dock station/ b; F$ Q% n5 C5 ?
part := @.transpOrder;7 T h2 V: v; J8 V' i( \
part.move(@);-- load part
: ?' Y; w& H2 a/ T* b$ W: w @.CurrIcon := "load";/ M$ ?6 H' A. c
GlobalDistObj := part.globDestination;
2 B" f2 A+ l! B% z1 q assignLObj := rgmanager.rgAssignL;9 g3 E3 ]0 p. z+ x3 e8 C
row := assignLObj.getRowNo(GlobalDistObj);% {( F5 B w7 l e$ A7 i! V/ c6 o* u
if Row = -1 then -- since 70
) W/ _. [$ I9 \: G! q if lan=1 then
3 k4 Y' g! w5 `3 s promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""), ?4 b! F" P( S2 a1 d! U
to_str("in der Andockstation: \"",?.~.name,"\""));. V- [" c( T; N! a0 b) }
else2 n/ d$ E: K- P" {$ n) v
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
8 f. z& r2 }% Y0 |+ Z to_str("in docking station: \"",?.~.name,"\"")); ) a6 R! U! e( f B
end;; p8 `" G" s: e |+ @8 J% M+ y
else
& a& I1 M J- k3 e5 H" D @.Destination := assignLObj[1,row];
; }2 q9 _$ B* Z s0 Z- Q, f end;
. _( k- ? Q8 K& y7 Y1 g newDirection(@); a; D3 g) h2 o P9 s
@.HasOrder := true;
2 y5 b; ?0 b2 `: ?3 {7 M/ R4 G: @ end;
2 g$ D8 U& Q! n4 M- H( d end; J. W3 l( r, v+ G3 |
end; -- of the method* {1 t% E7 U/ ` e6 K- B: ]
|