/* called by: entrance ctrl of the object 'track'5 X. y, l+ X8 y8 \4 [
*/
5 F- V5 M: `6 Y8 D6 A9 ois: T9 o" F( A2 D# S& e5 ~
part, GlobalDistObj, assignLObj:object;row,Lan:integer;' o+ i$ Z! ?% T3 v# M% l! Y
do
+ D3 {5 {. c7 f; u- W0 m* V Lan := rootfolder.Internal.Tools.AOLlanguage;* z4 }. Z& a: F* T# B
if current = @.Destination -- else return
: W$ A- g) ^7 C# u' T then
/ l0 ^5 s8 C6 P4 V" S @.Destination := void;
6 J7 Z* P6 O& ~) ]0 q if @.occupied then
7 d* u7 ?/ i1 p; f# v part := @.cont;
. Y3 d$ |8 b2 H5 N# r; h( U% k9 y @.transpOrder := void;
, ] u9 k! u6 `) E% m2 n part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,' E1 a6 C- E( E! R* L5 v
@,root.eventcontroller.simTime);" E) X, A# l+ G6 U
@.HasOrder := false;
s) f" k2 F. h' _; L @.DrivingHome := true;( \* x" v/ F2 ?; T! V$ n
rgManager.tryToStartTransOrder;0 B! \! T" x- l& i' I, r u( }: [
if @.Destination = void: @9 Y* U3 p# b3 F D
then -- no transport order for vehicle @
' j0 V" i- ^- s6 c @.Destination :=
4 y6 R/ r. P' g7 M rgManager.nearestFreeStation(@,track.~);, A, V$ D% x# e) D4 K* i
newDirection(@); [4 k4 g7 \: S4 {* Q5 N( m
if @.Destination /= void then0 R0 L9 X+ ~5 j, }! z! s
@.Destination.NumReservation :=
1 }! {! j% H7 i A; s5 M# V9 j @.Destination.NumReservation + 1;
* e9 `% |# W' W1 B/ k2 U4 x end;7 p: Z9 s' @# ]/ ^1 i& V) R
@.CurrIcon := "drivingHome";; T1 i+ |: u' g# c4 l ?: L
@.DrivingHome := true;* C9 l0 o5 m! F+ [
end;
7 g5 I) C6 f* t, l, C( X1 ~ else -- the vehicle @ is empty, both vehicle and part are in the same dock station( l& E5 `: u' V9 G' }/ z: J' e( [
part := @.transpOrder;
8 t0 _7 c1 Q9 t; P/ a part.move(@);-- load part+ b" R# y" H7 w" B3 j: f
@.CurrIcon := "load";
+ n3 ]. ^/ i+ f4 K. Y, B6 N GlobalDistObj := part.globDestination;; ]2 E8 _- |5 @" E8 O
assignLObj := rgmanager.rgAssignL;1 |# u" h: G" N5 F* E7 q
row := assignLObj.getRowNo(GlobalDistObj);7 w1 D% ]2 V* e8 P; d
if Row = -1 then -- since 70, b* q+ d, E( H' P$ u
if lan=1 then
9 Y, [9 t0 m0 w9 ^# |, E promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
s( @+ {6 d8 X& S8 b5 { to_str("in der Andockstation: \"",?.~.name,"\""));0 `5 c: V8 i; z0 n- U" P$ _/ i1 w
else
5 }) I* H1 l0 H2 w6 C% W0 H promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
6 r% _: k& b# ? to_str("in docking station: \"",?.~.name,"\""));
! y9 ~( G: a( i- m1 A8 Z/ g7 Z end;
L [( N; d2 J2 }( T: L else
! t8 o! o$ S: r( V @.Destination := assignLObj[1,row];% y$ U5 W' z$ s' U7 A
end; ; R/ z& X0 n1 H7 J) v6 f/ e
newDirection(@);
+ e' \; C' K5 k D0 E @.HasOrder := true;# h, O, s# u6 y
end;
+ k" j9 e- n. }. n) y end;" o5 M3 I* q5 s5 p5 Q: U3 q! D) m5 I
end; -- of the method" Z$ c" q7 l% `" j* h* W7 d3 a/ z
|