/* called by: entrance ctrl of the object 'track'
$ h3 I: \, Y% v* v! s V6 _*/0 i: a0 l$ ]* p6 p8 G4 |
is
3 k, U% ]$ S0 c8 d8 O* z part, GlobalDistObj, assignLObj:object;row,Lan:integer;' S9 S: y$ f Q6 {9 W/ P! { j1 U8 W
do2 S- a3 }6 y4 ~1 m/ N1 j
Lan := rootfolder.Internal.Tools.AOLlanguage;, H7 p( `& ~8 \2 | Z6 h; d/ M
if current = @.Destination -- else return. Z7 j; I+ n* i+ I
then0 B8 d( v: n4 K2 l+ n( O+ L3 K
@.Destination := void;
6 Y; t2 E$ A0 f }1 I if @.occupied then
( u1 ^8 l% Q% r part := @.cont;5 z2 {% O) H0 F# n
@.transpOrder := void;( ]9 B. t+ Q$ Y! ~( e$ V6 R
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,& K/ V: ^' g: p, a u
@,root.eventcontroller.simTime);
: r+ x+ Y) ]% [5 U4 q1 N' F' X @.HasOrder := false;
4 Y5 s, l- s7 I4 u+ F* M @.DrivingHome := true;
" J- h) J3 W6 d2 J$ b5 r( g rgManager.tryToStartTransOrder;
/ ` ]+ A0 S6 r- I( P$ N! H3 j' ] if @.Destination = void8 Z: o& ~. a; ^5 Q' b3 q
then -- no transport order for vehicle @
3 G g" K4 e3 e u0 j! g @.Destination :=9 @, Y# V5 K7 Z, ^
rgManager.nearestFreeStation(@,track.~);" l [' t5 n! E( |% ^$ y L
newDirection(@);
: m3 f9 H' v0 b0 c if @.Destination /= void then
2 C9 n0 E! X. j2 z) B! a @.Destination.NumReservation :=+ ?7 w6 y p- L5 u5 x
@.Destination.NumReservation + 1;$ Y4 r# ~5 }) v; P# m7 {
end;; ?; M. n' O" O+ r7 T+ L! W4 @
@.CurrIcon := "drivingHome";$ `; L# q! n8 k% j3 X. b/ h. k q
@.DrivingHome := true;6 @* r! \8 I3 E4 q( c* o: f
end;
$ Z- g. Q- K/ t- _* ^3 ] else -- the vehicle @ is empty, both vehicle and part are in the same dock station
' b8 W1 D! o3 W$ z part := @.transpOrder;
" `+ J4 |/ c! Q. b part.move(@);-- load part
; |4 V5 Z2 |) G: s @.CurrIcon := "load";. [( r2 Y/ d* z+ \! N& x2 k$ c
GlobalDistObj := part.globDestination;( r, `. r8 m1 t* Y3 x
assignLObj := rgmanager.rgAssignL;5 |- C+ {+ j! U L
row := assignLObj.getRowNo(GlobalDistObj);
' q+ K2 x2 A( |& f if Row = -1 then -- since 70# \' I. ~/ c, @# C/ X% g2 V
if lan=1 then
& X0 e2 O! k, X promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),7 P5 G( J1 X* X" @% Z/ v5 M
to_str("in der Andockstation: \"",?.~.name,"\""));+ h( y" X. U! R
else
8 Y7 y( f" G6 B+ P promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),: w: f) R* D2 B- B/ [# N
to_str("in docking station: \"",?.~.name,"\"")); W( {2 _; D$ D& w, Z* L+ s
end;
3 p% x, U7 F7 L$ Y: `& E else
; y$ ?0 L2 Q9 r( Q% P1 f @.Destination := assignLObj[1,row];1 C: P8 \8 g; ^' C0 |% ]
end;
1 S. u, I( x7 {' G/ G& \3 u; k: @ newDirection(@);; f0 ^! C( D/ O w6 f
@.HasOrder := true;. V! p1 X" |% c1 W0 b: S' v' E A
end;
9 s2 F6 n$ `, a7 z/ _ end;
2 o0 t1 @& x7 O5 b3 k+ _& Bend; -- of the method+ q2 p+ w6 ?. J( e4 d6 S7 m2 |
|