/* called by: entrance ctrl of the object 'track'
! }7 O* X( s2 e9 @( w6 m3 W*/8 `$ e* @' T7 O3 v; f7 i
is
6 q5 Q6 v) N3 M; Y! l$ r+ g) N/ Q part, GlobalDistObj, assignLObj:object;row,Lan:integer;! R+ r9 R: T( s9 F9 k9 T. i
do
- ]9 B7 h* Y* f+ y( t+ u Lan := rootfolder.Internal.Tools.AOLlanguage;+ [+ H4 P E, B/ c u# {
if current = @.Destination -- else return
- y5 ~" ]4 }3 _4 x' {. H then
3 v: G1 Z% x3 i" m2 @+ } @.Destination := void;" k/ J S2 J* t, W k- t3 u
if @.occupied then' g+ X" V, Q7 R/ c9 y8 ~- g# e
part := @.cont;
0 w0 z/ C' v/ P4 }% T @.transpOrder := void;
; a3 o+ J1 K) v- k7 j P part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,, i$ n7 @- l" m5 t c
@,root.eventcontroller.simTime);) P5 k: T8 T e* y3 i
@.HasOrder := false;
: _' O& ?# ?& b2 X6 u4 Z6 R* j2 Z, d @.DrivingHome := true;
" ]6 m! u" H6 v) ~- x8 V rgManager.tryToStartTransOrder;* G, @5 h8 U, r6 E9 p( E' V: [
if @.Destination = void
+ ?/ H6 F' u3 N8 t( ` then -- no transport order for vehicle @
* m" u( b& \: F) {+ a2 |/ q @.Destination :=- m9 n1 ]- r: o1 u! ?
rgManager.nearestFreeStation(@,track.~);
: V6 X* b) ^# K5 {6 h newDirection(@); & s% _$ o6 x; ]0 D8 m& |, x" k
if @.Destination /= void then
7 d% r- D2 v& l8 H$ u& D @.Destination.NumReservation :=
: K6 I7 v( g5 q! v @.Destination.NumReservation + 1;9 f5 [+ @& ?3 Z
end;
/ s5 N8 H& ~6 e% @' m" |2 ]' o @.CurrIcon := "drivingHome";- v+ Q% k ~& N1 _+ B5 b
@.DrivingHome := true;
/ B7 B) c1 B1 N! } end;
7 C/ C: L! q1 _% F7 \; ` else -- the vehicle @ is empty, both vehicle and part are in the same dock station$ W6 B1 N. Z: |" E5 v
part := @.transpOrder;
I' _2 }, k! Z' Q part.move(@);-- load part6 Q& M. }; y6 C5 ~' Q3 s$ K
@.CurrIcon := "load";% |' e1 P" _* z' V7 w. K, s, j/ h* I
GlobalDistObj := part.globDestination;
& U" t9 D: L/ f* v7 F- @ assignLObj := rgmanager.rgAssignL;# q) z2 e+ N, b& m
row := assignLObj.getRowNo(GlobalDistObj);3 ]. o6 h4 r3 ~8 T1 m3 D
if Row = -1 then -- since 70
, R& W0 t9 u+ ~( M if lan=1 then
! y: c; t. n k$ d4 F8 C' E promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),2 r& Y2 L" @+ t/ s
to_str("in der Andockstation: \"",?.~.name,"\"")); N+ q. }6 f1 K1 p
else m' f! _6 P8 Q" B: R
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),! d( d( z9 q2 F& C
to_str("in docking station: \"",?.~.name,"\""));
3 ^+ ?2 @8 ]6 D- Z# x end;% b+ q. W$ p- V% q9 w* B% U6 n" I
else! E/ @* \& U- Y+ K! g7 m
@.Destination := assignLObj[1,row];
# a! Z. d# R* j& ]" S9 V3 n& r end;
& k1 }/ C" f9 x/ b+ u newDirection(@);" r& _8 s9 Q) F
@.HasOrder := true;7 R s% T, @; O7 Y, m
end;
& w8 d. _ c/ L end;% B9 k- d Q2 J. C: T/ O1 _
end; -- of the method6 l8 t! t. A' j
|