/* called by: entrance ctrl of the object 'track': e* B! | e ]& i
*/
: d6 T1 w9 T4 L8 i& U6 @is6 `. x! u/ T) ^" {: U
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
" t! }6 k% }# Udo/ Z9 A4 I8 u8 \9 ^" p. w: d0 `+ I3 }
Lan := rootfolder.Internal.Tools.AOLlanguage;8 e" V b1 @3 e7 ~; Q% B
if current = @.Destination -- else return
( c2 h, ~6 \6 S& H then% `3 x9 R/ n. x. O
@.Destination := void;9 T7 R8 g# d$ i$ x
if @.occupied then
( m+ T: W" O0 S6 K$ y2 m. \8 R. M part := @.cont;& r0 v C; E/ e2 u9 J9 X
@.transpOrder := void;0 w& l. _ I, i8 ~# b4 d2 u
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
/ N) w- S: Q& p6 w: c. f8 P6 q1 M! e2 { @,root.eventcontroller.simTime);
3 s- {5 [( a. F0 C& ^' c. x$ S @.HasOrder := false;
2 w1 W4 b2 ~% C, x; `8 H @.DrivingHome := true;
/ }3 d0 u% _" f% \ rgManager.tryToStartTransOrder;2 K! i. v9 ?4 m' u& z, t
if @.Destination = void3 x# j1 ~& w$ d2 p1 s. {* q
then -- no transport order for vehicle @
6 d7 k, J, b% A @.Destination :=( N8 r/ K2 Z& V0 Z: _2 v3 E
rgManager.nearestFreeStation(@,track.~);( s9 `. X+ I& g" R- H7 Q" j+ O
newDirection(@);
3 Y0 m: c+ I l/ X% e. ]: a if @.Destination /= void then K3 ^3 K; i! x i7 H1 X) o6 h
@.Destination.NumReservation :=
8 K, g4 }- `. u/ r; b: b2 p, p @.Destination.NumReservation + 1;
% v; N) o2 i$ h( b4 }9 I end;
% r' P) a; j' c4 \7 }8 ^+ x0 j @.CurrIcon := "drivingHome";
+ P y8 W& e# f3 v4 ^ @.DrivingHome := true;! U' o* R/ X3 b1 P
end;
- S6 C+ {& P* Q. T$ ?& i else -- the vehicle @ is empty, both vehicle and part are in the same dock station8 `2 M; z) m. E, j8 g3 c
part := @.transpOrder;
' W- w0 [* W; m( S part.move(@);-- load part9 f6 K0 P: g% _
@.CurrIcon := "load";0 Z/ x! _1 W* b
GlobalDistObj := part.globDestination;
E; g8 D7 X- O assignLObj := rgmanager.rgAssignL;) v- c. g$ e' k4 @8 W8 U. N4 ]
row := assignLObj.getRowNo(GlobalDistObj);
7 |0 P1 o5 v/ J8 i, ^1 t ^4 F if Row = -1 then -- since 70
; U5 _7 }# B- e& Q; N if lan=1 then/ D& t+ R8 r% a% H8 w' [
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
0 \3 O3 j+ B! h: k to_str("in der Andockstation: \"",?.~.name,"\""));- i% K8 D/ b' [) k( v- m
else# u) l% C* y5 |
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
+ S& A- _/ A! H6 G to_str("in docking station: \"",?.~.name,"\""));
0 S% b8 m% {8 T9 t& T end;
7 W/ }; _% ^% R% j3 @; ^ x else, `( `. V$ N: h K8 [3 ~
@.Destination := assignLObj[1,row];
B$ t M, Y$ i end; : @' e( E" g! t0 d" |, X
newDirection(@);
% N) P8 e, W: X* x @.HasOrder := true;0 m0 j% R3 m0 b
end;
; M }+ u8 D4 g3 o end;& r& n7 S" e: h" l* X) l7 @, T
end; -- of the method+ @% _7 h0 L& W1 ~: ?* S+ [ ?% h
|