/* called by: entrance ctrl of the object 'track', S o" C. x; @6 b: ?
*/: D) {0 a8 o& ~- g0 M8 I) W
is! K6 d8 Y0 F' [: m2 e& N4 j+ v+ F
part, GlobalDistObj, assignLObj:object;row,Lan:integer;" M! k( k1 Q9 L' d
do5 b8 N- i) a( b# Z
Lan := rootfolder.Internal.Tools.AOLlanguage;$ z6 G- y9 |$ \- N
if current = @.Destination -- else return
" n/ v+ R# @. } then
; M: {+ T! q# W @.Destination := void;
7 F, s0 B" L1 B: W if @.occupied then5 I' |9 n9 N5 d; G0 G5 ]
part := @.cont;( a9 Y# R6 F) }* G: |
@.transpOrder := void;
+ f/ V, v& L2 Q& g part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
8 D/ U i& p% c% r. S: J! S& T2 p @,root.eventcontroller.simTime);* |/ F$ G- o3 ~5 Q; ^% k+ _9 w& k1 ?
@.HasOrder := false;; G% }% D- S# u6 l3 L2 O" s
@.DrivingHome := true;) b# h+ n9 @& h M0 a2 o" N& W. l
rgManager.tryToStartTransOrder;8 z: q) r; @3 X6 z2 C+ [3 L
if @.Destination = void6 @; ^; B9 x; `. N
then -- no transport order for vehicle @
% c+ ^/ N% R) c7 Z( R @.Destination :=
# c) X" {& y; n, ?' p- q rgManager.nearestFreeStation(@,track.~);
! c8 |1 t, ]5 W! y newDirection(@); 7 j6 x% C, S6 m$ f' ]3 W" M9 n0 }
if @.Destination /= void then
6 X- a8 y) h0 N# x2 q& I7 `$ S @.Destination.NumReservation :=
2 M* z$ i, l+ U7 V5 Z+ ~ @.Destination.NumReservation + 1;/ W% q" [/ a% z& A" j' k5 X# K
end;' E' D2 f0 Y1 w/ p7 y! i( M
@.CurrIcon := "drivingHome";# ]9 d4 d+ R! x
@.DrivingHome := true;4 N: ?! T' @, l6 L3 B1 h3 }
end;
/ Z2 U5 S! g6 j. o* o) p. O, q else -- the vehicle @ is empty, both vehicle and part are in the same dock station
/ v$ ?( _9 N" H5 b6 I part := @.transpOrder;$ \$ }1 ^( H* H* o0 A1 Z j. m! X
part.move(@);-- load part
: |$ j' K% y# A @.CurrIcon := "load";
! w2 U( `/ A8 f& X GlobalDistObj := part.globDestination;
! o- y! [# q8 {4 p3 R1 P assignLObj := rgmanager.rgAssignL;2 x; Q8 @, U# M. O9 f
row := assignLObj.getRowNo(GlobalDistObj);
1 n8 A; f7 `: l if Row = -1 then -- since 701 j1 u2 Y f ~4 h* ]4 k
if lan=1 then
4 T" F7 [* z3 e3 q, o+ W9 \ promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
; n- p4 C$ _) |4 J. b0 D to_str("in der Andockstation: \"",?.~.name,"\""));1 T8 o+ m- _ z) r3 L: A% I
else
% M( L% d* Y! y promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),, S9 s1 q# T- m1 y! Y' ]6 R
to_str("in docking station: \"",?.~.name,"\""));
$ f! T) h4 S) Z) c end;
; J0 H4 n/ ?" l. E. H6 U, R9 D# j8 s else6 i" |9 d/ f( a, ]; L3 P- A
@.Destination := assignLObj[1,row];% Q i$ q( O' B; J4 `
end;
4 N. Q1 j! ~0 F0 _! C4 ?& V newDirection(@);9 C; l2 X# {, W d
@.HasOrder := true;# E+ c7 x6 b4 M1 C6 T6 X
end;6 q1 X4 a& W. r& C* }$ W
end;
: o; B( u/ _+ f. N5 D9 K0 I0 dend; -- of the method
& s* s" g C! D$ v* S |