/* called by: entrance ctrl of the object 'track'
0 N) ^ T$ X! m8 A: l*/5 b* _; y1 Y4 J/ @/ J9 s! ~% \6 S
is
- U1 y+ p4 ^% f# E* T part, GlobalDistObj, assignLObj:object;row,Lan:integer;
7 \' E+ [) P5 I" i0 W7 e8 c% J8 {$ kdo3 Y8 D, ~' E, }" w$ \
Lan := rootfolder.Internal.Tools.AOLlanguage;( U! P4 e# f: i) R* y& G
if current = @.Destination -- else return
1 t8 f, D/ F4 s% {' t# O' v then- Z$ g! \7 L% S' O
@.Destination := void;; p- k+ W0 H3 f
if @.occupied then' l* `9 H" R6 d( A- r [4 H
part := @.cont;
; O! i+ P$ l. H( O1 d) r, T @.transpOrder := void;
: v6 s6 `, n8 S: R$ U/ m& V part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,% R4 j0 u% p5 S9 d# E' E( g/ w8 Z1 M
@,root.eventcontroller.simTime);) x( [& U2 u8 o G+ [. t
@.HasOrder := false;0 g* b6 d" |6 L$ m" P& l) _
@.DrivingHome := true;# j0 E8 L6 K3 s/ V! E
rgManager.tryToStartTransOrder;
& W( y6 W9 h2 s9 u( X if @.Destination = void" b$ h! D# F& A8 b' E
then -- no transport order for vehicle @
0 ^6 f b1 A2 r# l, Z _7 @1 @ @.Destination :=$ D# R n# O( T: `9 K* s
rgManager.nearestFreeStation(@,track.~);
4 O B/ O2 \* o: Y newDirection(@);
9 D5 f: ` O* C: H if @.Destination /= void then
8 N: K0 [; U; ^/ _8 y/ [ @.Destination.NumReservation :=
3 ?! n- [" S& ? @.Destination.NumReservation + 1;
% l/ i+ e# m# I9 G; \1 J end;
& [7 q2 k# c% e6 G, o$ { @.CurrIcon := "drivingHome";! C8 f. y d* R7 {* @+ k! w
@.DrivingHome := true;
1 u# e+ ]- h- S b0 H I) C end;
4 b+ y, b( O. u; n* S% [ ^6 F else -- the vehicle @ is empty, both vehicle and part are in the same dock station r; Q1 G0 c+ o% {$ x* m* ~3 K8 ]
part := @.transpOrder;7 |, ~2 ?2 m. D- k
part.move(@);-- load part) } L9 N) Q @
@.CurrIcon := "load";7 B; l3 ^# i( x$ P
GlobalDistObj := part.globDestination;' x" D5 p, z. t
assignLObj := rgmanager.rgAssignL;
) |6 \0 f; i/ x! T4 S* f row := assignLObj.getRowNo(GlobalDistObj);
0 D* E/ `2 f! N if Row = -1 then -- since 70. X* z$ H+ a V' P! d- C% O
if lan=1 then
4 p3 g$ c+ P4 m0 l3 }3 X promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),/ @- `7 ?( S+ g7 Y! M
to_str("in der Andockstation: \"",?.~.name,"\""));
" g O" C* Y" e' A/ A else/ }8 |: [6 q6 ]. n+ }. e- Z5 w
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),* [( A% ?0 h! U2 o( e
to_str("in docking station: \"",?.~.name,"\""));
! J( D) ~# U2 l end;2 F6 D6 J6 E: I- S F
else
) v& s( W3 d8 ?9 W @.Destination := assignLObj[1,row];
# W: ^3 g1 D& k# x) g end;
7 ~! [' u( P- Y1 u8 T. t newDirection(@);. ? g8 _. V( f& y- \6 U" D
@.HasOrder := true;
. M6 C9 ]; R( y end;9 h/ w8 D- S4 W' i
end;
R3 g6 j3 r+ r. vend; -- of the method
/ }& g; Q T8 U |