/* called by: entrance ctrl of the object 'track'
# ~8 i. o" z9 \& e; W1 y4 l*/
; K4 @/ |: q8 b6 M( K( d$ p) B# `is8 O. y+ M8 V8 U* f( }: z
part, GlobalDistObj, assignLObj:object;row,Lan:integer;3 U" \- Q% _$ ^( M7 J x4 g) s
do0 f8 C5 ]+ z6 \" O- e! k9 _' }
Lan := rootfolder.Internal.Tools.AOLlanguage;
+ a) F- T; C5 f& k5 t+ R if current = @.Destination -- else return$ ~+ E" q% l# ^2 _, |
then
' ?' P* w- u/ X3 W6 }# Q# ^ @.Destination := void;+ ?/ l* w: `/ F+ Q7 L
if @.occupied then
2 V1 R) A" G, f) p- w part := @.cont;( D. v5 N- ]. {4 k K
@.transpOrder := void;
. i# S6 r& |, u5 l0 k) T part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,3 W- S- I+ J- [" o& F, E$ k& z
@,root.eventcontroller.simTime);) N- O% t+ F! {! i
@.HasOrder := false;
5 V( ~' x3 Y" u) e! a# z @.DrivingHome := true;
" ?' Y, `) o3 T- \ q7 c$ {0 [& u rgManager.tryToStartTransOrder;
, o$ Q8 O0 t! u1 F* p if @.Destination = void
4 _7 [6 J$ P" F" ` then -- no transport order for vehicle @
; L8 E, b" D+ O8 t; I7 r; o @.Destination :=$ Z$ V J3 Z: J: l+ U/ p3 E, D: w) k
rgManager.nearestFreeStation(@,track.~);' e; V6 d& O9 V( r+ ?4 C* c% r
newDirection(@); 9 x8 u7 Z# }+ p7 s9 O. w
if @.Destination /= void then
" [9 m& H2 V8 }# }3 `1 J. F0 e @.Destination.NumReservation :=) p! A& O- g9 t( T
@.Destination.NumReservation + 1;
0 m5 {1 D7 u: ~ end;; ]! u- d( K% h0 H1 O) g0 g
@.CurrIcon := "drivingHome";, Y+ @% Z# ^( O3 h3 x
@.DrivingHome := true;
, ~' L2 r( r6 g end;- M" T7 |) u, c# f: Q
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
/ Z2 V) D/ }$ e* Z+ ] part := @.transpOrder;
! ?. \0 N5 O* s( X% W$ M part.move(@);-- load part
" @; A% y: {$ K2 Q$ j. h& m @.CurrIcon := "load";. B/ d# S: N" Y1 u& }* N( d
GlobalDistObj := part.globDestination;
- }+ T7 v% V, ^1 Z& z. T4 L assignLObj := rgmanager.rgAssignL;2 C h- n9 q2 q% c" c! n, l2 e
row := assignLObj.getRowNo(GlobalDistObj);# C1 R7 V1 j9 r o( d
if Row = -1 then -- since 705 d- f R* p( B4 c, n' _1 J
if lan=1 then7 j! z! g. [/ H6 H
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
3 D) @! b) V" O to_str("in der Andockstation: \"",?.~.name,"\""));
! _& d% N4 [. o( K i else
4 q: ^, K# A3 m/ m# B3 A promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
7 @# J; \; ~# C8 c/ r h to_str("in docking station: \"",?.~.name,"\"")); ; g# T, Q& l; R1 g$ s/ n% y, G0 @ [& u
end;
- v6 d! s" G! b' M3 y1 v, y" Z$ f else6 a$ c6 p. T) N$ }* l$ I
@.Destination := assignLObj[1,row];) F8 \# x3 T2 ^3 y6 L, N
end;
: R' z% X. o; l8 U# K% D; y newDirection(@);
6 Z, i* l: t4 s/ } @.HasOrder := true;
2 T/ a9 a" w1 g, \, D. | end;
% \! S- g, K4 j9 k& }/ C! o* K end;2 ^) i0 ]+ G t$ S; H* Y
end; -- of the method
# P5 F0 c+ ]) v/ o |