/* called by: entrance ctrl of the object 'track'4 i- z3 N' ]' V, ?0 y
*/
: V# a1 V6 J2 eis6 X7 ?" W% R# C% h5 y. @
part, GlobalDistObj, assignLObj:object;row,Lan:integer; ?% |' l* N+ I0 Z
do
; ?6 }1 S9 P0 @. f# V Lan := rootfolder.Internal.Tools.AOLlanguage;
m5 j' Q% W4 _+ H0 H5 | if current = @.Destination -- else return
5 `0 r- w# d. c7 \8 s: \: c then
# g& Q' ?! }# i @.Destination := void;/ H3 }5 K: I+ V' I k# |7 K" n
if @.occupied then
2 B( | O; Q, v% F, O. R2 N9 T( l part := @.cont;
8 g3 Z( z q: e* i; ]! V4 K2 ?# { @.transpOrder := void;( F/ m- Z: P, h# B/ P
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,1 ^. J8 ~' |+ @5 V
@,root.eventcontroller.simTime);+ G5 s; }' g) J4 T; ~2 x7 ~
@.HasOrder := false; V7 `- y& P) h5 S
@.DrivingHome := true;$ L. ~0 p" m" L; s9 t8 W
rgManager.tryToStartTransOrder;8 D2 N; V! Z' H* p2 r5 q
if @.Destination = void
1 f, B3 V0 `6 V0 K! R then -- no transport order for vehicle @# T d3 C' L" e! N; E
@.Destination :=& r) r$ h6 |0 f6 [7 \. x3 o) H8 _
rgManager.nearestFreeStation(@,track.~); _5 Z; J" m# |( K7 E6 t6 M' D# O2 V
newDirection(@); 3 F5 {6 U1 t& v2 `
if @.Destination /= void then
6 L% _9 Y, L5 [& W2 ?. ` @.Destination.NumReservation :=3 T. L& [8 Z: y
@.Destination.NumReservation + 1;
h0 u! I# T/ K# a! e, ` end;
I- b( S1 O# Z8 J5 p @.CurrIcon := "drivingHome";/ F+ g3 l% k2 A3 Z9 c
@.DrivingHome := true;
6 Q: I m: R4 H; _6 U5 `% c end;
3 V, [& Z& j8 H else -- the vehicle @ is empty, both vehicle and part are in the same dock station7 B B2 C* T9 p6 I. m: Z0 H
part := @.transpOrder;% q7 L% d B- M3 z
part.move(@);-- load part
: O$ e; _7 z5 T, S2 y/ M @.CurrIcon := "load";
5 a+ z% ]" P8 P; ~ f GlobalDistObj := part.globDestination;- q/ U, n: o. ?; u6 ^7 ?5 b, o
assignLObj := rgmanager.rgAssignL;
# B0 B- i( z% v1 _( D row := assignLObj.getRowNo(GlobalDistObj);. u# T E' V0 [) f
if Row = -1 then -- since 70
- B/ e! w3 q2 N! [ if lan=1 then6 S) z1 l; Y& U5 v$ g
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),5 X% K/ ?8 X' P4 r+ k2 g+ A4 J* N6 T! J
to_str("in der Andockstation: \"",?.~.name,"\""));
4 \3 F# i1 s8 s6 X$ Z! T% g8 N else d" Z! J' _- ^( {+ P7 k4 T" h
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),; |+ d4 W7 `4 r: U: g9 f/ q" _
to_str("in docking station: \"",?.~.name,"\"")); 5 f4 I3 q" |$ R9 d& o
end;
% F9 \* [* a! c5 z2 _+ x- O else
4 S2 F4 K+ _" L7 C1 H @.Destination := assignLObj[1,row];
4 d+ m- f% W8 s. i end; / O7 R! p3 E& n2 I5 K
newDirection(@);8 [2 j% x/ g2 w2 Z- j0 B& k! X
@.HasOrder := true;
( h ~, U( Q l" @ |! G2 b end;
# y- L2 B! s" m- U3 A7 q end;
( H: g- y' c: @/ D8 }' c6 cend; -- of the method/ ]! O8 y* a8 }- x/ u- n
|