/* called by: entrance ctrl of the object 'track'
& d; Y4 j5 x& N! G8 ?" |; Q*/2 Q) U% h; ?( _6 X7 B8 E
is
$ ]' ]! q& v; b6 r- V: G$ q& d4 ? part, GlobalDistObj, assignLObj:object;row,Lan:integer;
6 M/ V" V! m2 p+ w" s. _do0 I% X* T# H* b: ?9 W# v8 c( x
Lan := rootfolder.Internal.Tools.AOLlanguage;! e/ Q* }1 Y: _ j! n$ a" }! F
if current = @.Destination -- else return
0 i1 l% b0 E0 Y1 I+ X8 L: A3 ~ then$ F7 z. S, X7 O
@.Destination := void;0 y2 ]6 R' r$ X6 a) }# ]* ]
if @.occupied then
' V! S* g! `7 }9 W v l# {7 N part := @.cont;' S9 ~4 P% g2 Q) Q
@.transpOrder := void;
* H; o$ V/ {: @" f9 z5 f part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
8 d4 @. f' F9 @; _8 f4 y: I @,root.eventcontroller.simTime);1 m0 {" @5 I+ M2 F* y# K# I
@.HasOrder := false;
& E s: Z# w( Q; w( l4 v @.DrivingHome := true;# D# m# H, ?; `
rgManager.tryToStartTransOrder;# F0 d# y. e B4 R5 q5 P1 F
if @.Destination = void) K+ |( _" ?1 V! u: ]$ B9 W
then -- no transport order for vehicle @
1 x3 f( P$ b, ~- q: L @.Destination :=: J7 S9 ~" ?9 }; m r' W* L
rgManager.nearestFreeStation(@,track.~);
" O& X2 V& l4 p: f newDirection(@); 2 l4 r- N. f) c) p2 w
if @.Destination /= void then1 `* X1 i U5 i* [7 q! }
@.Destination.NumReservation :=1 _- ?/ d: r# l
@.Destination.NumReservation + 1;- O0 W$ [+ W. Q+ V' w* z$ G
end;! u% {, @6 f7 _5 t
@.CurrIcon := "drivingHome";
0 y0 O7 r, A [& P7 e- Q @.DrivingHome := true;
# d% y- k! F) U end;
+ V( u% K# `- i# g" o else -- the vehicle @ is empty, both vehicle and part are in the same dock station
- X4 f8 S+ l5 V/ \9 _ part := @.transpOrder;/ X5 N& L( f8 F5 ]
part.move(@);-- load part# N( w) g) w, k% U' \& ]
@.CurrIcon := "load";
3 ?$ _% q& O# S3 t: K GlobalDistObj := part.globDestination;
5 d, C( z1 U! I# r' O+ Z assignLObj := rgmanager.rgAssignL;5 m& m8 ^3 m4 \; n$ W+ E
row := assignLObj.getRowNo(GlobalDistObj);
4 @9 v, V2 V0 o& W; `4 u9 E4 r if Row = -1 then -- since 70
6 b6 z* [ d) V0 Y6 t if lan=1 then& }5 R l; T* e5 n# S& k: n, r
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
- |* y2 K: q9 J! O) w( v; e to_str("in der Andockstation: \"",?.~.name,"\""));
7 J4 u, m3 Q1 E9 V# c else
: B2 s3 N# M: @4 K# J promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
$ b4 `# Y4 l `/ P to_str("in docking station: \"",?.~.name,"\"")); 8 m1 l& {2 h5 I2 J
end;
, [. x0 q7 F& T! }0 ~; d else
! x! t4 l `; I @.Destination := assignLObj[1,row];' w6 H1 a! F7 c7 K- [: ?, a
end;
: K6 l3 s4 k0 W2 S# b9 X newDirection(@);( x' e2 j9 c) M X8 `
@.HasOrder := true;$ x G; @; I8 |! n( O5 H' D" V
end;
' K h. b1 ~2 j0 _8 m end;% p! Q( g0 V6 P* M
end; -- of the method
1 `9 W2 Q) V0 n0 q6 r+ t: y* _ |