/* called by: entrance ctrl of the object 'track'
" w% S- w6 N3 F- j: S [" a*/5 R' d* M d) K- Q
is5 E) K3 w' `5 w0 r# K
part, GlobalDistObj, assignLObj:object;row,Lan:integer;0 ]; i; d6 {6 m* M4 Z0 p
do
2 Z0 Y0 Z) j: D& y# P3 @2 Q Lan := rootfolder.Internal.Tools.AOLlanguage;
* _% T1 k/ K" e: L, v7 t if current = @.Destination -- else return' |4 G* Z5 U" c; q3 ^
then# {, P1 E; ]. K- D* ]
@.Destination := void;
?2 s% j% z' F/ i: P4 y if @.occupied then
- Y* R, \4 V& x8 N# t9 Q: B& s0 V part := @.cont;
# @- Y$ r' _4 @2 `1 k7 O @.transpOrder := void;6 l# a9 E0 Y# w: V' p$ J
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
, j3 I, ]. ~3 i' Q/ C @,root.eventcontroller.simTime);6 A- L6 Q8 y9 M4 O' r! I
@.HasOrder := false;2 y& ~) p$ c) F& J8 Z) H) _
@.DrivingHome := true;+ {$ n# |$ q2 P* ^! ?
rgManager.tryToStartTransOrder;5 }( C" F$ T! q" O: B- {1 |0 q
if @.Destination = void* `6 L3 k# F$ }! F3 h( ?; |
then -- no transport order for vehicle @/ K" z& Z* |6 L
@.Destination :=& D6 ] L3 ?& I+ _3 x2 e2 @ T
rgManager.nearestFreeStation(@,track.~);( \" z. c/ `1 B# Z" i. [
newDirection(@); # {# x5 D+ s# J/ k
if @.Destination /= void then9 X1 T3 J/ a, L- n
@.Destination.NumReservation :=
5 E6 J& p3 X( r1 t& C y @.Destination.NumReservation + 1;0 e5 T! |7 j Q, @9 R( B* `
end;8 F( J. K& U3 B4 i3 S
@.CurrIcon := "drivingHome";2 q4 f$ \' O/ U6 q6 s/ ~. S
@.DrivingHome := true;
" i+ W5 I' w+ b1 e end;- I1 s" U5 @/ j! O7 X
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
1 r/ d' }& U* D# q part := @.transpOrder;. v8 \9 n' i1 z
part.move(@);-- load part
+ C, |4 f v( A+ ] @.CurrIcon := "load";
% R% S1 p9 O+ M) x) V$ X GlobalDistObj := part.globDestination;
t6 |+ X3 @! `/ B$ O, o assignLObj := rgmanager.rgAssignL;
* t: W/ Y, c/ l _/ D row := assignLObj.getRowNo(GlobalDistObj);7 @( y& ]# l3 p5 X5 R1 }
if Row = -1 then -- since 70
- v0 H/ g6 F6 A8 L6 Q: ?% C if lan=1 then
% y' e& T1 L. V; l( I0 }# B promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
& i6 o$ k+ \$ k1 h5 ? to_str("in der Andockstation: \"",?.~.name,"\""));
+ E& m9 E* r) T7 e2 ? else) L2 B; w' ~3 D; t7 k; Q7 v+ L
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),# |6 F& i2 p* Y! n. c4 }- ?. ?5 d
to_str("in docking station: \"",?.~.name,"\"")); * f# o% S( S! d' E2 f8 G( [% m
end;; v/ ~& R8 X6 W# g$ K1 C
else
C* h; C3 |3 ^% F0 `- c% A% B- Q2 G @.Destination := assignLObj[1,row];
; I. C8 u" ]8 B Z( y. [- Y- H end; 8 c/ _6 C& X# u+ S. e
newDirection(@);7 H( ^. I* v, l# Z K+ R
@.HasOrder := true;
: k) E- o' F0 `. Z end;/ ^1 W. m9 X- Q$ i! G) U
end;
) R! c8 F1 C# w q; m+ j" Wend; -- of the method
$ A3 u* N; P; A8 R, G |