/* called by: entrance ctrl of the object 'track'* N. W3 A& c% o/ P, q; I
*/
8 R1 T0 S$ v" P, G6 |is' x6 R7 h) C* o3 r: c$ G2 @
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
$ `- Y6 e. G3 s( X$ ^9 P! K- ydo" j6 g' d: v( B$ @3 E- e+ O+ U& C
Lan := rootfolder.Internal.Tools.AOLlanguage;
$ l) z9 O0 {0 q' L8 D" c if current = @.Destination -- else return. l& Z* n9 s* H% Z* ?* N
then0 z; G7 I. v& I; J g
@.Destination := void;4 j" e# ^- r& [5 o1 s
if @.occupied then
# ?4 c) K/ t/ W( u$ f6 p part := @.cont;
, o. p3 S7 Q3 ?: K; b4 X @.transpOrder := void;# Q$ H+ r4 j; u
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,. P; J0 v8 X' Q8 n' F$ f
@,root.eventcontroller.simTime);
0 j6 b$ f: p4 z x6 @ @.HasOrder := false;
+ R2 M' M& x# u1 R [ @.DrivingHome := true;
6 f4 E3 Y6 c3 S0 T& J rgManager.tryToStartTransOrder;
5 ^" R/ c5 w& L" q if @.Destination = void' G2 y& I% M, |0 H3 f _/ `2 x
then -- no transport order for vehicle @
) }0 a9 Z; ?' I; _" q @.Destination :=
9 W# O6 N+ o) ]4 p0 r rgManager.nearestFreeStation(@,track.~);- x9 R2 x& l4 V- Q8 ?
newDirection(@);
0 E( P( i4 N1 }6 f c if @.Destination /= void then' `4 U* r2 ]+ S6 N! N9 Y% J
@.Destination.NumReservation :=
# V& G E' u6 [/ v7 A5 W4 s @.Destination.NumReservation + 1;0 Y, |5 b! F" T- P; { Q
end;
; ~6 Y/ y6 K4 h8 Y7 _ @.CurrIcon := "drivingHome";
* W' r, I7 K# d& `( U. { @.DrivingHome := true;
1 j/ F4 j+ J! t; x3 j4 f end;
# q. z. ?* `6 ]" F' p4 K else -- the vehicle @ is empty, both vehicle and part are in the same dock station
5 r- M* q9 T( `( H0 v3 ?3 t part := @.transpOrder;
, z5 K* f8 Q; f% L part.move(@);-- load part
# z: B* I2 b8 G3 [6 s7 o* i% V @.CurrIcon := "load";
8 B# q) C# f& P p GlobalDistObj := part.globDestination;
4 `2 s1 u$ D$ O6 u+ t assignLObj := rgmanager.rgAssignL;
3 z6 b* K8 K8 @: d% ` row := assignLObj.getRowNo(GlobalDistObj);
3 O8 x/ ? E! O. i8 Z0 a7 B8 Q if Row = -1 then -- since 70
7 S) |0 V( d5 Q6 f% Z* y( ^$ C if lan=1 then4 o4 ^. m W) s) X
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
: {8 P6 u3 M+ h- D$ y, P to_str("in der Andockstation: \"",?.~.name,"\""));
8 c1 e8 j" m6 w1 F4 I; Z; S! p else
; I3 [7 }/ {% }3 p, u q promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),8 G' x [* ^% h: u& l0 I1 F( E
to_str("in docking station: \"",?.~.name,"\"")); . l3 T, K; V* w" ]6 u, m+ k
end;
t1 g$ M- Q, d6 D( D) j1 L2 U+ | else
# w+ Y# H# n$ q, |9 c g' k" ?( T/ E; o @.Destination := assignLObj[1,row];
; p# ?" Q/ V0 G% h+ X, t. i' t8 Z end;
# F! Y; }/ C9 U) ]& [' } newDirection(@);; t* M2 u0 |2 j
@.HasOrder := true;
' c4 F6 o9 @- ?* b0 y$ a9 N9 j end;
9 t% x; @8 d' I end;
. g0 _+ L% w7 ?5 E7 Zend; -- of the method
' ~. [! t q) ~2 m7 {* A4 G% @ |