/* called by: entrance ctrl of the object 'track'1 J% C4 f- L2 y' d. f9 W
*/
( q7 f9 Q, c1 ^! Ois
6 n( C5 \$ q& F$ M! I$ m- U part, GlobalDistObj, assignLObj:object;row,Lan:integer;7 @0 o% @5 u! l4 s+ O+ `
do) P( `% l$ R2 N1 H+ ?
Lan := rootfolder.Internal.Tools.AOLlanguage;' f7 Z9 N2 i+ k( C+ ]2 R# \
if current = @.Destination -- else return
2 G2 Z) Q: P; ~, r( b+ C5 ` then v8 F: L' f a& M! e
@.Destination := void;: s9 p. B+ n6 N. {5 I
if @.occupied then
' ^) K, G9 ?4 F9 }) S1 q part := @.cont;/ i' T/ \, j$ L
@.transpOrder := void;
- @9 |5 I! l& K$ }, y+ J7 F) A, [ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
4 V2 P! X) e/ Q @,root.eventcontroller.simTime);
7 M7 X# W% j9 p) ~, s @.HasOrder := false;2 Z* k0 z8 n! v: L* `
@.DrivingHome := true;' o% L/ b0 |/ ~& Q! u, Z. M0 ^ E+ K
rgManager.tryToStartTransOrder;) \4 d1 r* E0 ~) Q( |4 e
if @.Destination = void. }# h( D; F) B; N; ]4 @& y
then -- no transport order for vehicle @+ y: u; z4 ~4 l6 X% p
@.Destination :=
6 }- Q! T9 d2 d5 X. C( s; _ rgManager.nearestFreeStation(@,track.~);
4 ~) D( {% Q4 A9 D% a3 J# k newDirection(@);
% l0 M/ w' a2 k1 u, W" R# q if @.Destination /= void then
6 Z+ M. E9 n2 ^' y @.Destination.NumReservation :=+ P. E- \8 |$ p0 Y, e( Y/ T
@.Destination.NumReservation + 1;
: }2 w. d, z. W' S) C end;
% B2 ?1 T3 R& j& D9 F @.CurrIcon := "drivingHome";
+ z. M2 \. {. Q# [7 p0 ?% J @.DrivingHome := true;
+ e0 n8 a) E8 ^8 j8 r end;5 ~( u1 s( }% y) o* ]3 D4 B1 j
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
/ p" k. q! m: c part := @.transpOrder;* U* m1 G( C* L
part.move(@);-- load part
+ H+ ?" o- Q- m' ]7 r1 d7 I9 I/ s @.CurrIcon := "load";. B3 F* f; F3 ]
GlobalDistObj := part.globDestination;4 ~! ?0 F, l' x
assignLObj := rgmanager.rgAssignL;
- ~# ~! S8 k. X' a. @ row := assignLObj.getRowNo(GlobalDistObj);
. w: c6 c7 W7 w$ F if Row = -1 then -- since 70
, d: y2 x9 L+ [. N: u if lan=1 then
, H R) A' R; ?& c( _ promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
" V8 C n6 D7 `$ [7 X$ ~0 | to_str("in der Andockstation: \"",?.~.name,"\""));9 Y% Y |" \7 w
else2 @( k4 s1 P" `
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
* C3 H/ ?( Q+ \5 z! V to_str("in docking station: \"",?.~.name,"\"")); - f2 O' n+ u4 B8 ?3 L3 }, [) V1 [
end;
, F: V# \0 t5 k; S7 U" @$ r else1 o+ N+ Q, J* l; a* |" E" l D
@.Destination := assignLObj[1,row];
; G+ F2 U- f9 U end;
8 Y* I3 v3 p" w7 G% U* \ newDirection(@);
3 k1 N1 N& u% g! S8 \ @.HasOrder := true; a+ `" L" W. d( k/ G. l+ v
end;
6 O& n. H* B. W1 {! C) t; B end;
$ ?! x& X" [2 ]- ~* bend; -- of the method0 g/ b- f T* P5 O
|