/* called by: entrance ctrl of the object 'track', W% s& b8 M q8 Z2 f
*/
; Y1 ^, D4 s, {, z* Eis: R, m/ [0 b; e+ e3 G
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
+ M. e0 |* t& ddo& ~/ L8 u9 s3 P# h6 u, ~
Lan := rootfolder.Internal.Tools.AOLlanguage;5 w g" |. F/ ?' D
if current = @.Destination -- else return
f! U2 H3 U' J then
/ D$ I5 p) K) z5 n! @ Y( m @.Destination := void;$ l3 }/ u! O" u2 M6 I9 ?+ z
if @.occupied then
8 a) r8 Z& f! ~0 q, o. ^ part := @.cont;( F% t+ H3 a& {* ] T* C
@.transpOrder := void;# p) S4 T( P0 O: C/ O
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,+ i |6 N- ~; m8 _
@,root.eventcontroller.simTime);: Q9 b5 G8 G. M( t
@.HasOrder := false;
/ `% F& { w9 T3 \, T! E @.DrivingHome := true;" O. S( ~" ?, N1 u1 \
rgManager.tryToStartTransOrder;0 O. s- U! Z7 E' I, ~
if @.Destination = void
: L, E- A. Q6 A' r& g, q" A+ c then -- no transport order for vehicle @
: R! ?! l f' ]' o @.Destination :=
+ |$ s/ ^) q0 f) _3 t6 X rgManager.nearestFreeStation(@,track.~);$ O/ }- U$ _( C- y7 }6 ]
newDirection(@); $ z1 I, V9 _8 W+ Q, C2 W3 y6 H
if @.Destination /= void then
* O# R. O+ V' O. `/ d h" V @.Destination.NumReservation :=
s+ G t9 N; k" Q; p8 t- ^7 J& C$ q @.Destination.NumReservation + 1;
; ]/ N3 z1 M5 D* b# l+ s end;
2 |$ m8 t% V+ z" ? @.CurrIcon := "drivingHome";
1 U, b! C0 a, k0 ?. G2 J) r. q6 j @.DrivingHome := true;- C" e9 k" R1 p: |
end;- r6 i- G- S3 I0 J
else -- the vehicle @ is empty, both vehicle and part are in the same dock station- O( R& _" c% [+ m1 a6 x( l9 H( b
part := @.transpOrder;/ W3 i8 u) Q# Q7 Y' G
part.move(@);-- load part
$ K/ c, |# s8 n5 g% p' p @.CurrIcon := "load";
# J) Y8 r0 G( x+ O/ B; \/ I GlobalDistObj := part.globDestination;
7 J) z3 y3 [: ?2 }7 | assignLObj := rgmanager.rgAssignL;. `: o8 c' v: A
row := assignLObj.getRowNo(GlobalDistObj);
2 V2 s1 c& O+ n6 ]( ^' ^ if Row = -1 then -- since 704 \1 T1 b5 F7 V. ?: `- H/ R
if lan=1 then
3 {: a7 _ _) z promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),: v$ r% [5 d4 ~& F( S
to_str("in der Andockstation: \"",?.~.name,"\""));. G) o( k% p" k. l
else
8 h% |- i2 }/ W5 o+ u3 ^# { promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
2 Y$ Y6 D ]7 c to_str("in docking station: \"",?.~.name,"\"")); / N' m2 v& N! ], J! ~" ]5 ^( k
end;
9 [ c- f& ^5 {1 ?: v, ^ else0 p& u! n+ h h- x# q4 n
@.Destination := assignLObj[1,row];+ J8 E5 i. H, X9 [1 _) ^
end;
; S) ` A" o+ j2 l. L v1 ]' b0 D newDirection(@);
+ w; _% H6 j1 N$ z! s# A r @.HasOrder := true;1 x$ t0 H" U/ @, p, E
end;
a. v) Y8 b8 D4 B7 R1 f end;
4 S, d5 \: m: tend; -- of the method
3 I& n* q, H) D- ?9 [ |