/* called by: entrance ctrl of the object 'track'
. |2 E) T: s1 b/ J( Q- \*/
( P5 N( e' ]5 j$ Y/ [7 Kis
; O- W0 |9 [3 E+ V4 r part, GlobalDistObj, assignLObj:object;row,Lan:integer;0 i6 p8 @4 o: U" b
do$ V6 T1 B8 j2 c6 `- n0 n, f
Lan := rootfolder.Internal.Tools.AOLlanguage;) O( l X3 a# h8 z9 z4 Z9 ^& M: ?
if current = @.Destination -- else return
7 w: o4 G1 b' Z3 i! D then
0 y0 M, r4 h2 I2 |, ^: _" | @.Destination := void;+ V% W2 _8 z g, S. q1 d
if @.occupied then+ T" E& F: ^4 u" l% W1 I
part := @.cont;% q& [+ |2 `/ ~4 P B; V
@.transpOrder := void;5 r6 ]/ M; Q2 ~* N4 m
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
: G: N) l! {7 e. o) K6 W/ M2 a @,root.eventcontroller.simTime);0 S h* D, }+ S- T: R
@.HasOrder := false;
$ l4 I2 a- S6 ^0 U Q @.DrivingHome := true;0 {! L! x- j; o. ]
rgManager.tryToStartTransOrder;
' |! i1 j7 v9 ?, Q3 Z4 u if @.Destination = void$ \( c9 ~4 h C" M" l! S& t
then -- no transport order for vehicle @
) Z p! g' ]; G! a7 l6 x8 u0 b. Q0 c @.Destination :=
/ q {) {- o: s+ _ rgManager.nearestFreeStation(@,track.~);8 {9 o6 s+ T! V0 e% y7 t: l2 F/ I5 e
newDirection(@);
; i# t" p& j0 J+ L( a if @.Destination /= void then
, B+ ]4 x: R D @.Destination.NumReservation :=7 Z& w' t0 ^& y, i4 F* K* z# R/ Z
@.Destination.NumReservation + 1;+ V% t, T1 q- X h# H6 d
end;1 V. b( i3 z+ G7 l% |
@.CurrIcon := "drivingHome";
# V- x; ?# G7 l" L @.DrivingHome := true;
7 ^# h$ J, O) Y) h$ f end;8 m. c! m, _/ X) w4 E8 X
else -- the vehicle @ is empty, both vehicle and part are in the same dock station3 P! U7 R9 Q9 ~; U4 N3 w1 p
part := @.transpOrder;/ a6 J2 g% \0 q- r+ Z
part.move(@);-- load part
2 c$ K# m% B. z4 Z @.CurrIcon := "load";
. y/ p2 ?: K3 m: X0 ]# H; N; Z GlobalDistObj := part.globDestination;
$ S8 l; [% X: l& T# \, x/ j& V assignLObj := rgmanager.rgAssignL;1 y; N4 W: Q0 y1 A
row := assignLObj.getRowNo(GlobalDistObj);" U- w( W% U* a, ^' ]% A
if Row = -1 then -- since 70
9 o! ^" i3 G5 `* q( `* g9 p& | if lan=1 then6 X4 q" Y7 l) p) n" F( o
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),. R2 B% A4 w( y8 U W# g
to_str("in der Andockstation: \"",?.~.name,"\""));
) F: Z& Y) O& Z% r* Z! F9 F else1 Z- z9 |+ P' A! j) g+ {6 d. {
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
* p* I: p' ^8 A. H' j- B to_str("in docking station: \"",?.~.name,"\"")); . c" ]+ ^1 ]( o6 x
end;
; {; c5 B0 A( M5 Z else( M( f r. ~: f2 E% n6 ^( M7 l" H
@.Destination := assignLObj[1,row];9 X* ?0 l1 c5 a) N4 b9 t3 g
end;
8 W7 |1 ` l. S, a newDirection(@);
" p9 }" j. X( D+ T9 R2 k4 [ @.HasOrder := true;# j+ H6 l. `% q
end;
2 E* ]+ b$ g: k) f0 |2 s0 @ end;
# R- x# N# ]2 ^# send; -- of the method
2 Y% W3 d) V- l f, E7 j( h. I |