/* called by: entrance ctrl of the object 'track'
5 G: E/ ]: f& p2 w*/
, c5 Z4 I, L( l& w0 fis
, {* `. Y: W% } part, GlobalDistObj, assignLObj:object;row,Lan:integer;0 g7 X/ i7 {' W' X# Q5 d
do. {4 R0 N: i" s+ K$ @, e
Lan := rootfolder.Internal.Tools.AOLlanguage;* ~. ~ q$ z5 \5 \% W
if current = @.Destination -- else return3 x7 g, z( R ]. x; ]5 V
then
2 R$ i, [; H" k. ^ @.Destination := void;# H4 b0 a, l# C
if @.occupied then; r$ K5 Y1 ~# u% N' V( \+ N
part := @.cont;
- o* ^* s- L. M, e. h' s& a6 ~ @.transpOrder := void;* V3 P" V } Q) W* x
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,2 V) h! G$ @9 L9 V: {5 V+ H# z! N
@,root.eventcontroller.simTime);
# v( { `0 R+ r2 D( I( ? @.HasOrder := false;
4 q7 l3 u! e3 k @.DrivingHome := true;
$ X% d- T* X% @( t rgManager.tryToStartTransOrder;
3 b9 ^! v6 Q2 `1 [3 C2 v( Z4 @ if @.Destination = void
, D3 p; {8 h' H. r then -- no transport order for vehicle @( E/ `1 q, x" `, ^
@.Destination :=( ~3 k6 ~4 x$ h) m. }
rgManager.nearestFreeStation(@,track.~);
1 S4 j( [7 n- Y! e newDirection(@); k2 q7 q- b E- X, C2 S2 t
if @.Destination /= void then+ z) u7 r5 \5 \4 E
@.Destination.NumReservation :=
, l" v, ?! r( R- B( ^$ k: j q @.Destination.NumReservation + 1;
% W h+ v7 \8 I- B/ O+ \) o end;! }1 r+ ]; t& ^
@.CurrIcon := "drivingHome";
$ W: T: h# x v1 L# ~7 I [7 P) m9 j @.DrivingHome := true;
) P( U: {5 Y: G! u6 G( ^ end;
/ \0 }/ Y: }' w. }+ ^ else -- the vehicle @ is empty, both vehicle and part are in the same dock station
4 R h9 W, `7 c0 B part := @.transpOrder;& I- ^8 x! J( i$ l
part.move(@);-- load part
+ V& N7 H# M% L @.CurrIcon := "load";9 Q! K# i! w d0 P5 h
GlobalDistObj := part.globDestination;
a9 Y$ {9 {% f assignLObj := rgmanager.rgAssignL;
' [8 Y' Y" }3 ^- {1 n8 W row := assignLObj.getRowNo(GlobalDistObj);5 G. @' `5 K9 q, |
if Row = -1 then -- since 703 @, _; p% J% s8 ]& x
if lan=1 then6 u x- v* m- i* y) m7 j4 c2 l
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
0 H2 @- c `2 K0 s) R7 D( n to_str("in der Andockstation: \"",?.~.name,"\""));" ]8 N" q$ Z+ G6 J' Z. x$ }9 { p
else9 @( ]0 n c; z, s2 v
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),$ |1 v7 s) y% {) W* U
to_str("in docking station: \"",?.~.name,"\"")); 6 N7 O C" G& G
end;
# K- \/ X) x1 V; x else0 H+ C/ s) A7 P/ D: S' M
@.Destination := assignLObj[1,row];
6 z _+ Q7 ]$ U7 ^ `) f# a end;
% A' t) B# |; ^ newDirection(@);
. s+ D! \, g# ~ @.HasOrder := true;5 z0 L* X0 ~+ m
end;: f4 n% M# A# v. L8 w
end;7 }6 D# a% ^9 x$ \2 ~: [
end; -- of the method0 z( M/ _" y: O, t$ G; H2 S0 R" a
|