/* called by: entrance ctrl of the object 'track'2 v) F0 x& V. ]) q
*/
( _. Q% O9 c: t x0 P* I3 uis' g$ V+ N4 _8 t3 o3 A$ `
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
- x+ ?7 B; l2 \" ?- v; o6 _do# b2 M$ s, }& u( p# X$ `) c) T' U
Lan := rootfolder.Internal.Tools.AOLlanguage;. Z' ]3 y/ X, Q+ t5 {$ O
if current = @.Destination -- else return, r, b( d9 u" s2 b# O/ R
then
2 ?. g! ~! h% T( t7 h. C @.Destination := void;
$ w0 m8 W- V0 n- X, `0 R9 P if @.occupied then( h# i% J/ L: d( A; S
part := @.cont;
5 v$ N4 W2 E% x [ @.transpOrder := void;! c2 z$ D" r4 I+ A& f3 o
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
8 x* T* k! Z- ?# L: E) l$ ?/ N @,root.eventcontroller.simTime);: Q3 ]& G9 w# Q/ j0 T% U
@.HasOrder := false;( I( A% w: K( w1 n
@.DrivingHome := true;* H7 T% q& w3 D: }
rgManager.tryToStartTransOrder;) G( x8 |6 m7 }* O. L, u
if @.Destination = void6 R0 w& f% K( Z/ Q# v* j" P
then -- no transport order for vehicle @
% n9 M' {3 ]/ C- m4 |* Y0 k @.Destination :=
1 {5 z: I4 I( L. J& e rgManager.nearestFreeStation(@,track.~);/ x6 H9 B: A8 Y% j. r1 a9 h ~
newDirection(@); 8 Q+ a; k0 b' p; @1 v
if @.Destination /= void then' f; q2 h8 ]4 w) g4 L4 x
@.Destination.NumReservation :=6 h9 f" z& g l5 I8 U
@.Destination.NumReservation + 1;
6 D) Y6 w9 ~0 f8 R1 @- l9 W end;* b% E, X2 d7 ]# p0 E1 Q8 e
@.CurrIcon := "drivingHome";5 y5 u; f4 O( M4 Z
@.DrivingHome := true;
4 p; X7 W" ^: f7 p% _: o end;
# j4 {+ Z$ f1 J& ` Q* E else -- the vehicle @ is empty, both vehicle and part are in the same dock station. u( [- {/ d6 f
part := @.transpOrder;
! Y4 ?+ M$ v5 c2 O6 _5 t1 k part.move(@);-- load part
+ _8 [) t* V+ |/ ~ @.CurrIcon := "load";! L# f; \, ]; U
GlobalDistObj := part.globDestination;1 \3 U: B; x/ q* V7 t/ y
assignLObj := rgmanager.rgAssignL;; j' Q! E5 c8 P7 F1 i, L
row := assignLObj.getRowNo(GlobalDistObj);
0 t9 D, r1 S& W1 O* ?% L if Row = -1 then -- since 70
: u2 A* _5 f4 P9 C if lan=1 then6 |% G% s- Z+ p8 d8 B. T
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),4 h' B: O4 W1 f% C
to_str("in der Andockstation: \"",?.~.name,"\""));
, i' u& H3 A7 [/ A7 O else
8 I8 b+ G, |* F/ |5 g( y. E$ a promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),$ Q7 J9 N; J5 h: s/ c
to_str("in docking station: \"",?.~.name,"\""));
: Q/ ^# K1 s# k: \ end;8 _- E$ ]) n% P, W
else, y* y3 s% _. r
@.Destination := assignLObj[1,row];
+ s2 t" ]' f& I- Q& h" F# z2 a end;
' B4 F2 f2 F* ^+ }. @5 W8 W3 ^5 l newDirection(@);
' Q2 H' }: L# U8 ?! A( {! k @.HasOrder := true;! B! K$ B& X3 C I5 p
end;
4 E# F/ w* L6 F ~, F end;
' l# E- q3 B$ e7 send; -- of the method- K& Y7 o$ ~& i/ f l2 X7 E" h0 n
|