/* called by: entrance ctrl of the object 'track'' X& d r4 \: k; [
*/& M) ], M% F2 O' O
is! v8 K. h! w6 l+ a; D) Y) M) w' I! w9 H
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
7 @* i9 R! t/ y4 Kdo
$ D$ a) G' p6 c3 { Lan := rootfolder.Internal.Tools.AOLlanguage; U. V( _& L+ M d
if current = @.Destination -- else return
( _1 x/ E. X# N9 w( `, t9 W X7 X then8 S j3 i( H6 i
@.Destination := void;2 I) G, y2 V7 ^6 X7 g: q; J! V
if @.occupied then2 e6 g7 S, `* B0 {1 ?1 A
part := @.cont;
! x( W: V8 E; [: Q$ ?/ g2 ` @.transpOrder := void;3 e' E9 `) I5 k- V- V0 g
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
! D% ~( x7 R) H) F& d0 W+ u @,root.eventcontroller.simTime);
6 S2 \2 Y- `! F& u+ N @.HasOrder := false;; B$ I* A; M2 t$ k5 e
@.DrivingHome := true;0 Q& r: b6 e4 K% |) q1 E% O$ c
rgManager.tryToStartTransOrder;
+ f8 B& v7 g- }4 P if @.Destination = void
5 `( U" b7 P1 d& }" Z4 \& K3 o then -- no transport order for vehicle @
' V) v+ Y$ d, j* X/ X @.Destination :=9 ~, r5 s# D% M9 d' g) @6 |. I. R
rgManager.nearestFreeStation(@,track.~);3 R- F7 R( L( ~, z1 e
newDirection(@); 6 L/ I8 W- g' J0 `/ O( Q
if @.Destination /= void then0 i0 C5 F9 ~# B; S* V1 Y4 H+ y
@.Destination.NumReservation :=& [6 {- @6 h8 }! C5 d4 W. m
@.Destination.NumReservation + 1;
+ \0 e% s2 X- [. d! g- [* t end;& a8 W6 ~% B: o) z: k
@.CurrIcon := "drivingHome";
! K* y% f- Z( r8 j; v- x# B/ N' o @.DrivingHome := true;
$ D4 ^& m# i3 |0 Q6 N+ y1 `. x# c( {! n end;$ U9 \, b+ F2 X3 F# y- V6 I. F* p
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
, n0 l3 V! |) u# }1 \, {4 ~ part := @.transpOrder;
' }1 {* }( n4 H3 m3 o, K part.move(@);-- load part
4 a/ ^! o. Y' B y6 i3 r5 { @.CurrIcon := "load";
# K+ @; ]/ _2 w7 X! l GlobalDistObj := part.globDestination;
8 x/ e5 F D7 Q6 [# E assignLObj := rgmanager.rgAssignL;
, G" I' i3 F0 P$ S9 E2 i- D( C) i' d' b row := assignLObj.getRowNo(GlobalDistObj);- a" N; t/ ^8 s, r/ T4 w
if Row = -1 then -- since 70! _- f a3 G. \9 B' }
if lan=1 then
) z1 @) B- C- D. u# q! R8 f promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),6 E* t V1 C* d5 W8 [ i
to_str("in der Andockstation: \"",?.~.name,"\""));
6 f- N( N$ K$ U else8 G! v4 C' b2 C
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
, ?( b4 c* o* P$ r to_str("in docking station: \"",?.~.name,"\"")); 9 M/ x) u- ~' I# ^9 j+ r2 g0 @
end;3 S- ^' @. K% }. U
else1 j* k# u' O& B4 x; }
@.Destination := assignLObj[1,row];' Q; L0 K6 Y) e. W, ~
end;
, o; L4 H& A) y1 o m, b( E newDirection(@);
* D/ d( }2 k" b/ M, d8 t- F" t @.HasOrder := true;$ R0 }5 P1 w$ e% n4 }' \ I9 q1 t
end;" W7 m4 T" c: c O5 I
end;
, m2 E3 u: F- ]/ Yend; -- of the method" b! m4 T5 w) Z3 N" c o5 Q
|