/* called by: entrance ctrl of the object 'track'" j' ^$ A' ^" n* X; H7 v4 I& r
*/
$ n8 A8 I. m+ K. q' \$ Q# sis
) Z/ T$ q+ r* X5 S/ v7 } part, GlobalDistObj, assignLObj:object;row,Lan:integer;
: s1 N( U6 C7 h- F! gdo
; F$ v+ W' u# a: p0 {0 f% N% F+ C4 Q Lan := rootfolder.Internal.Tools.AOLlanguage;
+ d8 d# Y/ F3 i* R2 p( h if current = @.Destination -- else return. [" Q8 U f/ ^
then
, @% O/ t; T9 r$ D4 {4 d/ D @.Destination := void;
2 N- A( y8 }' Y if @.occupied then
- F( I0 k2 A5 E' M1 \ part := @.cont;
2 B; d: d- y) i* q3 L5 J2 ~ @.transpOrder := void;
! T$ {1 Z7 D7 j# `. Z2 f" W part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,3 s5 f+ e6 p. d2 C
@,root.eventcontroller.simTime);5 z5 D1 f+ M5 `- Z
@.HasOrder := false;. Z1 z Z1 p, D5 U- K; X
@.DrivingHome := true;
+ S# i" B8 s4 y, i8 s# ` rgManager.tryToStartTransOrder;2 |8 b8 g% p) L7 `
if @.Destination = void! d _( X* z2 U+ C7 k% {& p. X# z
then -- no transport order for vehicle @7 ]0 K, t, E( T6 ~, A! l# {1 R" |
@.Destination :=
2 v% x9 {' T+ ]% n) p0 n* Q rgManager.nearestFreeStation(@,track.~);
" i) a' l2 e$ C newDirection(@);
# a4 F# s2 w m3 E8 j( c$ u$ _ if @.Destination /= void then+ ~: y0 l. |, p# ^# V" @
@.Destination.NumReservation :=
; { l; D$ v. x7 e5 }2 ?1 W0 X @.Destination.NumReservation + 1;
% l# I' a2 F1 j& T' F. {4 U end;
' I* {2 y0 ?. z6 N& S& o0 Z: m- y, \ @.CurrIcon := "drivingHome";; ~; s" [% J" L2 W
@.DrivingHome := true;
1 s/ a6 {; z- K2 i1 X W end;8 ?( i% ~% @ t- t( w _/ Z
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
2 J! g4 j M. a" M) Y part := @.transpOrder;. _1 s: h) o9 V+ [ [/ T
part.move(@);-- load part! ?0 d; J; U- x
@.CurrIcon := "load";% q% ^! b7 O: o2 @% t
GlobalDistObj := part.globDestination;
, E# ^, s" o) g, _' m assignLObj := rgmanager.rgAssignL;7 f" E5 u5 y) x" n7 I/ u! D3 H
row := assignLObj.getRowNo(GlobalDistObj);
- i* C6 E+ `7 U% E( y if Row = -1 then -- since 70
0 ^5 [5 U9 _. L5 B, {' P if lan=1 then
# u" J7 N+ h) D; \ promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
+ S% W& J+ T, r to_str("in der Andockstation: \"",?.~.name,"\""));
# S3 S9 F5 D7 U8 u else
) W, q5 e; p% Z promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
" X& z* z, @) n1 W& y to_str("in docking station: \"",?.~.name,"\""));
! ?* T, l, t- m. l5 e; p( D end;
; |) Q9 n3 O/ ]9 _ else
, T5 F& k( f( S7 @$ X4 e0 F @.Destination := assignLObj[1,row];
) S R$ H: s0 M# z7 R) v end;
! u- S1 C {8 t1 b. N0 l I' S6 D newDirection(@);& R, A7 U* q2 O' x5 F
@.HasOrder := true;9 F6 C2 \* U$ ?2 u f+ a# [
end;
* G- U$ B2 t0 b( y7 a5 ~5 F end;
. |1 i U, P# z; u6 E' Hend; -- of the method9 k# ^# C- q" N' X( @
|