/* called by: entrance ctrl of the object 'track'* R' B b1 e( `4 ]' _
*/
# d8 u. t& z! F ^6 wis$ s9 M1 ?6 h/ T6 M
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
' k+ Q# F) ^: s0 F7 mdo
. o6 a+ l* `" T. Z& T8 t Lan := rootfolder.Internal.Tools.AOLlanguage;# W$ I! b0 L9 I) P4 i
if current = @.Destination -- else return
4 a% Y: }. [3 O" u# K; Y then. X, v0 j1 `) L% A+ M2 U
@.Destination := void;' @0 S* x8 N+ G/ ]1 V* }
if @.occupied then, m6 X: w) h% u4 x% ?
part := @.cont;
$ V4 M+ v' ~$ l% N. Z+ w2 ?1 j @.transpOrder := void;
+ x8 p& Z5 L" x' }2 {8 ]; Z! D part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
( Q; p8 v$ n- u/ K* p3 i @,root.eventcontroller.simTime);3 @( u% M" [2 S& i4 P2 A
@.HasOrder := false;/ s7 a5 @& m L, P8 Q2 [
@.DrivingHome := true;+ S8 w0 f% y: v- e4 Z
rgManager.tryToStartTransOrder;% I9 r: F* B# Q p* d4 }
if @.Destination = void
% o( [! X( L) W% A- _" m& W then -- no transport order for vehicle @$ u- ~0 L8 F( h, p, s
@.Destination :=
4 S \- b$ ?: P5 s rgManager.nearestFreeStation(@,track.~);
- H1 a& f% L! A newDirection(@); / h, k2 m* S" i' l2 ]
if @.Destination /= void then" `4 i4 I+ \+ p N+ i
@.Destination.NumReservation :=, Z9 v6 m0 t/ d: A i, ~/ }- P4 F) x
@.Destination.NumReservation + 1;0 x8 c! R+ M3 u$ M8 L
end; ~+ h6 K) D2 [" {7 \2 S4 Z5 O, o
@.CurrIcon := "drivingHome";" p/ o- R0 X9 }, ^0 U, B V
@.DrivingHome := true;
5 G% ^ p" }: u: t; p end;
# e+ r5 y5 X- p0 [8 u1 W else -- the vehicle @ is empty, both vehicle and part are in the same dock station4 O. R7 ?" r H1 A" |
part := @.transpOrder;
3 C* v+ @5 ]8 ~" f; G+ B: O9 w part.move(@);-- load part+ f5 f+ B6 P/ _. I: b/ O+ D
@.CurrIcon := "load";8 k4 l4 ~0 @* T& i9 n5 y! m; P
GlobalDistObj := part.globDestination;
4 F$ y( E# Y& w* i; b+ S assignLObj := rgmanager.rgAssignL;
& a2 x8 X1 c$ f2 O2 B row := assignLObj.getRowNo(GlobalDistObj);3 v, D" ^+ R. i# g) N2 w0 O# U
if Row = -1 then -- since 70
5 d x5 m7 p' T if lan=1 then
. p3 \0 q5 F c promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),2 \& q3 F9 ^ n- y) d6 t4 b* B- s* t, R
to_str("in der Andockstation: \"",?.~.name,"\""));' X: V+ }) p0 m$ T' J
else7 B# k& b, u# Y& O0 j1 m7 N
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),! {3 s/ C* N; z
to_str("in docking station: \"",?.~.name,"\"")); 7 C j% C: y2 O1 F+ H4 M1 F
end;* N: b0 ^ [% A. I( O5 O) V2 m+ c
else
5 m2 X% g! p* O$ u @.Destination := assignLObj[1,row];
4 X4 H- X5 t7 ^ end;
% g" ^6 n* c6 Y1 S6 t/ } newDirection(@);
9 q' [' }7 O5 J3 Z) o' N8 P) D @.HasOrder := true;
; e$ I; R9 v+ ~; u end;2 M# t7 h0 }& l" i% \: s3 i
end;* n$ G( f5 A2 S
end; -- of the method) X4 ?- t; x6 u/ ?8 ]& v4 r
|