/* called by: entrance ctrl of the object 'track', u6 x5 n1 n1 F! d$ U/ C1 N
*/
: @4 M3 z1 ^% f8 c8 ?; ]% Kis
# P4 ]+ a. w( \/ A part, GlobalDistObj, assignLObj:object;row,Lan:integer;0 h0 Z% B# v, s
do
/ ^* E3 i6 D$ R# `& y$ o% ]: W, k Lan := rootfolder.Internal.Tools.AOLlanguage;
& V" S- |) c2 U# R6 t2 o if current = @.Destination -- else return1 D6 G/ I H8 |3 v" V! C% N3 |) d6 ^
then: [- k* m' ]$ S, h
@.Destination := void;- W7 y, [. h8 }
if @.occupied then
- q5 g7 J2 B% b7 d# ~4 A part := @.cont;
1 [1 Y- Z4 l5 ~9 w+ A @.transpOrder := void;
" Y { T O. e9 G8 @0 F# L part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
9 E6 o; t2 X* j- k; a$ y" S9 T P @,root.eventcontroller.simTime);
/ j/ s! s9 k% o" \: b8 t @.HasOrder := false;
: q" V7 R( {& m% { @.DrivingHome := true;7 U3 G2 L+ `3 f0 X# y
rgManager.tryToStartTransOrder;
3 [& ^3 F: C$ B/ ~1 f6 T if @.Destination = void4 w; @' J1 H$ V1 C% i7 G
then -- no transport order for vehicle @6 `# u, v& ]5 e; l* s
@.Destination :=
`2 i: T+ K# F: @: Y/ z1 g rgManager.nearestFreeStation(@,track.~);
6 E# C* S/ u! W8 d2 U3 d newDirection(@);
& U% O2 s. G" K* o4 m4 S if @.Destination /= void then
9 l0 g8 r7 Y- c, X @.Destination.NumReservation :=( o9 y6 }' W1 Z* g
@.Destination.NumReservation + 1;$ }! N" v# o& j0 t) j- h
end;8 D1 N$ d2 {# B; o) e0 X
@.CurrIcon := "drivingHome";
! o3 u. r6 P4 c6 V6 `) j8 s, E, R% @ @.DrivingHome := true;2 T( S, \8 `/ {! x* }" `
end;! X. u3 |. }. K
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
8 J# @# i* Q9 H+ {3 i* M( N part := @.transpOrder;
# X- g+ R# x# i5 P. f& R; L( h part.move(@);-- load part& s3 u. [* p( ~( S
@.CurrIcon := "load";
' O7 z+ s) \/ J; V. e* }' S GlobalDistObj := part.globDestination;& `/ d' t O4 {5 ]
assignLObj := rgmanager.rgAssignL;
$ ` V8 x7 r) }) u' h row := assignLObj.getRowNo(GlobalDistObj);
6 r! R5 Q& Z2 G" f& ` if Row = -1 then -- since 70' }/ E# d- M8 x" T( ^& K; Z
if lan=1 then
" E* y# O. w4 D4 A0 I6 r, [+ }8 \ promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
4 @4 x# _$ Z" K0 a to_str("in der Andockstation: \"",?.~.name,"\""));9 Y, M7 L0 U3 u8 w% m( B+ u7 B$ U
else# [" L# Z( W- N) F* U
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),1 ?: Y2 r8 s- @4 _: R& G
to_str("in docking station: \"",?.~.name,"\"")); ' W; T1 @/ T+ }7 |; a; W
end;# x- o* K) q2 }' E V9 q7 R, |8 _
else/ f" C# t! S' O3 E3 [( N5 l* D: c
@.Destination := assignLObj[1,row];
$ `( W5 U7 n: N3 A: } end;
8 @) G/ G# F4 |+ H newDirection(@);( a8 C! P* L. w' c4 y+ q. b- T
@.HasOrder := true;
" ~. \4 ^+ a) W- d4 V1 e' U end;
4 b {* ]; t! H* e: H( p end;: R+ T M! y2 F6 \1 T
end; -- of the method6 D8 y Q# F5 r9 }& A/ n% T. F$ x
|