/* called by: entrance ctrl of the object 'track' F% M; }9 h. \1 c1 J) P( C
*/
4 `' o7 }9 ?- ?( e, Iis$ K4 R8 p: x7 w+ f6 x
part, GlobalDistObj, assignLObj:object;row,Lan:integer;, {9 h, m: M4 z; g- k+ a5 L& m
do% p# l1 x6 L8 u7 O w8 l
Lan := rootfolder.Internal.Tools.AOLlanguage;- K- G1 `* b* m/ L9 s! }3 E" S
if current = @.Destination -- else return! q5 [# `! \- V# t4 q; L
then
8 p7 a8 K3 I+ W5 w$ ]5 X @.Destination := void;$ ^/ a8 w2 X3 M( i6 _" z
if @.occupied then
' h7 y- c6 N# y9 R! ~ part := @.cont;6 ^3 l9 ` }4 L! A, b& F2 P
@.transpOrder := void;
: [8 a( {7 l% w- `. h, S5 d% i part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,; v' u/ a9 [: C3 M- A. `9 B
@,root.eventcontroller.simTime);0 G; A3 v% A* a
@.HasOrder := false;
& I2 U/ [- k" L) u# a3 V @.DrivingHome := true;/ G; |( ~& i* ~# Q4 i* e+ M0 B
rgManager.tryToStartTransOrder;
\: q( n3 F* H5 Y" g5 Z if @.Destination = void
7 p) {. A: [. k2 T then -- no transport order for vehicle @; q, p! m6 N' ^" u
@.Destination :=& g: s$ O7 I$ E- @1 W4 V
rgManager.nearestFreeStation(@,track.~);- F- ^- \& @1 d6 r4 f
newDirection(@);
$ z% {0 D+ U( J! P# ~8 K if @.Destination /= void then
# P! p# r0 S C. `1 i6 Z" E @.Destination.NumReservation :=
" I& I w* X+ y @.Destination.NumReservation + 1;& w& g4 D5 G( M. `2 ^7 f# s: h
end;
$ J Y7 x2 ?2 z2 g. b6 B8 d @.CurrIcon := "drivingHome";
* U% U; Z5 D2 A5 ^5 q- ~) j) o @.DrivingHome := true;
% J3 E) r e Y7 B7 } end;: p+ P/ M1 e+ m, I' K9 s3 V# t
else -- the vehicle @ is empty, both vehicle and part are in the same dock station0 g/ S2 b8 d o% p( ?
part := @.transpOrder;
# G9 D# b0 L8 i part.move(@);-- load part
) R+ l6 h( w! z) u @.CurrIcon := "load";
- U: u* t. N+ K) r GlobalDistObj := part.globDestination;
6 ~ i& [2 ]' Y1 p0 l assignLObj := rgmanager.rgAssignL;
& a& D5 A7 z @2 u2 n p row := assignLObj.getRowNo(GlobalDistObj);
& q7 ~' K4 L) l$ q- t2 W, H if Row = -1 then -- since 70, H# f- h) ?6 [* n/ K& X
if lan=1 then
8 z, n, O' \+ a6 e" P promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\"")," I: N7 o* Y" h4 e
to_str("in der Andockstation: \"",?.~.name,"\""));
, f$ z3 Z; O, d8 B9 Q- O$ O7 [ else
; }1 ^5 E8 d" n; }; D( W5 Y5 D promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),! z9 h; [0 V: M- ?
to_str("in docking station: \"",?.~.name,"\"")); ) z/ p1 c; A' h4 n7 n `* Y/ ?
end;
; o3 K w' `3 x+ I/ G: C; | else
: {" Y/ y# ]0 _/ A c* U# |4 ~8 g( { @.Destination := assignLObj[1,row];
1 v' T1 f' @) [0 j% D+ j1 b end;
3 r" A! T1 w. t8 Z+ Q) u2 f3 O newDirection(@); M6 y5 E4 Q/ J, A% N: `, k
@.HasOrder := true;
2 n/ V: l; g3 Q& g. e end;% Q; R% F7 e6 M! b
end;
% J" J# E3 `% E4 ]end; -- of the method1 s1 R& C/ ?$ m9 w/ t
|