/* called by: entrance ctrl of the object 'track'
" t* n1 E# s: t- R5 l" u& l. B*/
3 n3 i( R, W1 }' pis
0 J# {# |- `6 w part, GlobalDistObj, assignLObj:object;row,Lan:integer;
2 U1 q: w6 i- h/ j- s' D" `/ ?do3 ^3 X1 t# B8 @+ g$ b7 D) l9 j
Lan := rootfolder.Internal.Tools.AOLlanguage;) f; I% A" X) o+ O( |* Q6 |# W/ X) b
if current = @.Destination -- else return
|: [: O# X q# Z" q then. L5 Q* v5 N- g; W" N2 f
@.Destination := void;
& g8 B9 U, O) l5 N1 R' v if @.occupied then8 ?3 e0 ^; h, o9 r
part := @.cont;
1 \9 }5 x# Z) v0 Y5 k- Y7 c @.transpOrder := void;3 [: S7 O' t3 W7 J0 F2 Z
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
) {8 J( A& Q2 j9 w, K2 j @,root.eventcontroller.simTime);% T( s. f) J+ C- H; L. T
@.HasOrder := false;
4 W3 r! l( d/ T) b" b @.DrivingHome := true;3 f3 {( o- k3 t8 U; \* ?7 c0 a
rgManager.tryToStartTransOrder;# l i( c) Z! L% P) B/ z
if @.Destination = void# p) j* O; f5 O* F
then -- no transport order for vehicle @1 l1 |. q8 x2 ~; F4 h8 ?8 K* `
@.Destination :=
% z. r/ i, ]) u: n rgManager.nearestFreeStation(@,track.~);
4 A1 h6 d! K& G6 k" U newDirection(@); 6 a; O" Q) }& t# z m4 d
if @.Destination /= void then9 Q1 ~: M0 F4 m4 _, j. z
@.Destination.NumReservation :=
# P+ s0 u. d2 r Y! q7 u @.Destination.NumReservation + 1;) w: o) n. j* R# m
end;* ?4 ?" x7 C# I6 |( r
@.CurrIcon := "drivingHome";) p) H$ v( K! z. d8 W% i$ x; H3 M
@.DrivingHome := true;
- \ }9 @( I3 D end;
) w& _' Q }1 A- G else -- the vehicle @ is empty, both vehicle and part are in the same dock station6 Z: ^8 D, \+ Y7 V: T8 D( ?
part := @.transpOrder;
P" y# r8 K% m5 I) f part.move(@);-- load part: P, [' B7 C+ `/ Z. d
@.CurrIcon := "load";* d! _) R6 Y" {9 C- x! A8 S
GlobalDistObj := part.globDestination;5 M ~) G* N* [2 z p3 Z# d0 d
assignLObj := rgmanager.rgAssignL;
: Y* g& Q; M' r4 o% ]8 p+ d row := assignLObj.getRowNo(GlobalDistObj);, d c4 f8 s; M0 S
if Row = -1 then -- since 70
8 C% [0 F- \* n7 \, H if lan=1 then
1 z, k% x6 s x4 r promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),, r- g( v2 ?) N$ [( @& i
to_str("in der Andockstation: \"",?.~.name,"\""));- V- }1 Z- x0 }; L5 B3 o4 [
else
4 J {3 g ]! h8 D Z promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),% b6 M3 N) B9 _: d6 `9 H( b3 `; U
to_str("in docking station: \"",?.~.name,"\""));
5 Q# s% q/ c3 E+ S end;/ J# F% _7 a w# L5 a9 r
else6 i/ h! h, Z- {4 S
@.Destination := assignLObj[1,row];
2 k0 x" w' l n' @ end;
; ?5 s4 e, E% p7 J% y newDirection(@);
7 A, ]$ N' \, ~& ~9 p( L @.HasOrder := true;7 f2 D; L0 N" b4 y9 b
end;, Q9 J: o3 L) M6 ]; L8 o+ J) N) w( r
end;
: i0 w6 h9 A+ send; -- of the method8 O+ R3 [: ^9 ]6 n* ]' m- U
|