/* called by: entrance ctrl of the object 'track'
/ y' c6 F' p$ K( I- ^" q*/
( `( Z. s$ t1 Q9 f- `4 r |is
4 B- b) W8 F+ t- s0 L5 |1 l8 c part, GlobalDistObj, assignLObj:object;row,Lan:integer;
1 q$ Z# f6 a! L+ Zdo
7 j3 }: c/ j' f( U6 n5 v$ ~ Lan := rootfolder.Internal.Tools.AOLlanguage;* T$ M6 U' G/ O& x7 p o
if current = @.Destination -- else return( V+ H8 b |2 t2 f$ `6 F' y( k$ x
then8 V6 }( k1 s) m! {( |
@.Destination := void;0 [: x, H) K+ p. ?
if @.occupied then
1 U( Y: V- H5 b, Y* W! N7 q part := @.cont;' I% v( ?& ]$ S& [% \
@.transpOrder := void;$ s% M Y6 F! ~) D9 L* Q; H* w) E
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,# {. q; b* p9 U1 L' R
@,root.eventcontroller.simTime);9 w" P& k" q% \* a0 E" u
@.HasOrder := false;
: H* Y0 n0 Y$ R$ _8 w, \ @.DrivingHome := true;& }* W4 F3 X, V4 l9 V/ |
rgManager.tryToStartTransOrder;
. U. K* _, o& e1 l if @.Destination = void
1 _% Q/ ]' R2 r5 \! R6 L( }4 @ then -- no transport order for vehicle @% ^' x7 {( ^2 |
@.Destination :=2 ^$ w! C& d: j9 ^% u
rgManager.nearestFreeStation(@,track.~);
- W+ x. d, F2 E3 I2 i+ B" m4 w newDirection(@); ' ^1 L, d& K( O( f- g
if @.Destination /= void then9 f/ {* T) C0 ^) I
@.Destination.NumReservation :=. @: r- h& _" r$ d) v3 M" T
@.Destination.NumReservation + 1;+ V; N9 m; A; v
end;
: S9 l V' F6 L @.CurrIcon := "drivingHome";
' \# S9 q, c8 x; G( S1 R @.DrivingHome := true;( I; i+ a9 B( Z
end;9 ]! x1 H Z% k `: e
else -- the vehicle @ is empty, both vehicle and part are in the same dock station% A/ l8 q* F7 ]* g% ]7 m
part := @.transpOrder;/ F0 H6 b9 D' L- E0 t0 ]
part.move(@);-- load part
3 @, z8 E4 l& z( N* x8 G @.CurrIcon := "load";
8 Y) \* S- j" x7 s0 u& S& K l GlobalDistObj := part.globDestination;3 d& V) ]$ a# \0 Q" m# o
assignLObj := rgmanager.rgAssignL;* D" ~/ \' k$ c: x$ n: c/ b
row := assignLObj.getRowNo(GlobalDistObj);
3 O1 ~5 Z( D+ w' J; @# x if Row = -1 then -- since 70
$ r1 m! O! x' k; Z if lan=1 then
+ d, E. V* T5 Q promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\"")," q2 _7 L# `" Q, a9 N- g' p
to_str("in der Andockstation: \"",?.~.name,"\""));
8 w& y. V5 c5 [& U" M/ C3 s5 H: f/ ^ else
' y0 w2 ~: Y1 e) w7 e4 s% ~ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),- }% M9 {2 V8 R- y$ [3 ?7 J
to_str("in docking station: \"",?.~.name,"\"")); 0 c+ q0 }5 k& o* g1 [$ H" E6 r) {
end;5 c( _ U7 C1 ]3 m2 q
else
+ q& l; y$ V4 c1 s8 s @.Destination := assignLObj[1,row];
6 B4 ^1 M3 b7 o/ p end;
" }0 N+ G5 A6 _/ { newDirection(@);: e; H. p& g- f& V1 ?
@.HasOrder := true;$ \5 W5 L# |' Y, I2 }: |
end;
: g/ }; ~8 b( ~4 N# e* l end;0 t! f, h% b& a% k7 e; {9 p
end; -- of the method1 O& E2 y# K( J( L+ p% p
|