/* called by: entrance ctrl of the object 'track'1 |0 m$ b' @2 v0 W4 L2 Q4 J
*/% K4 q7 @+ i% L0 f
is! P' I$ v7 l; |+ |0 H8 G( g
part, GlobalDistObj, assignLObj:object;row,Lan:integer;. d9 c5 i; Q, ~4 R% h
do
& L) f3 N4 w! B6 k Lan := rootfolder.Internal.Tools.AOLlanguage;
0 }' w( r" B3 P7 D7 T0 b: {: J8 z if current = @.Destination -- else return, o' V: C9 j, e, g
then
3 H" F) j+ z8 w( j @.Destination := void;- i T8 Y) j" X2 d
if @.occupied then
1 y$ P3 o: D- G5 d3 f4 k( q/ J4 m5 o part := @.cont;
1 Q: p+ O6 u0 `2 f9 l, O/ i O @.transpOrder := void;7 z) ]2 t0 C# S! G& k+ c
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
) g, r, K9 [) s+ j. ? @,root.eventcontroller.simTime);
; f& E; u% C" m. X @.HasOrder := false;
) {1 U2 [- U& F0 S% H! G: }+ n @.DrivingHome := true;( s# v/ ^0 b* d0 y/ q
rgManager.tryToStartTransOrder;
& l- y# _- B9 l8 Q6 _ if @.Destination = void
8 {0 o2 @$ {% W4 m2 a. Q {- p5 | then -- no transport order for vehicle @0 V7 U* n% `* S
@.Destination :=
& [- }9 v. |/ _5 Y' \% x! e. c rgManager.nearestFreeStation(@,track.~);
: K9 X7 R) j' }. ^7 C G newDirection(@); - _/ a, d" [; Q8 _
if @.Destination /= void then
" f' [9 C1 ?* k& R/ u. F# Y @.Destination.NumReservation :=5 R4 U5 \" \! {9 p/ U: c+ _; I
@.Destination.NumReservation + 1;, U; r- U& d. \! f4 X6 W
end;
( {& h/ A. ?- I; J; v, ]5 ]% Q/ X @.CurrIcon := "drivingHome";+ Y, Q( Q$ b, c1 T
@.DrivingHome := true;( N6 m- y. Q. I# s. P
end;
+ x2 Q) U* ^/ I+ Z. H. B+ Z7 C else -- the vehicle @ is empty, both vehicle and part are in the same dock station9 c5 ]1 w9 H p2 p6 }& X+ Q
part := @.transpOrder;; v8 N& t3 ^+ z* Y, i# h7 h
part.move(@);-- load part6 Z! q0 g, ?) i* R! R6 [9 F! ]
@.CurrIcon := "load";
) T' H1 o* h4 { GlobalDistObj := part.globDestination;; Z; O' k* N' L/ [
assignLObj := rgmanager.rgAssignL;
" A6 M0 m! T" p Y row := assignLObj.getRowNo(GlobalDistObj);
' k2 O- G1 {* O& ?6 ]$ ~ H if Row = -1 then -- since 70
c- B: U: q! U! i0 Z" ^/ d if lan=1 then( |. }/ ]$ e" X: S
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),) q. O$ U1 f! Z6 E& H2 J" ~5 @1 Q
to_str("in der Andockstation: \"",?.~.name,"\""));
. H" i/ }% S: A: i0 W5 L7 Z else
- W0 P# R+ Z% X$ h" V5 `3 G' m' ~/ N promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
# Y- z2 G7 y" J8 f to_str("in docking station: \"",?.~.name,"\"")); ( [- i6 o. e1 i8 {; L5 n( _. `; _
end;
* M) @; E% a; [ else, j% e- t0 R' h% I
@.Destination := assignLObj[1,row];; U$ N# a( ]& C# x
end; $ B K! W" E$ z* j% Q* A
newDirection(@);" I. k% C* `2 c
@.HasOrder := true;
& m4 b1 K+ \! w. ~ end;' b* l. |& a% D( Z3 w C
end;' y# h0 K1 m- [* O- r. L) A
end; -- of the method" F1 O% u6 G4 [1 p
|