/* called by: entrance ctrl of the object 'track'7 Z0 \, l# Z: [* h/ H- K- T
*/
) H4 D+ J: Y! s2 His0 _1 D' ~, z9 I& K: [' J4 c/ |
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
0 m. X3 y) s' o, R8 U0 Kdo
5 `5 M3 [9 R; ~& U Lan := rootfolder.Internal.Tools.AOLlanguage;, p$ b: r( z' G! U1 k
if current = @.Destination -- else return
5 S: j! ^8 R4 C then
8 u2 ^. h1 h: W4 k4 P3 ~ @.Destination := void;% F7 Y/ ^ I6 U
if @.occupied then. S3 \4 I4 b# G+ ~ D8 h. ^$ @
part := @.cont;1 L4 s0 @0 ]5 _
@.transpOrder := void;
( q! B; `+ F: Y4 a- x T2 h1 ? part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,8 j. B: |8 X" m5 p9 W J
@,root.eventcontroller.simTime);; i9 z$ X$ k- A# G- A d' L+ v
@.HasOrder := false;- S7 f' T+ h3 X0 k4 `& ]8 Z: o! f) G
@.DrivingHome := true;
J( i h& [2 M, [# j rgManager.tryToStartTransOrder;
4 [0 O7 r [3 } if @.Destination = void
* D7 u4 C( i+ V( @* L. z then -- no transport order for vehicle @
* U" G1 U+ \8 v( t- H6 d' { @.Destination :=. U0 t1 L$ e; x1 W8 n
rgManager.nearestFreeStation(@,track.~);
( p" F y4 p( a4 ^ newDirection(@); ! M I, H$ x1 m3 n7 X) Q; S
if @.Destination /= void then
- v9 ?& |2 {5 |6 N* { S; W @.Destination.NumReservation :=% g J6 t: h8 J9 Z# k; k
@.Destination.NumReservation + 1;
+ b& i5 k3 t; m; I( B end;
& l- j+ Q0 @6 \! S6 F @.CurrIcon := "drivingHome";, N! M- l2 d7 w' V6 R1 X4 E
@.DrivingHome := true;9 @9 b% A+ Y- b. t; X" T% \
end;
7 y5 q/ Y0 Y. D0 S( z$ a else -- the vehicle @ is empty, both vehicle and part are in the same dock station8 Q. Y0 F! @6 N; z. b
part := @.transpOrder;
' \$ j D+ z- \4 F( \ part.move(@);-- load part; h5 n# B4 n: D
@.CurrIcon := "load";
4 Z* i5 w' ^# A6 l5 L# Y GlobalDistObj := part.globDestination;1 R" N( H" j) g2 ^* G' s
assignLObj := rgmanager.rgAssignL;& ^8 N' H6 w6 D& H% e- t
row := assignLObj.getRowNo(GlobalDistObj);; {2 w* U% q9 t% x4 R6 }
if Row = -1 then -- since 70
( ?& x/ q1 N7 r4 t: e if lan=1 then
* s% }0 y, c" t' ?- t3 y6 T* B. W promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),4 a$ G- R! e9 S/ V& X
to_str("in der Andockstation: \"",?.~.name,"\""));
5 u; @' v8 ]$ ^" ? else0 E9 c/ w* ]1 @5 `
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),' A" y, @+ x- C9 G, \& f
to_str("in docking station: \"",?.~.name,"\"")); y& G9 B: E8 l. G$ B
end;
. q4 H% u6 m) r else. E; P/ Q- t3 ]' k% i
@.Destination := assignLObj[1,row];
/ K! E# } L% K1 r end; 2 Z" |1 I& [; r( ?0 W
newDirection(@);
( w8 `/ \5 m, t2 ?" f) q* P% c @.HasOrder := true;
' i8 @8 `/ M& I7 ^* k1 H4 l7 _ end;
# k+ G" m) E. h/ \8 r end;* p) B$ t0 }* L- b
end; -- of the method3 U. m9 n3 c8 q" z5 N
|