/* called by: entrance ctrl of the object 'track', t# H8 E' e* L2 w5 m/ B
*/
/ C/ A$ r8 F3 H: k% Z7 iis
" S6 a/ I' X3 g4 p part, GlobalDistObj, assignLObj:object;row,Lan:integer;) j8 @! r1 b* P. j3 r3 t7 ]4 `
do0 Y. e& K( \' |1 ]2 N- K) b) |
Lan := rootfolder.Internal.Tools.AOLlanguage;
6 x+ m M+ @8 c& z; [ if current = @.Destination -- else return/ R/ S9 N4 s- R: z3 @
then
+ g7 n% \( C9 M+ E1 k! G, d" A @.Destination := void;
% u" S }1 M& H/ C h+ v0 _ if @.occupied then
+ H/ |) o" e1 | part := @.cont;
- G& Q- L: _/ e/ } @.transpOrder := void;
* V3 ~7 G1 r+ m part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
+ q; f. J% R8 D" Y @,root.eventcontroller.simTime);
( `) W! R" R( Q @.HasOrder := false;" f& x9 u% z1 I4 \9 p9 W
@.DrivingHome := true;( I3 t2 a! ~" Q9 x
rgManager.tryToStartTransOrder;
9 _1 ?2 S( [. q& W2 P7 _ if @.Destination = void x W& o5 I3 K
then -- no transport order for vehicle @
' q6 p8 d7 J; O. a, l @.Destination :=/ E! ~* k( K3 M# ^/ m7 @
rgManager.nearestFreeStation(@,track.~);7 ^2 X9 `# R: C0 ^' u
newDirection(@); % i: V+ m: C% O2 T: `0 g
if @.Destination /= void then' n( g) P) a3 O% A6 `5 f! q. n
@.Destination.NumReservation :=# i9 {3 P- L: X: l
@.Destination.NumReservation + 1;3 x' X' M& c9 ~2 j% e! U
end;
5 b; p; C: W; I) q @.CurrIcon := "drivingHome";- N) Q4 x: U9 g$ ?
@.DrivingHome := true;
, p5 n. Q8 _$ T: w# [6 @5 L end;& C: Q* A* W7 J$ M
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
" t, S* Y Q( K8 b$ x( } part := @.transpOrder;
: ~1 q8 A S y& O part.move(@);-- load part
* U$ A6 l# K. T @.CurrIcon := "load";
1 a6 N( P+ A! r- R" d GlobalDistObj := part.globDestination;* X$ }9 m& I+ Z7 J+ [, b/ ^! r. W4 }0 [
assignLObj := rgmanager.rgAssignL;
# a. P. ~0 A# B' h7 u row := assignLObj.getRowNo(GlobalDistObj);! }5 _5 `% M5 H" h
if Row = -1 then -- since 701 s3 b! G( {) |/ y
if lan=1 then# \( Q. f' O! }, [7 {4 _
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),9 f9 ^4 u+ `5 m8 ~* E9 h
to_str("in der Andockstation: \"",?.~.name,"\""));
( D! J; L% f7 E4 { else( P: B- R. s5 ?( v; {% V
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
! ?; h. R) F$ G# y. n Y( `# r) Q, o to_str("in docking station: \"",?.~.name,"\""));
% N5 B' P) P% e2 {# j" @ end;
+ K _" x; _4 n4 _# t8 |; Q else
' G4 b ?/ H+ k9 j1 d1 S @.Destination := assignLObj[1,row];
- O1 y# r9 A8 l4 [/ H M end; & N( r9 |! G3 Z/ ~, r' L
newDirection(@);' W( d5 p7 t: Y
@.HasOrder := true;3 i' F, s8 Q( E
end;8 d! V3 T) v- f4 O( N
end;
* s6 n& E" i* [5 e: I# t! xend; -- of the method
& W4 w) Y4 d& {" L" W- X |