/* called by: entrance ctrl of the object 'track'
. i# j8 `; j8 q, c- l0 d" l1 f*/ k8 Z; P; V2 y* Z: E3 }* G8 z
is0 l: W7 i. Z/ _6 j
part, GlobalDistObj, assignLObj:object;row,Lan:integer; W* E+ W5 Y2 V0 x8 W
do* n( `# b& ^) b$ v7 D% M
Lan := rootfolder.Internal.Tools.AOLlanguage;3 a! r. M9 l' D. @% u" A5 A
if current = @.Destination -- else return
. z7 y" M x C5 y" v' v then1 u% ^; i/ t2 E2 _9 C8 h. b
@.Destination := void;
) n1 R6 W5 W! m* E7 {0 W6 X7 P if @.occupied then: b! r( h: A! V) z; I2 X
part := @.cont;
" @- j, E8 _2 e8 A( F! H o @.transpOrder := void;: E8 A1 H* ~" J# f+ D3 m
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
7 z1 |) x1 E: R+ l0 I' a @,root.eventcontroller.simTime);. x* K+ _" ^, n( L
@.HasOrder := false;+ k* L: V; `) h6 x, {
@.DrivingHome := true;+ r1 a; [9 ]+ v' a8 T4 o* J
rgManager.tryToStartTransOrder;2 B7 g+ f4 u+ c
if @.Destination = void
. d/ p" W q7 \# o then -- no transport order for vehicle @* u3 A1 w& q$ `6 o5 i0 }5 k" f
@.Destination :=: V( P5 V( F; P: g( P- f2 f
rgManager.nearestFreeStation(@,track.~);
/ E: Y$ g! s$ ?1 I' h k. u- z9 A newDirection(@); 9 @" F5 E& H: K( y3 p- N
if @.Destination /= void then, M- E; C6 N. \3 j% h" X* G
@.Destination.NumReservation :=
: h D$ o( L- P( m% \ t% L2 U @.Destination.NumReservation + 1;
2 K5 O9 o% {& ~" `. ^ end;' y% q5 b/ A. i3 v7 f
@.CurrIcon := "drivingHome";1 G2 J' h! u( t& d8 m5 F5 s$ C6 J! M
@.DrivingHome := true;. S; Z7 U4 p; {
end;" R8 L" t8 y& e. Q9 o1 n
else -- the vehicle @ is empty, both vehicle and part are in the same dock station% |8 [8 P, c8 i7 ]) O/ H
part := @.transpOrder;# O' N/ R4 q0 C
part.move(@);-- load part
7 S$ Q: Z0 z$ Q- }' O8 L @.CurrIcon := "load";
+ x0 H& L, {. O' r GlobalDistObj := part.globDestination;+ ^7 C0 n$ j# c5 E) j7 a5 m8 v+ H% j3 W
assignLObj := rgmanager.rgAssignL;
* U6 ?5 \2 ?: R4 H row := assignLObj.getRowNo(GlobalDistObj);8 M$ S; X; r6 f
if Row = -1 then -- since 70
# J: j+ ^; L8 q3 E! }7 u, l if lan=1 then
5 n+ p: o" C( K; |4 b- g promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),2 N, S) ]# B! r+ y8 d
to_str("in der Andockstation: \"",?.~.name,"\""));
# \0 H0 k0 j# D+ R/ a6 M- v else# {2 N; G2 u1 ^( q8 J
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),- a: s5 X2 y6 n$ t) Z( @# d3 v
to_str("in docking station: \"",?.~.name,"\""));
" K4 V1 Y' U/ E, W8 q9 c2 Y1 ] end;3 u$ B. A$ r' C+ n+ C& s# a
else) N* }/ G# U* A' C* C
@.Destination := assignLObj[1,row];
8 k# }# N/ O& X9 z' o- M; A' x end;
$ M# l' l, S" Y5 T newDirection(@);/ G. l7 m7 y& B$ o% Q" I
@.HasOrder := true;) [* [- }4 X- l* M" |
end;
1 n2 q/ O$ D/ N$ T( A end;
! d2 E' }5 K9 G, _8 U5 cend; -- of the method
* I9 k5 w" ?3 f3 n, W3 } |