/* called by: entrance ctrl of the object 'track'' Y( o# ~" ^9 l
*/3 B1 k$ R7 Q b7 R
is$ q; ^6 X; t% J. k S
part, GlobalDistObj, assignLObj:object;row,Lan:integer;3 Z5 f0 l" J5 p& B2 ^4 J$ r
do$ M' U* o% X3 G) n, M
Lan := rootfolder.Internal.Tools.AOLlanguage;8 t, D% {4 _6 n5 Q; s5 B8 o
if current = @.Destination -- else return2 m' D) i+ G+ W. b
then
8 C; H. y* P5 O0 R @.Destination := void;
O1 `5 e& y6 |1 H: I if @.occupied then
2 {! E9 _- Q& h part := @.cont;
" G0 t7 ~/ q% T) J2 f @.transpOrder := void;
' h/ h( X; k% Y( I: v part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
& D$ w a; L' z6 ~9 S @,root.eventcontroller.simTime);
+ B6 x! O4 {) S8 \( O @.HasOrder := false;
4 C( ] h' j; k* ` @.DrivingHome := true;& t& [! V# h4 p
rgManager.tryToStartTransOrder;$ H; [/ R8 d' R8 _( l7 I/ r( E
if @.Destination = void
5 H3 Z. }9 h/ N1 g/ N then -- no transport order for vehicle @( G8 Q9 P3 ~) ]" g/ ]
@.Destination :=
7 g+ v- w. Y( C4 d! V* d rgManager.nearestFreeStation(@,track.~);% Z% h9 R& X- K- O. L
newDirection(@); & q8 s) z: A* O. }5 A
if @.Destination /= void then. n0 `- p L5 L% T( M
@.Destination.NumReservation :=
" A3 d6 ?* ~! t6 p% f @.Destination.NumReservation + 1;5 W( h5 _) o: D
end;
7 x. `2 i& g7 Z5 f @.CurrIcon := "drivingHome";) f# ~$ k5 e/ u4 l; C
@.DrivingHome := true;
0 l7 q4 t: Y( j( ^! u% X end;$ l- _& `0 O- r( @3 [6 z
else -- the vehicle @ is empty, both vehicle and part are in the same dock station5 t$ \. X1 k" S2 z! ^4 n' \
part := @.transpOrder;+ @' p: K, s" S4 G0 \
part.move(@);-- load part
- B0 i' X, G/ t& R- |3 B @.CurrIcon := "load";
6 x ?2 f. [; v, \ GlobalDistObj := part.globDestination;5 d4 w4 Q! V5 _- i
assignLObj := rgmanager.rgAssignL;
; ?& N9 u& l+ C ~/ J. D row := assignLObj.getRowNo(GlobalDistObj);8 D/ T$ F3 B! o7 T# o
if Row = -1 then -- since 70
9 m/ i6 {8 {3 E# B- ~; ~7 K if lan=1 then
p. f5 p0 v9 ~ S. W% s: k promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
8 C4 n/ }$ V. U$ |8 d0 M to_str("in der Andockstation: \"",?.~.name,"\""));1 n& i+ {% n' ?+ m1 M( R
else
4 Y* u8 t+ i& z promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
- x# m3 S p+ j2 Z4 A to_str("in docking station: \"",?.~.name,"\""));
: M4 H& w2 E9 ]' {: m1 q- ~ end;9 B# v* X1 M5 Q% ~$ m* N$ H
else( T, X" ^& v5 I$ {! w8 S( v
@.Destination := assignLObj[1,row];
4 {6 h0 Q, v* \) Z end;
% O( ~( d, K, Q( Q0 V1 Z newDirection(@);) W# j8 p% j9 J/ Q+ W
@.HasOrder := true;4 H: b! P7 O' C5 z
end;
# \' d3 Q6 ~$ U' Y end;: w4 H |2 `" K0 P% j# k
end; -- of the method. b/ O& a0 a ~! L u
|