/* called by: entrance ctrl of the object 'track'
" J6 n9 H+ i/ ?2 K2 `' v, O4 H*/
$ |4 x- ?1 {! Y& x% m6 ris- G! S2 r/ M' B( `: B3 E
part, GlobalDistObj, assignLObj:object;row,Lan:integer;) l/ y) `0 O' q8 A' x S& [
do
: s: [8 h0 @ }; @# [ Lan := rootfolder.Internal.Tools.AOLlanguage;
0 D+ I3 g* J& ` if current = @.Destination -- else return
+ E+ Y* P) E& s# f$ R S then& n. s( o/ } A8 H" N
@.Destination := void;
; M6 z. }% G1 G2 }* U- N# Q" r if @.occupied then1 y, a' B; v* P' r
part := @.cont;
9 ~' m: M- r" f. s: g5 \ @.transpOrder := void;
* ]! h- d- |& k7 }9 Y% z part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
" h$ z! v% `6 @7 P @,root.eventcontroller.simTime);
4 X B8 A9 h5 ^& t- E @.HasOrder := false;
5 M. h: b/ a# _/ U0 Q8 R4 k* n @.DrivingHome := true;
. S- v; I; x; k5 h9 Q! c* w2 P/ } rgManager.tryToStartTransOrder;
; B. f6 l" }* k0 ^1 A7 u* W if @.Destination = void
8 ^8 o0 @7 f: I1 |1 l then -- no transport order for vehicle @4 |1 l8 ]- |9 N5 u1 A
@.Destination :=3 P8 J6 Q7 r0 ?! v% m
rgManager.nearestFreeStation(@,track.~);
/ _. Y! p L/ M8 o newDirection(@); , A- q) ~& a6 O8 e. i& g: _- y
if @.Destination /= void then7 V B- g% a" D0 Y/ _2 w) h( f7 S
@.Destination.NumReservation :=& ]3 r; M4 f" ]( h+ P% i+ r$ g
@.Destination.NumReservation + 1;/ o9 S& J2 f: f1 D0 [# r
end;
4 c6 t$ V; W; [7 L2 _& @ @.CurrIcon := "drivingHome";
/ o" k+ h& L0 O* w" M4 | @.DrivingHome := true;
/ f- @ l5 m6 O+ ?; i end;
, ^& f' ?* e8 }. w3 m else -- the vehicle @ is empty, both vehicle and part are in the same dock station
* w7 w, G+ r/ r! c7 w) z part := @.transpOrder;
/ D* K( s) M. }( ]0 G part.move(@);-- load part
7 R5 v" Y# T$ Z6 y' I2 G, j# P @.CurrIcon := "load";
/ Z* \* E) _* x3 D2 G# s GlobalDistObj := part.globDestination;) b% @) m9 x( G7 l7 i( P' j2 k
assignLObj := rgmanager.rgAssignL;. B9 `* B0 I: z9 G
row := assignLObj.getRowNo(GlobalDistObj);# R$ [0 N/ j, {
if Row = -1 then -- since 703 m+ |2 A( N) |( U9 T
if lan=1 then
% \$ F& H, ]/ T1 l: N promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\"")," t5 h) d. i. ^( S7 t5 A/ J1 _) O( ~
to_str("in der Andockstation: \"",?.~.name,"\""));: H4 R$ @3 A* |5 C! S4 ~# ]
else( e$ ~# K$ V% o0 D
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
. x9 g$ G/ q1 S to_str("in docking station: \"",?.~.name,"\"")); - J; p1 D( s& g' t4 d6 W5 P
end;
4 [# L8 G2 [: N else0 f- F; @) i2 O9 x* K A! ?; T1 i
@.Destination := assignLObj[1,row]; E6 W h. H0 h
end; 5 K6 @7 E; i+ M+ h' T/ {+ E5 A
newDirection(@);
6 k/ e: f: M$ \$ g% w5 R @.HasOrder := true;
1 o0 m. T. \! h2 v0 y: F' K% z1 S% U end;, l( { [" ?6 \+ C7 z4 H
end;* J' G$ S1 u4 l% {
end; -- of the method
1 h+ S9 T- O! M( w( F |