/* called by: entrance ctrl of the object 'track'5 e: I4 H1 D+ p! z/ H' a* g
*/8 y* d* c g( m, ]' B5 r0 ~5 |
is. {4 ?5 f S9 D1 E$ V8 A" _
part, GlobalDistObj, assignLObj:object;row,Lan:integer;+ {( ^) p6 J, W8 K+ e) r
do
% K$ U3 o8 Y) E$ L" {$ b- q% E Lan := rootfolder.Internal.Tools.AOLlanguage;
! N3 `3 P% y7 O if current = @.Destination -- else return
' _! W0 l) Y6 K( }8 F, t then
7 e% F3 P& n! `) K. ] @.Destination := void;+ B6 Q' E" B/ \) S- J
if @.occupied then5 V' v- C( [2 X, w# t: }4 F
part := @.cont;1 |5 r- L* I/ S
@.transpOrder := void;
; d6 z: L0 E3 z; \ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
& i7 e: P5 b9 Z& r; U0 Z @,root.eventcontroller.simTime);$ Y9 Z: \+ n8 [1 _6 m/ F# `
@.HasOrder := false;' L; [9 } I0 y) x2 ~
@.DrivingHome := true;
- E6 E( N. J2 O2 @6 J4 u1 i3 R rgManager.tryToStartTransOrder;0 R7 E# {- {$ i& M- @# ]+ ~
if @.Destination = void
" G w7 n* x# u- N then -- no transport order for vehicle @, n7 S" `1 } ?. Z! e3 P
@.Destination :=
) S) t# n' _# E6 f' e rgManager.nearestFreeStation(@,track.~);
" E4 M$ `- q9 j4 Y1 e4 ^7 X N newDirection(@); u+ W+ D7 [4 c
if @.Destination /= void then. Y; E7 ^4 B( W9 i* }
@.Destination.NumReservation :=2 h5 e' v6 Q/ s# \" F
@.Destination.NumReservation + 1;
5 ~. u8 s3 g4 {8 C/ _ end;
) |! `& x8 F' C) z) }0 Y- N2 j! N @.CurrIcon := "drivingHome";
$ j, r0 N4 w: h8 f) x/ M& I @.DrivingHome := true;
$ u' ]) \* l) ]7 E5 r: @% M end;
* R8 C7 e* g! O6 o: t0 j else -- the vehicle @ is empty, both vehicle and part are in the same dock station
* p/ w8 t3 G' @3 n- @/ B. y7 W1 F7 g part := @.transpOrder;6 b( A! Y' d* S8 M) \
part.move(@);-- load part3 {* P; `* t7 s z3 {4 g
@.CurrIcon := "load";
1 A5 V; z; h; `+ N GlobalDistObj := part.globDestination;5 @2 M& e# p3 A" [- E$ q
assignLObj := rgmanager.rgAssignL;
. ^" ]% ]" R# [3 C. T# P# L* q6 s! N! D4 L" N row := assignLObj.getRowNo(GlobalDistObj);
+ ^4 V m. }2 h2 y0 H if Row = -1 then -- since 70
! z' L: [0 J. o5 p1 N6 C if lan=1 then
2 F: z; \& ^; W! W! M3 a promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
* f- T9 e/ w6 X7 ^ to_str("in der Andockstation: \"",?.~.name,"\""));
$ h8 B r6 X0 I7 a+ J' P4 P0 z else0 V* x( `# q# h7 F: I
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),6 {/ ^5 i, D* `) W" N( Y" v
to_str("in docking station: \"",?.~.name,"\""));
2 z3 T( ~6 i0 D/ Y2 o. i4 O end;& j- n$ [. v8 X6 y3 x* ]' }( t- r c
else& K L! V, ?1 _+ t
@.Destination := assignLObj[1,row];
1 u$ Z5 i O$ R, R end;
# C C2 d) T% C4 s, f6 Z/ U6 x$ h newDirection(@);3 r/ P4 |5 |- G( i5 z2 \# W, x
@.HasOrder := true;1 Y3 a+ a" A: j5 j
end;
. P' t: n2 r0 Y& x end;
: _/ w5 j1 P, L" Xend; -- of the method( C( c1 V: j: d- |# z8 y
|