/* called by: entrance ctrl of the object 'track'5 L* I: ^, a6 ]) l0 k3 V
*/7 s# x7 x3 _% b& R- G' A6 r
is/ ^! Y5 d: }: S) K: i2 \
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
" Q. P/ e6 Z! f. w& i# ]do
! P) u g9 M& \3 j5 r: r! _4 C Lan := rootfolder.Internal.Tools.AOLlanguage;- j6 O0 M, I2 p: q" v, S4 i
if current = @.Destination -- else return1 L* M* d% a0 W6 ], ^# F
then
$ ^8 x/ S% ?0 w% T @.Destination := void;7 a/ p0 n' A6 R+ y0 b! f E; ~; K q
if @.occupied then
- W# j1 A; e3 G1 [ part := @.cont;
. F8 y- l1 f$ B" S @.transpOrder := void;, [' e, q; P. K9 t$ \
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
/ I( R3 s/ v3 O/ ?* i D# B @,root.eventcontroller.simTime);9 b6 i0 o. y) i9 R! l
@.HasOrder := false;- t( F7 O0 c9 G0 N B. I/ `
@.DrivingHome := true;1 |: A$ M% T$ ~# Z
rgManager.tryToStartTransOrder;
" a5 }+ x" x5 t3 Q5 t if @.Destination = void4 e. m& Y2 @ C; x; X6 k
then -- no transport order for vehicle @
# w( {. r( M9 K8 B, s! |' w4 O @.Destination :=# A6 y7 X/ S/ p/ H4 e5 t
rgManager.nearestFreeStation(@,track.~);4 i u& H6 o* T" F2 b
newDirection(@); ) z3 J {1 t- N# e/ X1 P
if @.Destination /= void then
4 P7 d5 S2 T9 t/ m( D4 M6 P( P @.Destination.NumReservation :=
. {' Z1 f' B+ _4 G8 C8 J: X V @.Destination.NumReservation + 1;
5 q+ }- G# c3 t end;
6 A% d( U3 \" ? |8 Q @.CurrIcon := "drivingHome";% R+ o' i, k# X/ d2 a# X
@.DrivingHome := true;" S& C" m1 `/ f7 Z5 d
end;
" K! g/ L' I* B& E; p( g else -- the vehicle @ is empty, both vehicle and part are in the same dock station- T( f/ i- S: I6 h& y
part := @.transpOrder;1 d3 }4 ~7 p! E
part.move(@);-- load part
. q4 g u& l/ g. q& ^3 H: F @.CurrIcon := "load";
9 e w* W% F" M0 ~6 t3 U# L GlobalDistObj := part.globDestination;, V6 n& K4 ^# M, v: }7 |3 j
assignLObj := rgmanager.rgAssignL;' |' l- b. e( K+ V# O9 r9 J. `3 W
row := assignLObj.getRowNo(GlobalDistObj);
' w. f" q8 o( U7 K8 z- X" V if Row = -1 then -- since 70
; x7 F3 ~& V5 o; r: s) ~ if lan=1 then
% Z; q9 q7 P) C+ g, p0 O promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),5 ]! Q& C+ q) U6 o
to_str("in der Andockstation: \"",?.~.name,"\""));# q" w% ]* Q3 Y. J
else
1 R* ^' `. y2 Z promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),6 T/ R* v/ x- A8 ]
to_str("in docking station: \"",?.~.name,"\"")); - K+ J7 V4 U( z. @/ G; h; u
end;' ?. Y! o; ?; W
else, q- I/ z) ~% n( n( O1 W! k
@.Destination := assignLObj[1,row];
0 x% o7 z- i/ S6 f8 H/ j& a end;
9 G3 H5 ^6 w/ e$ M newDirection(@);& H! X4 S/ f' T2 P7 j' C) V4 R
@.HasOrder := true;; \9 Y) z+ y5 Y0 J0 R& y5 N4 s
end;4 M g5 j9 Q- p2 q
end;- f/ e& W$ j5 u/ Z! l
end; -- of the method
/ `( s' |4 d' j m1 O6 S8 g |