/* called by: entrance ctrl of the object 'track'
4 X/ ^: \8 h1 h0 W# j' h*// `0 N8 p! U! G) W# r: x
is
: b7 p2 G( i4 _( Z part, GlobalDistObj, assignLObj:object;row,Lan:integer;
1 O1 T; u5 s1 n1 t0 q- zdo
# r4 X( f% {! g: [% a e Lan := rootfolder.Internal.Tools.AOLlanguage;
" M3 B" ?7 ?! z! n! H if current = @.Destination -- else return
" z: G, x, c3 K1 I2 ?7 e$ }: n5 [ then7 ]: k& t- P2 X- r9 T3 N+ \
@.Destination := void;
- g* ~! q* ?: H: I if @.occupied then1 F& @6 X/ `: D# A5 s( f% _
part := @.cont;( m# R2 K2 v; { s2 b' J8 O
@.transpOrder := void;
; Q& P7 r4 G. I& ? n/ z) ~ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,' U" ~2 W( y+ T
@,root.eventcontroller.simTime);
9 O% n6 s. ^& T! g$ H, J9 o* C; C* f @.HasOrder := false;
: G) k8 ^" R/ w/ |* M @.DrivingHome := true;
5 c5 F" r- Q# E: w1 T- |; L6 t+ { rgManager.tryToStartTransOrder;. U& x# v# x8 n; e8 h
if @.Destination = void" d. i$ d1 D8 b/ P" |: ?
then -- no transport order for vehicle @5 J& g% B; ^( Q4 O( T/ G6 ^+ h
@.Destination :=
7 M0 K$ c/ z# @* Y! j rgManager.nearestFreeStation(@,track.~);$ c4 v2 i& U9 g8 o& |9 ~0 J
newDirection(@); + [$ u& z1 x0 V( B2 a, ~$ Y
if @.Destination /= void then( l2 M0 C! [; }% s2 y0 x# [9 }. M9 X# a
@.Destination.NumReservation :=( n& n: [% A% w+ f4 t: }
@.Destination.NumReservation + 1;
6 b' ]% z- @2 J) i% y end;# |) n& C+ c1 U+ Y+ n
@.CurrIcon := "drivingHome";
z3 {& z* |. X c @.DrivingHome := true;
: M. D0 I) M7 j( ] end;
/ T, S7 Q: C$ P6 B. s& n else -- the vehicle @ is empty, both vehicle and part are in the same dock station
L6 n R( v5 `' D; X1 p0 _* { part := @.transpOrder;
" G: O% r% F' ` part.move(@);-- load part
1 m8 R( W) t0 ?+ [ @.CurrIcon := "load";$ C( }8 K8 c7 \; X1 s2 {
GlobalDistObj := part.globDestination;
k. T9 v" n/ d& H" u% @# Z assignLObj := rgmanager.rgAssignL;- {: i% B1 z; B
row := assignLObj.getRowNo(GlobalDistObj);
; i6 L& G& s- L% o if Row = -1 then -- since 70
+ X& N9 p6 K, S" J, [" I t if lan=1 then
* @# S% |6 `. L4 Y2 A! F promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
3 z& a6 c$ Z, H7 }$ k' ~ to_str("in der Andockstation: \"",?.~.name,"\""));
. O( V9 n5 R7 x4 K. X else) u) F8 I7 V1 E
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),7 {5 M6 v* c2 @ `5 K+ r
to_str("in docking station: \"",?.~.name,"\"")); , u. q' U6 F0 ?2 ~% K- J' R
end;
$ `% ^) O# I; a- y else! D+ Z8 y A8 e% ~
@.Destination := assignLObj[1,row];
; n9 \- B% `$ `4 i( I* @( H' W end; " n) R: w! d* ?, H J9 s# c
newDirection(@);
* f& A/ t/ z) G @.HasOrder := true;
0 B2 ?7 _# R4 D8 V% X end;+ H, t. f7 A! l3 {" p" I* b+ o
end;3 ?$ J8 W \3 K6 ?7 H. I, g
end; -- of the method! d. w A. A% @) S: n6 G6 Q. x& s
|