/* called by: entrance ctrl of the object 'track'! u. x/ x* N& M! g8 R
*/
+ t6 Q9 K- ~, |is
. ]4 s8 A. l' L7 p0 E part, GlobalDistObj, assignLObj:object;row,Lan:integer;3 u3 ?" o# i9 H+ z) Z: W$ Y4 q* y
do
" |# n% n) L) c, f- f# q Lan := rootfolder.Internal.Tools.AOLlanguage;
6 x! ~, a1 I) Z& m if current = @.Destination -- else return G5 p0 T* U ~3 t6 f5 ]
then
* C8 p% h' i, C @.Destination := void;; P8 d$ b' J+ I0 Q7 [1 E
if @.occupied then
! @9 w2 j! {$ e! p4 I9 `0 u part := @.cont;
5 U7 R. N" v1 d @.transpOrder := void;$ ]% K- G2 \2 w7 W0 c: S; K1 `
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,2 l% E8 ]1 Z: W+ a
@,root.eventcontroller.simTime);9 c7 D$ q5 @$ W: R8 ], D4 ^
@.HasOrder := false;' h) C: e0 n1 Z. r. ?3 _( @" L
@.DrivingHome := true;" y+ d) B( x! z o
rgManager.tryToStartTransOrder;
9 ~/ g$ ?6 U" Y if @.Destination = void
( R" w0 ], W$ @( T2 X1 W+ V then -- no transport order for vehicle @. Q5 K5 D" {" {$ a5 T1 z4 A
@.Destination :=
! S8 x7 H, q% h- z+ l' |- ~7 j rgManager.nearestFreeStation(@,track.~);
. x5 u' Z8 ~) e! U7 n: \ newDirection(@);
8 g% K$ t) Y2 C7 K if @.Destination /= void then, ]- J; h8 V4 @1 r) z( @: d" y1 ~7 e
@.Destination.NumReservation :=
' ^2 x: Q- M; c" {( E @.Destination.NumReservation + 1;! ~ j# }0 Y% U5 G
end;
4 t4 D$ S4 J- K% E0 G4 ? @.CurrIcon := "drivingHome";
1 x% \" K2 v, b: t9 @ @.DrivingHome := true;
2 U* F) e, ?/ W3 Z$ v end;( K7 M4 I& g& ~3 t
else -- the vehicle @ is empty, both vehicle and part are in the same dock station# `: @) t- K& Y; T1 h
part := @.transpOrder;/ I( J& y2 o7 D$ P
part.move(@);-- load part
6 s- j- d# ?; P" a3 Q' i$ \& g @.CurrIcon := "load";
# W3 s+ }; J/ M" q: K GlobalDistObj := part.globDestination;0 z! N: H9 q9 e N
assignLObj := rgmanager.rgAssignL;
- s; E* p# y. u1 h' P row := assignLObj.getRowNo(GlobalDistObj);1 X4 K( O2 y3 L! ~' ~
if Row = -1 then -- since 70
9 O1 |' S1 k0 Q+ ^+ v if lan=1 then2 m ^1 R, C6 n. P# h7 _$ V' Q, t
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""), K* \+ n- I3 s1 b
to_str("in der Andockstation: \"",?.~.name,"\""));
& F( e! O% y& R: Q& _ else
* E! E# M6 B! Z% {1 N: m2 c( I promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),7 a1 |( ?2 I' L) o% g8 q
to_str("in docking station: \"",?.~.name,"\""));
. m; }1 C/ t. J& J; N$ s end;
- H- g& Y2 T; @. X S) ? else
! ?) V# r2 @9 ~0 w. e0 [ @.Destination := assignLObj[1,row];5 V# g: B- H. ?5 T: ~& s8 m7 f
end; 5 k$ ?. m3 E4 b" w+ V
newDirection(@);
+ }! K$ [$ K7 J0 B& j$ ` @.HasOrder := true;/ j( Q) w# `3 v f
end;
: ?6 v, e" I/ c( \ end;
5 n% Z1 z7 Q; q/ a$ p2 e7 R$ K3 zend; -- of the method' S, g. a2 r6 P
|