/* called by: entrance ctrl of the object 'track'# f7 `6 V0 a2 A1 E
*/
& D- T( \- p" M# @is0 e T, d+ B1 F
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
* T" V7 e! K6 n3 U b8 mdo
: \/ Z4 Y6 C6 T2 l* D m Lan := rootfolder.Internal.Tools.AOLlanguage;- ?: I l) |( K B# P) _
if current = @.Destination -- else return
2 n! b# z2 }2 c6 Y then
9 m: A3 d; ?% E* e @.Destination := void;
" v% x2 f, |9 @/ {, a3 U# U x6 G if @.occupied then4 ~$ R5 G8 d0 ?: K
part := @.cont;9 @- [5 }( K& m* b* `, j, {2 l
@.transpOrder := void;
( M: j |& {+ R: ?9 m part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,/ X. u/ d% x- C$ F! U7 m o
@,root.eventcontroller.simTime);
( O4 C3 r; s1 |7 b3 U: v2 q @.HasOrder := false; ^! n3 L: d% t( N' n
@.DrivingHome := true;
. a2 s" ?+ M4 X! l U6 L rgManager.tryToStartTransOrder;
( M2 v. d) [# b+ v8 p' v if @.Destination = void$ U/ f' T) f2 J! V" B9 ^, l4 W
then -- no transport order for vehicle @( D5 ]( G( @% R. E% O6 D
@.Destination :=% b1 O4 y$ R( Z+ \; I# z8 B
rgManager.nearestFreeStation(@,track.~);6 Q9 ^1 \4 ~) M3 d
newDirection(@); 8 W9 e" G0 V( q. p& h0 Z) F
if @.Destination /= void then
; ]; H* w9 O6 H; j @.Destination.NumReservation :=
" [9 [9 q! K N7 D9 o @.Destination.NumReservation + 1;
8 |3 h( z- L4 v% K end;+ d1 r" U' l& E/ h
@.CurrIcon := "drivingHome";( I! G, r, E! U |- o! j
@.DrivingHome := true;' I4 t: O* H% L. X3 E) k
end;
5 s; w' h" S q8 i4 v+ P2 A else -- the vehicle @ is empty, both vehicle and part are in the same dock station. z9 k1 [; M) P- u
part := @.transpOrder;
4 B/ `% P+ y+ G4 T$ E7 f2 n0 J part.move(@);-- load part
4 o% q/ Q/ [5 L) W. j& [ @.CurrIcon := "load";
8 A0 j1 K+ F3 e6 j GlobalDistObj := part.globDestination;. }$ i# `3 R& F/ e: J
assignLObj := rgmanager.rgAssignL;
* c/ i0 B; p+ @9 s row := assignLObj.getRowNo(GlobalDistObj);4 U' }" B. V+ u `' \, A
if Row = -1 then -- since 70
# e$ O# i7 a) k- u if lan=1 then6 h1 K0 N! i& J" N0 C* t4 `
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),+ P" ~# v" L7 ^; s% z$ T3 ^) x
to_str("in der Andockstation: \"",?.~.name,"\""));& A+ e; g* C2 c8 u7 p
else- b& w' H1 @6 v0 P- a( L
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),/ g4 p9 x1 A( \/ E/ J) C
to_str("in docking station: \"",?.~.name,"\"")); + w! } x8 G$ M# l# h
end;
* Y- I( {9 W: V% W" `. @ else8 L% J+ D1 v% x/ h% V
@.Destination := assignLObj[1,row];
1 \! }) `2 s! Q8 Y. o end;
0 Z8 i3 p7 |! c- b5 V newDirection(@);
% P) y% }( u! h9 g9 n @.HasOrder := true;! r k! g" P+ v) C) {. F- n
end;
. R( x4 A' \, h! }+ S% L' L4 y+ w end;& z* G0 F% q0 y7 c. k7 N* M3 ^
end; -- of the method
% @. u O p$ n1 I! m |