/* called by: entrance ctrl of the object 'track'
1 l [4 m+ M) [( K- U$ u" i*/; v+ F1 e2 E% M
is
+ a1 Q8 p. F( G4 g9 `7 I part, GlobalDistObj, assignLObj:object;row,Lan:integer;3 U) L0 r. }2 P, r
do
* e1 |2 [7 v N& Y6 D( P Lan := rootfolder.Internal.Tools.AOLlanguage;0 b3 c& d/ ^% b& c* ^
if current = @.Destination -- else return& K* c4 J7 ?) D, T
then: P4 I5 m S4 p5 L; M9 I
@.Destination := void;3 i" _; M6 i4 z+ j2 X
if @.occupied then+ z: }( a( r( q0 P4 C9 M% V! i
part := @.cont;
8 B4 Z1 J- X/ z; G @.transpOrder := void;
& i% Z/ B0 }' G7 ^$ I part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,3 Z3 A1 p; {, @* o) B8 u
@,root.eventcontroller.simTime);
! C& l z& C& o9 Y& i @.HasOrder := false;
3 H1 r; u+ x/ L8 x2 l @.DrivingHome := true;7 c! R8 B7 J' P( o; N$ t( [, c
rgManager.tryToStartTransOrder;8 \7 {5 R+ O3 Y% M7 C
if @.Destination = void
/ N+ U# c3 ^6 C9 H then -- no transport order for vehicle @) Y3 h4 R3 M, N% X2 R
@.Destination :=
& w+ v: U t, [ rgManager.nearestFreeStation(@,track.~);
3 ?+ p+ Y: H3 V$ V newDirection(@);
3 S7 I" E" o! [5 C5 ?; d; M if @.Destination /= void then
: f/ R$ ?/ w; b. S" j8 n @.Destination.NumReservation :=
2 ^) |* B* \# g" a @.Destination.NumReservation + 1;
3 |2 ^+ C9 s8 B8 l6 w" g6 ? end;
7 d( y8 B Y% F @.CurrIcon := "drivingHome";
8 s# [8 s; Y% t0 X @.DrivingHome := true;* Q6 l* k: [# ~( i( g- h7 E
end;
^% }( d( p4 W8 f else -- the vehicle @ is empty, both vehicle and part are in the same dock station
) q! t+ N3 n0 R part := @.transpOrder;: T+ H) U- a+ c2 w
part.move(@);-- load part
) C3 F6 H( }. Y @.CurrIcon := "load";
5 R' U& P$ _0 N GlobalDistObj := part.globDestination;
; j" \, z* ], x; E; t A assignLObj := rgmanager.rgAssignL;
" y9 J( I9 ?& l- g; X9 l0 n row := assignLObj.getRowNo(GlobalDistObj);
9 [6 f$ H: W& F% v* N/ i if Row = -1 then -- since 70
7 k d" Z/ O4 I9 S. R. |1 n if lan=1 then" k6 V& n5 ]0 Y9 o/ |/ t
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
. P* S! O% s8 U* Y3 Q7 V! Q to_str("in der Andockstation: \"",?.~.name,"\""));
7 n8 e9 @1 t+ B" p4 A# N' \. U% g else8 U! H3 Y; c0 n) v8 L7 U3 e4 ^
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
: q! h( m4 P0 `/ E* u4 ~* y4 \ to_str("in docking station: \"",?.~.name,"\"")); : ]6 v" e# u9 {5 R. f" Q
end;7 H/ D8 z& {. b6 O7 v
else# [0 R+ a8 k& `8 A6 n$ v
@.Destination := assignLObj[1,row];2 V/ O, N, d$ t' E
end; $ A5 X: y$ r" g) ~) y3 U, @ ?+ `
newDirection(@);
6 m; c+ v8 A+ c @.HasOrder := true;3 \ w9 E) p$ b, R7 e
end;: A: W' M Y& E7 I8 p1 n
end;# r5 i+ U) E- t0 @1 H5 n
end; -- of the method7 p! H# f; o$ [/ R o' }; o
|