/* called by: entrance ctrl of the object 'track'! L4 u9 [$ Y* l" [8 p x
*/
: g" F* @& u' Tis
' h7 v M4 V9 f N `* x! p0 G, G part, GlobalDistObj, assignLObj:object;row,Lan:integer;
) `0 x0 ]3 z6 p3 b6 B4 Mdo0 h7 D- f( s9 h9 p" ] W
Lan := rootfolder.Internal.Tools.AOLlanguage;/ b# S* t1 i& x- Q
if current = @.Destination -- else return
; }5 j; G% n% d1 R+ a then
9 F4 `" s E! g/ ] F" Z; Z2 Y6 x' @4 S# s @.Destination := void;
0 q: m2 t7 v! O6 |! Y if @.occupied then. V) [ A. @+ p0 A" L. m* ^6 w$ E
part := @.cont;* e2 B0 @' w' @5 N( O& F7 ^
@.transpOrder := void;
. h4 Y# H% B# ]- l+ ] part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
2 I+ D1 B% Y o+ B; o( Y @,root.eventcontroller.simTime);
+ V1 N# x8 k6 g, | @.HasOrder := false;
4 K% [# u9 \- N) C @.DrivingHome := true;
, `0 ^! n! M6 R3 h5 g. j rgManager.tryToStartTransOrder;
& z1 D @" v; ?/ K! I- D if @.Destination = void
" `4 H/ \8 u; u* [) ?! u8 i then -- no transport order for vehicle @9 Y2 F( `& s% x" u( @3 r8 P
@.Destination :=: q; f/ W+ D! Q9 T; B
rgManager.nearestFreeStation(@,track.~);
- U, a2 S7 d: x$ S+ J7 Y newDirection(@);
: C" S' U }! G7 c0 T1 o if @.Destination /= void then, ?% D% ^6 w9 E) _0 h$ z2 f- l2 v
@.Destination.NumReservation :=
' N2 d: M4 V/ }1 [$ h6 w @.Destination.NumReservation + 1;
: k) F8 f5 @, k* {, l) B end; @4 [3 n$ M. c5 E4 s0 Q
@.CurrIcon := "drivingHome";
; O/ O6 p8 n4 P' G" z @.DrivingHome := true;( C9 e7 s; o8 q. p3 E4 f
end;$ m( R9 D% W* |. E" n
else -- the vehicle @ is empty, both vehicle and part are in the same dock station# D7 ^1 E. L/ Q) Y/ R! t2 G- Z. `
part := @.transpOrder;( W( E4 D5 k4 M
part.move(@);-- load part
) _' r$ s* Y6 r) N, W @.CurrIcon := "load";5 C [3 {# X) J$ i4 w) E4 P
GlobalDistObj := part.globDestination;2 B4 n5 W/ p5 z- ?5 u. d* S
assignLObj := rgmanager.rgAssignL;
- }+ C1 ?; w$ O" w3 z; J row := assignLObj.getRowNo(GlobalDistObj);
5 j- C. l: b- R, O if Row = -1 then -- since 70
9 s" C6 ^% C( c/ U7 ^$ u! s4 e if lan=1 then
! c: d, x% Y- s7 j/ P$ m promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
1 k( D9 M- l1 H" K5 _ to_str("in der Andockstation: \"",?.~.name,"\""));4 Z b0 }+ p# A1 P
else+ K, P7 N' ^2 t- S8 M: q# f
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
$ }9 `# f2 n( Z& P1 ? to_str("in docking station: \"",?.~.name,"\""));
8 @, C# ]2 b; M( x, p. k end; R6 z- f9 w- ^# k( W& N4 @ R
else3 B" l0 w- y' w* t: s
@.Destination := assignLObj[1,row];+ O1 V% f: B0 p* _% C
end; / g. E3 R, ]: [$ u
newDirection(@);
/ y8 b& y! B4 e. Q @.HasOrder := true;
" M- d; Y4 Y5 x& {4 h/ T! Y end;
1 X+ X9 ?3 ]# @8 \1 v* H end;
/ d' w: o# j& v8 @+ ?end; -- of the method
8 H3 P% a3 W i' R |