/* called by: entrance ctrl of the object 'track'
7 P m- J! w2 h3 b* j( X# A*/
) y6 D/ T7 S2 c( ris; n4 N5 n) s3 f9 q; ^9 |" R% x
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
1 r8 p5 @- ^, p) |1 ndo. n) M( N, F3 c2 M3 }
Lan := rootfolder.Internal.Tools.AOLlanguage;( a0 u. Y% j z
if current = @.Destination -- else return
! v' v8 ]% ^5 \- B+ v; s, }8 \& Q then5 X+ N' ~" J& B7 F* X8 J
@.Destination := void;* K& B8 |0 m$ f5 V3 b
if @.occupied then
6 g1 K2 @. F2 s1 S part := @.cont;
# X$ ]" T$ a4 x: `" I @.transpOrder := void;5 L. X" Q1 u( e- @% u" S5 c
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,4 w. S$ d2 r; B: L( _" L* b. B
@,root.eventcontroller.simTime);
9 s& c, n; M3 Q; t1 r @.HasOrder := false;
3 \4 Q# Y* g/ p( E: H @.DrivingHome := true;
; x) p( J9 U4 p3 @8 {4 r rgManager.tryToStartTransOrder;6 I5 \5 P0 ]. Z8 g1 o- Z k
if @.Destination = void
2 z- ~' ?' I' H7 a1 e) P then -- no transport order for vehicle @
. S. L$ e' D' n7 |, t7 Y1 X; I# m @.Destination :=
& h$ D9 p+ Y# @, y$ P5 l rgManager.nearestFreeStation(@,track.~);4 B, ?8 z$ M( L4 x& q" f
newDirection(@);
( M5 a- f; P; \$ P if @.Destination /= void then
$ t+ c l; D" t j" l. g @.Destination.NumReservation :=
7 S$ N9 b+ o4 S) e @.Destination.NumReservation + 1;/ _0 y3 r# Q/ I0 O2 `1 u' y
end;
9 B) u% } E* G1 X3 ~6 R9 \( g @.CurrIcon := "drivingHome";
% e8 H# I6 }# D" c @.DrivingHome := true;
3 g( { {& n9 I& V( e; y Q/ I end;6 }' h! l4 E% ^: B* z3 t7 Q3 |
else -- the vehicle @ is empty, both vehicle and part are in the same dock station8 Y- m0 K; s. X. f, [+ R: S
part := @.transpOrder;
- Q6 S% r0 @3 x5 ]+ `9 o+ G+ N* i part.move(@);-- load part, C U+ |. q& p
@.CurrIcon := "load";6 d1 j% A! V" ~2 S
GlobalDistObj := part.globDestination;
' F$ D7 f8 l9 H9 ]8 m1 {% n }+ H assignLObj := rgmanager.rgAssignL;
6 p( J0 @/ ^9 t! O/ F1 G row := assignLObj.getRowNo(GlobalDistObj); w8 a/ N) U& o, [' W# [0 [
if Row = -1 then -- since 70
A0 v! j" P+ K6 k if lan=1 then
9 l# {# N2 ~8 J* i0 t$ i5 m promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
/ n0 l; r2 m D' c" x. m to_str("in der Andockstation: \"",?.~.name,"\""));+ [8 {2 V5 l$ @, K, [
else" A% x/ \6 _" g- W5 K
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
, @. O, N+ L) G$ K to_str("in docking station: \"",?.~.name,"\""));
" A( I, }$ V' L8 ~& B) K end;
6 |" T) ^) H5 L else
/ f7 x# H( ?7 i0 u7 W @.Destination := assignLObj[1,row];
. ^( b# k! j" R ?7 ? end;
$ x; U R' z% Z# N/ o( r newDirection(@);
, z) `, |& ^, p, { @.HasOrder := true;
4 v8 c, j6 U9 e& }1 [, B end;
3 y- r; X K; B3 ?; _* O& e5 Q end;0 _# O! d$ k( |" @& B
end; -- of the method" a# K5 q% {5 H: U
|