/* called by: entrance ctrl of the object 'track'6 F l/ c6 Y& _. s/ w5 q9 t) v
*/+ {8 C8 m' z0 A3 R6 C
is
, v% g8 w6 u% q9 t part, GlobalDistObj, assignLObj:object;row,Lan:integer;; P9 k' B3 R5 k9 v# q8 K
do! v- N/ b# l7 x$ b( z; i
Lan := rootfolder.Internal.Tools.AOLlanguage;+ z8 J5 o9 m0 l
if current = @.Destination -- else return
0 q% o0 F, ^! q& m; a then& Y4 C, x# i' W5 H& a
@.Destination := void;
# L8 W5 O1 i% ?7 W if @.occupied then% G! t# U; Z" A6 w: ]
part := @.cont;
5 l- M) o( m( W) A$ w/ b# ?6 x' K @.transpOrder := void;' l" f) D, Z! Z+ `" y p4 I8 [* J2 _! L0 D
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,, F/ w5 t& A9 Q4 A
@,root.eventcontroller.simTime);
P- O; d0 e1 Q @.HasOrder := false;
# Z0 F; s- Z; d3 J @.DrivingHome := true; P# p, C- c7 d$ V- }8 |1 s
rgManager.tryToStartTransOrder;( O# ~# Q% o! w" P: `% y+ `
if @.Destination = void
$ N/ v* N* K. O+ `* n then -- no transport order for vehicle @
# P% {0 h& B# i2 c/ ]; g5 I @.Destination :=5 h8 \* M) ]6 K5 q
rgManager.nearestFreeStation(@,track.~);
' x: P5 m# t5 Z3 |4 x- X" F newDirection(@);
" s2 h/ S& i; z+ ] if @.Destination /= void then
6 ?- v5 l( Z+ w# ] Y. L @.Destination.NumReservation :=
( {7 z+ @$ Z( u: G @.Destination.NumReservation + 1;
1 Q) p+ ~' r( \3 I1 u! c end;
: \& ~3 i% D: R; z. H. f. D! A @.CurrIcon := "drivingHome";- ]& N$ V* I& m2 B
@.DrivingHome := true;1 b. x/ W, I# O7 g
end;
8 Z! {0 H( l7 I else -- the vehicle @ is empty, both vehicle and part are in the same dock station
7 C) a& q6 O& x+ l: b part := @.transpOrder;
8 V& `8 Q/ @1 @4 x; Q part.move(@);-- load part
0 _+ y% r9 n+ q @.CurrIcon := "load";
& Q, W& p( s' g9 K& p( _1 z" \ GlobalDistObj := part.globDestination;) b8 @8 ]9 \& Q% F. I: S# E; {2 ^
assignLObj := rgmanager.rgAssignL;
/ J: r, Z5 Z0 O8 X8 E row := assignLObj.getRowNo(GlobalDistObj);4 m- v% L9 r/ t3 ^9 M; c7 t6 i$ ]
if Row = -1 then -- since 70! a7 ~/ y4 A- A3 \ u
if lan=1 then
& p( Z- e4 v3 D' B* G promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),' X& u0 ?' i' N# | P& p
to_str("in der Andockstation: \"",?.~.name,"\""));
: L" G$ k) B# f/ M6 \' K) U else" B/ q$ q5 y% p' I
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
2 N/ j0 f8 i& s' ^ to_str("in docking station: \"",?.~.name,"\""));
# N7 ]! d; z" A7 ]' b- | end;
+ f5 p; U% e- T else
1 Z8 K5 o) ~7 Q- ?( S @.Destination := assignLObj[1,row];
7 @0 C, X) b ~) ^) F" i end;
! l) `/ {( T0 p9 E2 T% H. F2 A newDirection(@);
5 r& {- t+ Y4 y0 X4 l( [ @.HasOrder := true;$ [5 S2 E7 y5 U
end;1 @; s/ v! p; m: b
end;
/ H6 c b0 b+ O r" send; -- of the method
2 \9 b1 }- Q: T% `- A |