/* called by: entrance ctrl of the object 'track'5 o3 o% N% h+ c9 l" o0 V/ D; `
*/
6 i7 C7 b% ?$ z) I& \4 w' zis
5 X' [9 x+ `; R part, GlobalDistObj, assignLObj:object;row,Lan:integer;
( n8 ~ V5 K2 M `% edo
G, ?9 U* W* q+ w0 ^ Lan := rootfolder.Internal.Tools.AOLlanguage;4 s4 I1 \ s4 |" ~( L" X
if current = @.Destination -- else return- L1 f4 ]7 r* L/ C- [+ B
then/ P" q1 ?/ S9 G/ X
@.Destination := void;
# ?0 c' U: R$ C: k2 D& z& e R$ m8 r if @.occupied then
" [+ _9 T+ k" O W% E& }0 e7 M part := @.cont;
" D. t2 @/ ~8 h* P: U @.transpOrder := void;8 v1 A; R+ _$ l& s
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,1 ^* V% W/ l! E" s3 A( C
@,root.eventcontroller.simTime);
; F3 I! e) Y& i# S$ {& T/ H @.HasOrder := false;
4 D; S0 n& _7 V7 O- b3 n; u @.DrivingHome := true;
" A% d! O4 P w% j9 [; d rgManager.tryToStartTransOrder;
+ N4 Q2 E& e' S2 O& U8 w0 B if @.Destination = void) h& ~0 O( Y5 H& _8 B# w: f
then -- no transport order for vehicle @
L5 [8 N- n( Y$ o5 Q d" @6 c6 R @.Destination :=8 X/ H( _( c5 r* ^
rgManager.nearestFreeStation(@,track.~);
8 w; O: W5 V/ k2 y newDirection(@);
i3 S" X# S2 A" ?+ R+ r) Y) [ if @.Destination /= void then
! P+ `& q0 _( `2 w) X& K @.Destination.NumReservation :=
" Z' m, t% j# k9 p& m% }4 E; Q* C" Q! c @.Destination.NumReservation + 1;
$ f) c) g6 `3 A9 \ end;
' P4 i& s G$ F8 ]! Z' V5 O. S/ z @.CurrIcon := "drivingHome";
/ S' u- |$ ~7 m8 \2 A @.DrivingHome := true;
9 f1 W4 n% z# o a: ? end;
% @ Z: w3 _. Y$ }; Z else -- the vehicle @ is empty, both vehicle and part are in the same dock station" c- J" n m- c! d
part := @.transpOrder;) T2 M" V* @7 H# ^: k
part.move(@);-- load part( z4 u) |2 _! c& [. X
@.CurrIcon := "load";
" |9 Z6 c3 T# L/ o- t, k GlobalDistObj := part.globDestination;
H' d2 I7 \# d* _ assignLObj := rgmanager.rgAssignL;8 x- ^3 F. N1 P B
row := assignLObj.getRowNo(GlobalDistObj);! `# ^! ^" q/ n4 x+ K4 i9 w* E6 s; e
if Row = -1 then -- since 704 V% k% T9 n' z( k: n: `) n' j
if lan=1 then( ]* [, }( R5 k! M6 L9 O+ ?) h% z
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
* r2 c* \7 H. n2 Z- Q to_str("in der Andockstation: \"",?.~.name,"\""));
$ \! }$ @! @8 N9 Y1 W else
& U9 Y4 J: J- t8 R& F2 Z0 ^ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
, K3 s( Y% |( x9 j$ B. A7 l to_str("in docking station: \"",?.~.name,"\""));
& y [" m& ~! \# p$ J end;
* D I. j' G/ a6 S( y8 g else
9 q1 ]" p! B4 }; s @.Destination := assignLObj[1,row];; G4 I; e1 n& s8 f
end;
, g. q! _9 h3 `( W) k newDirection(@);
8 T0 J6 J, h( n) Y: T( ? @.HasOrder := true;
2 I1 m7 d% O1 l2 E( i% z end;" Y2 a9 e- n3 }5 u @8 c/ J% \# k* L
end;
8 H7 k( K. R9 b1 _! Q" }) C6 J; ^end; -- of the method- T2 b2 V/ b( S: ?! G9 E- G& I
|