/* called by: entrance ctrl of the object 'track'
, M) x3 z2 V8 y: F4 ~3 u*/1 a. {/ A6 D: T: @& Z0 r! V
is
2 D. i2 I/ R/ p part, GlobalDistObj, assignLObj:object;row,Lan:integer;( J e+ y ?/ q& V" U' n9 K' s
do. C2 ? u6 g8 v. g- B n3 N+ T7 D3 |
Lan := rootfolder.Internal.Tools.AOLlanguage;5 |& `3 X) w5 j: O: W, ^
if current = @.Destination -- else return+ H6 X2 N# l2 |+ i7 N
then `( r: g3 g; O0 r6 d7 C
@.Destination := void;
# P$ k. x( y/ L1 H. Q+ s+ T if @.occupied then7 `, H T6 Y% |) A) q
part := @.cont;& E- ^5 \3 S& ~ e4 r
@.transpOrder := void;
# B7 j' e8 ~9 R! M! _4 J part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,4 F& C, r$ `0 r5 L8 H8 u* k) K) \
@,root.eventcontroller.simTime);
0 u/ H6 x* D: O4 ?, d+ o3 M @.HasOrder := false;
/ S; K" s- Y! T9 v @.DrivingHome := true;0 a3 V; [0 i: R. c+ p- f
rgManager.tryToStartTransOrder;
+ |+ Y- l( J$ u R" S if @.Destination = void5 K+ U" O' n) ?+ ^! o+ w
then -- no transport order for vehicle @5 m+ G; I+ {, H# Z) ?( V2 R* j7 h
@.Destination :=
. x$ W( G- R: k ], n, p% E( C rgManager.nearestFreeStation(@,track.~);
z7 E T- g& O* j newDirection(@);
8 @) v1 v4 Y& m8 X if @.Destination /= void then, f8 d: {- ~6 a- a/ F
@.Destination.NumReservation :=
0 G V6 {# x9 a# i% M% q/ D @.Destination.NumReservation + 1;. d ]. O( S9 t9 J1 R, C- G0 q9 T
end;; F+ J! z/ b, x9 u5 i2 W
@.CurrIcon := "drivingHome";
) }- v' } g- x5 A. R: R" O @.DrivingHome := true;
" V9 `, ]% n+ k* b5 H: p8 u- ?/ q end;
5 u \0 u, X, {; [ else -- the vehicle @ is empty, both vehicle and part are in the same dock station
4 H, C: Z% O+ v1 X part := @.transpOrder;
: j" a$ f3 Q3 K# C+ N' i! E part.move(@);-- load part
- B- s' A" C: O @.CurrIcon := "load";+ [6 n' ]3 [: }& n, V+ o+ X
GlobalDistObj := part.globDestination;
. m7 x. g/ d( { assignLObj := rgmanager.rgAssignL;6 }. D" X% z5 N: r, J9 p8 B( X7 @0 [
row := assignLObj.getRowNo(GlobalDistObj);* k4 I$ n# {# p* ^1 y
if Row = -1 then -- since 70
; G% Y2 _2 V9 m( D4 {9 C if lan=1 then
1 ]" i. H. f, r+ l promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
. [* m7 ^$ g+ i t; s. k to_str("in der Andockstation: \"",?.~.name,"\""));) |1 ~; v5 Z7 K1 ^ }5 Q
else
* ?% g. W$ U# W+ s( ~ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),6 m) W" t! u- O1 J
to_str("in docking station: \"",?.~.name,"\""));
+ j4 r- B3 e' L n: r( |, \4 R O. U end;- a; D: M% r1 Q1 l! Y8 k
else# v# g# I, G& ] {
@.Destination := assignLObj[1,row];8 x* k% z2 T0 l5 @
end;
: I4 i b3 ?6 M! K* ~- a newDirection(@);
: V# j* h! J0 \8 h0 s1 T @.HasOrder := true;
6 E. `1 \9 B* f d- N) F6 `8 K end;3 a& y$ T* l4 t2 D
end;
1 s3 ?- }) b0 q8 q5 H. W/ _- X3 dend; -- of the method2 }0 \/ m$ R' k
|