/* called by: entrance ctrl of the object 'track'
7 v0 K. y& o+ W4 ~*/8 j Z* t0 n- [3 G4 Q) S) E
is
5 f' {# g: v2 o. W& ?# q part, GlobalDistObj, assignLObj:object;row,Lan:integer;
$ `" y3 J4 Y/ c# N7 ydo
7 D% b1 _ F' W9 w5 X3 L4 L3 b t Lan := rootfolder.Internal.Tools.AOLlanguage;4 B1 n. R& ]! ]! j. C
if current = @.Destination -- else return4 H" {# S% N4 x: L4 K$ G
then
. P3 @+ I% n/ ?! [ @.Destination := void; _$ T$ X) z7 ]4 |# n% l& c% o' J
if @.occupied then, Y" d( K7 p& z2 q" Y& [
part := @.cont;
9 _% |6 H* O9 N2 i; d @.transpOrder := void;0 J% H/ A4 T" K7 t0 W( w* m/ O/ Q
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,2 d# ?' U; O7 d' p, _" u& {
@,root.eventcontroller.simTime);
) Q k: v7 }' F& d8 k, \ @.HasOrder := false;( m! Y3 a) m( e9 ^/ n' `
@.DrivingHome := true;
" s5 K& _+ Y" G" F* E rgManager.tryToStartTransOrder;: ^$ f2 x$ V2 e% @0 v
if @.Destination = void
4 y& t6 w4 E0 @# r& |5 j2 \ then -- no transport order for vehicle @
) X7 k, R0 h3 _1 W1 ^ @.Destination :=
- g" g8 m) m: T9 C4 B+ h6 l: P rgManager.nearestFreeStation(@,track.~);
7 w# M# S3 q1 |8 r newDirection(@); % z) n) c1 g+ o5 F7 W& s
if @.Destination /= void then" g6 H) l n/ e1 c) T9 C( n/ E
@.Destination.NumReservation :=
8 q# p, ^1 ?1 K7 {. j/ J @.Destination.NumReservation + 1;
2 d4 _* ]( v( L& b9 R end;
3 d8 s3 E3 L z) V# _1 k/ |0 ?+ k @.CurrIcon := "drivingHome";
: k) U U* O+ q" D2 C3 r @.DrivingHome := true;
, q/ Q" Z2 H P end;% B* B( {' k+ B; L3 S) G) A( b
else -- the vehicle @ is empty, both vehicle and part are in the same dock station, n K! l( N5 S1 z
part := @.transpOrder;
8 b& O: V4 l" h2 E! C part.move(@);-- load part
2 I# ]; u) P/ R" P* O @.CurrIcon := "load";4 s1 f: ]3 }% z* {& F7 L
GlobalDistObj := part.globDestination;+ v+ |2 ^6 o# O
assignLObj := rgmanager.rgAssignL;! r# r1 |/ s8 k3 x
row := assignLObj.getRowNo(GlobalDistObj);/ K0 q/ I1 w* t0 n: s J
if Row = -1 then -- since 70) X" m- `/ U/ T" d. S: X
if lan=1 then
( L5 J$ h l1 @& I promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
5 |4 n) d! ^3 |- j5 K4 z, \ to_str("in der Andockstation: \"",?.~.name,"\""));
# f6 H, b4 x3 n; L: K9 v! F' V else
% f7 C1 g# L. ]& F; e- Y promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),4 g e( R. Q. b2 L6 g. M* B+ _- m. {
to_str("in docking station: \"",?.~.name,"\"")); 5 r7 F5 D' }$ ^3 A
end;# {3 Q: [" r$ t" x' l
else
. n5 B$ C, A0 O6 |8 F @.Destination := assignLObj[1,row];
0 d, j1 [$ J/ W- C9 ?% V$ `5 R end; + R0 K% g8 B2 D1 _. ?2 u
newDirection(@);
7 i/ W9 t. t8 r) | @.HasOrder := true;9 g! |2 r- K4 ]! q7 ~3 b9 E
end;
8 U) `" j9 m/ z* I end;/ I* f Y8 K1 q; ]! ~2 O/ ]
end; -- of the method7 F$ `# l7 ^4 C4 x9 U* d, M0 [
|