/* called by: entrance ctrl of the object 'track'$ k& G& ]3 @/ J W1 [: a" Z
*// y& W) S, v- T/ I% P* K. q* _' c @
is
0 X/ X/ h/ g1 h part, GlobalDistObj, assignLObj:object;row,Lan:integer;
5 G( g; B. R: s: Kdo" w4 N8 T8 X7 P' d; S
Lan := rootfolder.Internal.Tools.AOLlanguage;+ W6 ?3 v/ E: Q! W
if current = @.Destination -- else return
- t* B/ T. ^5 \$ G& v1 [ then/ }2 v9 C3 k) @1 v! u
@.Destination := void;* p0 E4 G) r+ ^$ S* f& q
if @.occupied then
" o, M% `1 O" w6 j part := @.cont;
" B9 m. i0 g8 B9 `+ d) ^ @.transpOrder := void;
( z2 w, `+ i" i. T( a part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,2 d* t- f$ [ a
@,root.eventcontroller.simTime);. Z3 ^5 `9 p% O$ B! |0 C6 r3 ^
@.HasOrder := false;
0 l' ~; k: q$ a# ]6 K @.DrivingHome := true;
( r! g0 z" @4 C( X( S rgManager.tryToStartTransOrder;
0 u7 S. \2 {# r# W# ^+ L if @.Destination = void
6 `) B- ^1 i6 h8 S+ A: o( k) x( _ then -- no transport order for vehicle @
4 H) q# R# e7 j$ p: q% z, b- g3 G1 G @.Destination :=
; e! v1 w, {$ w- I: @0 A% g4 ` rgManager.nearestFreeStation(@,track.~);
/ f7 y A* E# M. {! ` w& T newDirection(@);
1 \7 y; r4 g: ]6 {1 @% P if @.Destination /= void then( S6 i: W+ x# o% S
@.Destination.NumReservation :=
* ^- a" E" O3 H @.Destination.NumReservation + 1;
_. n' }8 q% E( N( J6 A/ R: p, G end;
* Y' n+ ?/ Z) v& | L @.CurrIcon := "drivingHome";( c) |, k; f6 B% y% A4 S4 d
@.DrivingHome := true;
) o+ U/ _) k/ [$ c+ m3 I end;
- ^* o0 Z/ p$ u; b2 n0 r else -- the vehicle @ is empty, both vehicle and part are in the same dock station$ A; b0 I) B; d& q9 N8 a1 {
part := @.transpOrder;% q) B9 V8 g, f2 |
part.move(@);-- load part
, x: r, Y+ a+ y$ V @.CurrIcon := "load";
2 b& y+ V0 a! R( e9 |- [; f/ } GlobalDistObj := part.globDestination;
! Y; o: V# O6 y2 f/ K& x6 C. s c assignLObj := rgmanager.rgAssignL;
' Q" s" f; u2 [. e row := assignLObj.getRowNo(GlobalDistObj);
* V1 _5 a3 J9 L: }+ p/ h# Y6 [2 M if Row = -1 then -- since 70
- Y4 @. G j. l7 } if lan=1 then
& [) a, T3 Q7 a; z promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),3 Y1 J. [+ f1 v, K7 z1 ^( Y% v2 L
to_str("in der Andockstation: \"",?.~.name,"\""));
% t! E) C6 H; x/ Z else9 E. ^) z' |3 v Q; h
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
9 K* `- F' }. i% i' ? to_str("in docking station: \"",?.~.name,"\""));
: j% j' j8 u6 A$ ? end;
" a$ Z4 t% [9 f! c n- G else
& Y, G1 U8 H; w! y( w! A0 l7 \ @.Destination := assignLObj[1,row];
* t+ E- |& y* q: l# ^* C end;
2 v# j" i+ K* g# A newDirection(@);
' }# ^0 G# ^' k8 s7 k @.HasOrder := true;3 R* f1 k' d/ v! F8 {$ ~ ~
end;
( X1 c7 a$ a8 L, A, j+ W end;
- n0 ]/ }4 ~5 ?6 mend; -- of the method a/ }4 |, w4 c$ }5 V! @6 G" A: K
|