/* called by: entrance ctrl of the object 'track'4 N. \4 J5 B* n& R0 I3 z
*/- }( W: w% Y/ m! q
is3 M3 t1 \( c( O, `* \( d+ Q
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
: @3 c. V( p- Q, h" M, G# y# ]& {do
& o9 Q: q# M \0 `- Q Lan := rootfolder.Internal.Tools.AOLlanguage;
. @6 x( W1 B5 q! G3 Y" f9 d" T ]; a if current = @.Destination -- else return! I. B6 y8 Y, u" l/ f0 p$ y9 {
then6 {; T$ r5 R& Y6 u+ n% G$ R
@.Destination := void;
" ?% G, W" C4 z; |! b! h' G if @.occupied then
% w; x* {2 M* u part := @.cont;* p+ n. u- \2 {/ }* G' L, c. b
@.transpOrder := void;, H0 R3 P4 @ U4 n" \; p; X1 v
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,) o: K* Y0 \; W5 ]8 B9 U# h6 |6 e0 A
@,root.eventcontroller.simTime);
' u! M- H8 T; w2 i @.HasOrder := false;
* q: G$ L4 W( _3 H @.DrivingHome := true;
6 E$ \6 {* B% N rgManager.tryToStartTransOrder;8 r+ F8 s4 w0 q* c7 \
if @.Destination = void- n) {; l0 X" e) u |# \% J
then -- no transport order for vehicle @
# X9 y4 F+ y4 y5 { @.Destination :=
$ B' r2 G) M/ H7 p0 S0 Q! J, d- g rgManager.nearestFreeStation(@,track.~);2 T5 I% [; W$ C7 d8 M+ J0 Q
newDirection(@); 6 c6 P# Y$ I, Z. d# R1 g
if @.Destination /= void then8 U5 J) d/ q) I6 c, _
@.Destination.NumReservation :=8 X& h" b* h5 w# l! c
@.Destination.NumReservation + 1;8 Y1 e. P1 Z. d: |
end;
: f' y' I, F2 y9 f: a6 r: l @.CurrIcon := "drivingHome";
! x3 ^8 q9 a5 G. `; a0 ? @.DrivingHome := true;
( g9 }' H8 |& ?. u end;7 b H% j+ C% M6 K. i' N: k( K
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
+ \' t# T" P5 ]+ w9 c! o4 L f part := @.transpOrder;7 j4 J3 N& t$ g/ V+ G: d
part.move(@);-- load part
. V$ b" O; {9 E; Q @.CurrIcon := "load";8 i$ K2 N! i y
GlobalDistObj := part.globDestination;
4 R7 s9 d# B: H9 |/ C% l assignLObj := rgmanager.rgAssignL;
$ V& f0 j2 _# Y* h row := assignLObj.getRowNo(GlobalDistObj);, ?! X9 Q6 K4 Q& m3 H3 |
if Row = -1 then -- since 70+ l8 u) A7 N& o
if lan=1 then3 ]9 V/ T5 K# h2 d: C0 _- D, ?
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
; |! e* r1 y1 e3 u2 S% } to_str("in der Andockstation: \"",?.~.name,"\""));
' r' t4 h$ x% ^ else
4 P5 k7 S2 A1 ]: S3 B promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),0 y/ R: ?6 f" t q
to_str("in docking station: \"",?.~.name,"\"")); % m$ X% c7 }' @/ R1 [. x
end;
6 _* l" H2 [$ B$ i; { else
: l# T4 K+ `6 S7 [+ e2 l9 \& P @.Destination := assignLObj[1,row];* P2 D) L0 ?4 K3 j3 m h
end; * N5 E; v6 P3 L* Z
newDirection(@);
, L+ Q/ I; `, s @.HasOrder := true;5 Y: @8 V3 j2 z% D9 v( e$ T1 ~
end;
' K) U9 i P9 _" Q end;
* w# Z) _+ e3 B# n( q3 fend; -- of the method" X$ a3 j8 d7 Y
|