/* called by: entrance ctrl of the object 'track'' `4 [! Q: }" a
*/1 ?; ~. n; q" O7 d" H9 v
is
' e' E0 i$ y7 v part, GlobalDistObj, assignLObj:object;row,Lan:integer;
/ q' Q/ }& T! L; K- Q K( udo
# C# a8 g h V; w- [4 {2 h3 R Lan := rootfolder.Internal.Tools.AOLlanguage;
( i: x8 W$ t$ e2 o& y4 [ if current = @.Destination -- else return
5 M% ~. j( a6 R' T then! {$ a9 q% f% p7 w3 G
@.Destination := void;
. b j7 W+ F5 N7 }' |, j& {+ e if @.occupied then5 A7 g: M/ D' m$ R) S* f
part := @.cont;
: v: B+ a$ k; c t& P @.transpOrder := void;' ?+ [; Y- L' x9 {$ f
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
$ N- m$ B, ~" y9 l& d: B- T @,root.eventcontroller.simTime);8 e! `" q" U7 A' ?
@.HasOrder := false;
8 [$ y/ S } l& N8 `: b9 K @.DrivingHome := true;# n$ A8 h; s4 e6 _
rgManager.tryToStartTransOrder;
; K* {9 E2 z2 u if @.Destination = void) [3 l( F. ~0 t4 \$ I
then -- no transport order for vehicle @
7 M# y. m/ i) _6 w3 t' u @.Destination :=
2 l0 I- x# u/ {" ?# L rgManager.nearestFreeStation(@,track.~);1 |! K: d) x/ R! K- v) d7 i
newDirection(@);
" s# h# z6 {7 h: c, y9 ?3 M1 t if @.Destination /= void then8 _0 t0 f3 P: H; K6 L
@.Destination.NumReservation :=
9 L0 V1 f* E/ P. ?2 s @.Destination.NumReservation + 1;* o2 I/ }- v4 v
end;: r6 X% S" F* z, C( Q ?; B
@.CurrIcon := "drivingHome";/ B4 j# R5 B1 J L x3 u
@.DrivingHome := true;
$ _/ R5 `$ ]4 O( N% d# a- e, p) G end;
& z) t6 t9 Q# S: z9 Q+ s2 } else -- the vehicle @ is empty, both vehicle and part are in the same dock station, X) w( v. H; z# ?9 Q: [- D
part := @.transpOrder;6 o, @! H3 L( z# P' P* f
part.move(@);-- load part2 z q+ P3 q! g! \7 N* E3 G
@.CurrIcon := "load";
1 ~9 q9 @9 a+ V3 M3 t GlobalDistObj := part.globDestination;0 [4 i8 N& r) P, x
assignLObj := rgmanager.rgAssignL;
& c5 d, o6 O; b8 B row := assignLObj.getRowNo(GlobalDistObj);# D3 B' x- |4 Z: y' e; |% R7 P+ L% V
if Row = -1 then -- since 70- z+ A& D# f/ @- l* i: I7 t8 ^8 B Q
if lan=1 then, ]9 W& x) U6 M/ }- f' K! _
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),6 X3 @2 ~9 G0 @7 S
to_str("in der Andockstation: \"",?.~.name,"\""));
/ D, R: \, n; Y- x0 z, Y; v: @) l" O. b else4 L% k8 g* b/ e# w# L
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
2 L8 g% D- v1 @ to_str("in docking station: \"",?.~.name,"\"")); 6 I. }3 m9 X/ b0 o' A$ y
end;0 g5 C' z. B6 d. j5 ?3 z n
else
% w8 `; r- @; P0 t k1 s @.Destination := assignLObj[1,row];7 D" V }$ @' Z! ]. \4 b
end; ( `0 N/ w8 U0 y" w1 ?7 I
newDirection(@);' w% T$ @* B5 d3 X3 B
@.HasOrder := true;: @# U1 F0 x c0 _( `1 h( u; c4 T
end;
- f. ?7 P& P# Z# l$ O; ^+ v end;
! [& b6 G" w/ l8 iend; -- of the method
2 I0 G' P( B- X- n% C |