/* called by: entrance ctrl of the object 'track'0 l* T& L8 m: q- J1 j, Z) A
*/* d( ~3 V! b/ l! e5 q0 x/ a
is1 @; s$ U0 w. F5 F! G
part, GlobalDistObj, assignLObj:object;row,Lan:integer;" z& c; Y5 R/ t* C8 G0 d0 W: K- F
do
# ?% ^! }# L' M! K+ V4 M' a Lan := rootfolder.Internal.Tools.AOLlanguage;
% g: d6 ~" K+ e h* B1 t- X if current = @.Destination -- else return q+ L) T% {, @' t2 f
then2 q3 i; _ ~# R- |1 j1 P
@.Destination := void; q. H" z4 ~4 m# B/ b/ B
if @.occupied then
8 D+ G8 I* o& S+ T8 f0 [" y part := @.cont;
# F9 ]9 ^( l4 ^8 F( J" W @.transpOrder := void;. a0 W( `) W. g6 E1 c' A2 V$ n1 ]& s
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,; f; v! g" s. `0 y, ]
@,root.eventcontroller.simTime);
" Z( s5 G/ q* e( x9 H/ w @.HasOrder := false;
$ N$ t) G5 h. V2 { @.DrivingHome := true;1 I% }& w% m$ O( H2 l% X
rgManager.tryToStartTransOrder;3 b% c( u: X. X' X7 \
if @.Destination = void
2 A, w. A, W" A5 O w# h- z r& v then -- no transport order for vehicle @
3 `9 t& J0 H' A/ s @.Destination :=6 _! U7 \ ^* U! U) I
rgManager.nearestFreeStation(@,track.~);
" O7 }0 A5 T0 ^* h1 X$ ^ newDirection(@); : e% q6 ^, X& c
if @.Destination /= void then: S3 B' u7 E7 O8 K5 p: L
@.Destination.NumReservation :=. D1 X' a3 I( d3 w# J- {
@.Destination.NumReservation + 1;
( d& v: H1 T: z3 d3 I; n end;
' }# I! `+ z9 \8 X$ }/ C! I8 e @.CurrIcon := "drivingHome";% w( g% i# L4 Y+ ^
@.DrivingHome := true;( `3 L; w7 L) {) ?% ~5 B" U0 s
end;
+ l) U& c. X/ _4 t else -- the vehicle @ is empty, both vehicle and part are in the same dock station4 s1 q' p L/ a, a1 E
part := @.transpOrder;+ _4 m6 O' B3 v+ R5 n# b
part.move(@);-- load part H. D. n2 d% a/ B
@.CurrIcon := "load";
; G$ ~# h. g" t6 u GlobalDistObj := part.globDestination;
$ n$ f4 c8 I! v0 x assignLObj := rgmanager.rgAssignL;
" e: }; m5 U6 |7 v7 \. R row := assignLObj.getRowNo(GlobalDistObj);
9 c3 b K& y% L5 v5 M; y5 X5 |2 L if Row = -1 then -- since 70
0 E2 n6 b2 \* }/ a7 d& U if lan=1 then
9 X4 p5 W1 D! s promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),* k) j: e3 D) w* v9 g, e
to_str("in der Andockstation: \"",?.~.name,"\""));, S. F- b7 ]; O3 c. p# f7 T( b
else
9 R- Q q% c/ i# r' C promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),' `4 ~% a( x2 m7 N
to_str("in docking station: \"",?.~.name,"\""));
+ o/ ?. N! L8 Z+ d) ~' i end;
; u8 R$ U) V+ } else/ k [# K& v9 \7 Q
@.Destination := assignLObj[1,row];8 j" j: [# ?: ?! V
end;
) j& Y9 @/ b; I0 | newDirection(@);
3 @- ]+ O* _( d @.HasOrder := true;
+ `. y9 T0 Y, z$ R2 L2 r end;
8 C+ O* N8 |4 c; D end;
, @( s8 U9 V( `( n. u: Aend; -- of the method
; ~3 }7 d% n. H$ {) f* w |