/* called by: entrance ctrl of the object 'track'8 Y- `4 W. p( [7 [, T, G
*/1 d; \- N9 }8 [/ i! f. M9 P
is
0 L! r i) Z9 G part, GlobalDistObj, assignLObj:object;row,Lan:integer;: _0 u& E. b, w0 v: _2 D$ @
do9 m1 x5 J. C8 A* L6 h5 a- f
Lan := rootfolder.Internal.Tools.AOLlanguage;: \, `4 V: }; H' D
if current = @.Destination -- else return% d( @ u7 h7 o% y- M$ i: M
then
5 o5 T! o( n# G. F, t2 T @.Destination := void;
9 j/ b+ y) t7 \2 b" S9 ?& L$ K if @.occupied then! o7 E2 H4 B# ^% W* o
part := @.cont;
) ]+ n- n8 Q& [$ i! m @.transpOrder := void;' T* d( a* [' A) u( j0 U8 B& ^
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
% a- h; b+ v, P% b. Z H @,root.eventcontroller.simTime);1 ~6 M0 J' q+ x
@.HasOrder := false;
2 R) `6 j2 N3 l+ N. G& D$ B @.DrivingHome := true;; o$ @; R+ k4 a7 F& t, f
rgManager.tryToStartTransOrder;9 J1 b: c0 g4 n) W) p$ r' D8 h# }
if @.Destination = void
8 n3 m6 K( \2 V. i7 Q. H4 a then -- no transport order for vehicle @. Z3 v9 U, D1 J9 @/ \; c- @1 q- D$ f9 |
@.Destination :=
6 n4 g) I0 ], ]5 O7 p# W5 y rgManager.nearestFreeStation(@,track.~);) Q" A5 P! t5 `$ @( p: D
newDirection(@); - Z/ l$ m/ z$ y/ c
if @.Destination /= void then8 i0 [ v8 { ^! _/ D% ^
@.Destination.NumReservation :=
5 \( B9 { |; I; N; R7 K @.Destination.NumReservation + 1;
& S2 b# Z/ M: o6 l0 R& f7 } end;. ^& [1 A& ~3 g
@.CurrIcon := "drivingHome";3 R6 X& U5 ]# q \5 f
@.DrivingHome := true;
* d1 d5 O' B4 u4 t end;! r* N4 R$ O* c
else -- the vehicle @ is empty, both vehicle and part are in the same dock station4 R" |, [. ^5 i9 p
part := @.transpOrder;
: A. B0 N( A, L part.move(@);-- load part, `0 S5 H, X; Q3 F8 L \6 `
@.CurrIcon := "load";. t2 Y4 ?, W; P5 q
GlobalDistObj := part.globDestination;+ j6 U( B5 J: N: F9 d
assignLObj := rgmanager.rgAssignL;4 n; n7 E" }! N: w7 M6 `( M/ Q
row := assignLObj.getRowNo(GlobalDistObj);
9 @$ P7 l" m9 p3 @' j if Row = -1 then -- since 70
- ^/ _! c- |8 Z+ |. e if lan=1 then" F, `8 r: }; w( l3 a" I
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
& G$ {5 D5 Q$ x( b to_str("in der Andockstation: \"",?.~.name,"\""));
9 r6 ~/ @* h5 Q7 f2 p else
! p3 V$ q- Q. Q3 } promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
8 [+ Q0 }' W5 f to_str("in docking station: \"",?.~.name,"\""));
/ O9 h" z" e( T* b# P/ ^ end;( N" s0 Q3 W r$ v! R R
else! u1 J$ ^9 [8 H" j" d
@.Destination := assignLObj[1,row];+ i2 m2 d. Z8 n
end;
7 D# @+ U8 h2 [+ I$ W# _, k newDirection(@);4 [& i8 D2 t0 U- q5 t) e/ O$ @% i+ ~
@.HasOrder := true;9 y) c5 v( o* K) I3 ?8 [ {: }
end;5 T+ E; p+ G$ i) U
end;
7 s# d3 S+ Z5 e+ a6 ]# E! Q5 }4 G) iend; -- of the method) q; a+ B" X, X0 D2 N
|