/* called by: entrance ctrl of the object 'track'$ ?9 M( D3 Y1 A8 e9 X- b
*/
$ p4 L4 e/ _0 K( gis
, o' G, Q0 ~, X0 p part, GlobalDistObj, assignLObj:object;row,Lan:integer;9 W$ m1 ?; X2 @
do
" a2 [2 T% h! G! }7 t2 c$ y Lan := rootfolder.Internal.Tools.AOLlanguage;/ [! V F9 I5 z- J! q
if current = @.Destination -- else return
. ?; e( s1 }2 h8 H7 J% B8 X( l then, _+ S) M7 e; f0 b# c) {, n- ~
@.Destination := void;, m5 E# _( ~) [' D' \! D
if @.occupied then
* P0 F, n9 ~% E, O2 f part := @.cont;
# y5 A- w8 i, L# ]2 W# `3 A# \. N$ p @.transpOrder := void;# C. |+ E8 i( j2 f
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
8 l3 ~! F) ~+ G9 S4 n @,root.eventcontroller.simTime);, w* o- `2 M" E7 r$ h
@.HasOrder := false;! l1 s& X+ ]9 b/ y8 z3 T0 K+ r
@.DrivingHome := true;
$ L$ l" d: W7 M" A3 H rgManager.tryToStartTransOrder;9 } s: U$ A# s) O @8 V. w5 N T6 `
if @.Destination = void
% r+ b n* D) Z! H$ D5 P2 r, j, }6 ~ then -- no transport order for vehicle @
1 e* L% O9 R0 D0 `$ ~9 P9 W @.Destination :=( R2 \6 x8 t* }9 X. l( n7 e
rgManager.nearestFreeStation(@,track.~);9 m0 X. \+ K, Z' c& H+ k
newDirection(@);
' K' l" U2 M/ X2 M, f4 g+ v if @.Destination /= void then0 c8 i. H2 w- F- L- E" e j
@.Destination.NumReservation :=0 b5 Q2 G* t) A6 O3 v
@.Destination.NumReservation + 1;4 ^/ F4 v d- p& Y
end;
8 `2 H# m. ^$ C0 m @.CurrIcon := "drivingHome";
* _+ q) m' z" i& o' z @.DrivingHome := true;" ?+ J, T8 L: _2 ~
end;' Y. I) ~: P" ^
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
% Z3 T- t5 `& s* T! w8 U part := @.transpOrder;. s" J4 _7 L y n5 H+ ?
part.move(@);-- load part3 ~7 \# w; m' s( q6 |$ N3 J
@.CurrIcon := "load";
2 r" _! T" }& P GlobalDistObj := part.globDestination;
! u0 `( x6 U$ { assignLObj := rgmanager.rgAssignL;3 a" W" A# n9 E& n
row := assignLObj.getRowNo(GlobalDistObj);
# E) o/ ?8 l* g7 u) a if Row = -1 then -- since 70
, [! y+ \" ]& B$ y y! F if lan=1 then
. a' `1 x$ V; T1 m! J# x promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),2 z x. E4 o4 T- g" _, p6 H8 G
to_str("in der Andockstation: \"",?.~.name,"\""));! w3 z, L" H; H! A, w
else: q v7 ?5 F/ u: b- ~
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
4 g# C$ l2 z0 w: \4 d" o to_str("in docking station: \"",?.~.name,"\""));
. _ b2 y: n7 @ end;4 M m! ` E9 W! _. D5 C" G
else3 o" t/ v# S# a5 S
@.Destination := assignLObj[1,row];
2 L1 f: Y- B: t end; & u- D9 z9 v- F1 {! b
newDirection(@);+ y- [$ @( q& K- x
@.HasOrder := true;
# A! R4 R7 c! h! S. v end;
' o7 V, P# W2 C& \9 y; @ end;
* C$ ]8 N) ~; y2 m- ^+ H; xend; -- of the method3 l+ e% f) q+ w3 P
|