/* called by: entrance ctrl of the object 'track'
: }. N; V& z) y: h g7 X*/
' v I# a4 U& C: m% his) j+ j R. y" o1 Q8 @4 C, [
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
9 ?; y+ f+ w# o: C/ q7 wdo
0 X. p. T. C3 v9 I Lan := rootfolder.Internal.Tools.AOLlanguage;5 T, [/ _+ `4 U) h
if current = @.Destination -- else return1 V6 o% K$ ], z0 b
then
! y2 O$ c& ^' ]- \( B2 e @.Destination := void;5 @# r0 ~; j5 o, A+ S% J
if @.occupied then
}7 F. {+ V. q6 x* A1 {* @8 w- _ part := @.cont;
8 f: P$ C9 y3 j/ z @.transpOrder := void;4 y6 |; d- {+ X* R/ O: b. N
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,; U p# {! {* Y* l% |' {( V S
@,root.eventcontroller.simTime);7 A% K: f- y& d% i' H
@.HasOrder := false; [. f# r7 z* v. U
@.DrivingHome := true;
6 Z1 I. y7 N7 s7 `' h+ i0 T rgManager.tryToStartTransOrder;
5 H0 k+ Q2 \3 v- ~* Y" n! K$ i1 p% ? if @.Destination = void
# \, @: [( W" z7 P& l5 u* H then -- no transport order for vehicle @
, R$ R' u/ o+ g% |4 V @.Destination :=
& u* o# l( [5 f1 P* q rgManager.nearestFreeStation(@,track.~);
8 u8 [, n. w8 S& I( X% G newDirection(@);
$ K s5 L. t/ s9 }7 |: U. T if @.Destination /= void then* Y+ K+ K5 f" G
@.Destination.NumReservation :=' W8 J4 @0 \8 w+ @8 g' s
@.Destination.NumReservation + 1;
) j* O, r, p; k7 S4 h9 `7 O end;
" l6 d ~" ]4 E& u t6 V1 s @.CurrIcon := "drivingHome";0 o1 c; R* Q8 O5 C0 f
@.DrivingHome := true;% ]2 y' J0 C8 e4 M6 @3 {
end;: i0 a. a# h) W
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
% p' ~0 }4 `4 q; V9 k- C$ q part := @.transpOrder;
8 q" ?( B7 S. T' u/ _, w Q part.move(@);-- load part7 K3 ~0 ]3 r9 U P
@.CurrIcon := "load";
% \" |- V" u5 ^3 p GlobalDistObj := part.globDestination;' P% W; Z- L: N
assignLObj := rgmanager.rgAssignL;& `. z& X# p+ P o3 ?* h9 s' v2 c, T
row := assignLObj.getRowNo(GlobalDistObj);0 k8 I+ \. B' G# O8 ]) `
if Row = -1 then -- since 70/ w" s1 X, j; W$ I: \
if lan=1 then
y( e6 p$ w, S6 \ promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
. q5 z9 N! j5 }' { to_str("in der Andockstation: \"",?.~.name,"\""));1 R6 K( E7 l1 ~( x( ]& o t; h! `
else
5 }$ V- H9 j h" l promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),1 c* t4 C' Z) r6 h- e$ j+ A
to_str("in docking station: \"",?.~.name,"\"")); 6 J$ H% F) \5 T3 [# _
end;
& y/ i; Q" `4 A [5 P else( q5 y+ R3 O0 |
@.Destination := assignLObj[1,row];5 g6 X# h2 o# b0 p
end;
. s( [, e! U9 z newDirection(@);
8 Q3 [+ V1 B/ D: l( v& H3 d" ] @.HasOrder := true;: n- h* m* g& X* S" e; ?
end;
$ U& f, f) V0 e- E B( N) K end;
c& T% i0 q3 G4 p. x$ H& Zend; -- of the method; z% i9 [+ Y9 J) r
|