/* called by: entrance ctrl of the object 'track'+ y, s# p* p* _! |
*/
( O/ h6 B. Z0 C( Gis
- s( m- ]8 O6 Z: O% m) l! D part, GlobalDistObj, assignLObj:object;row,Lan:integer;, ]$ d2 y! r2 p
do4 m0 D6 I. b( n0 Y S% @/ j$ f
Lan := rootfolder.Internal.Tools.AOLlanguage;
" `) C- a. z+ ]1 F+ Y if current = @.Destination -- else return
( n* V0 B& p. X) C- e0 y- ]( ~4 e then
- V1 [2 b; e \ @.Destination := void;- o& `6 M- \: r0 _
if @.occupied then7 g' Z+ H+ T# J: w
part := @.cont;
# L, a; t% T- m3 f8 }$ X9 a0 j5 ^ @.transpOrder := void;
* J9 s( t" u6 _5 \# a. r/ z B Z) L. l% z part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,/ u, W$ e# g1 h6 u" ?1 |
@,root.eventcontroller.simTime);
3 H6 J; N; r; e8 @ l( f @.HasOrder := false;
, @1 O. h. P0 w! x: l( ~ @.DrivingHome := true;6 L, |) h! m, W/ }* z, z
rgManager.tryToStartTransOrder;
% w+ ?0 ?/ @/ T# E# v: {. l) l- e if @.Destination = void
$ ]2 `' _' ]! K( L8 r6 p* _1 k1 z then -- no transport order for vehicle @
6 h* m# b6 w! W+ K8 j" h4 w @.Destination :=0 Z* R* g) F9 p& q, ?9 U
rgManager.nearestFreeStation(@,track.~);
5 a( b0 n2 R& { newDirection(@); . c" E/ l, ~- f
if @.Destination /= void then* D& O4 L( o4 B! g+ Q
@.Destination.NumReservation :=8 R/ E$ S0 w9 i n, C
@.Destination.NumReservation + 1;
* @% H; P( D$ g5 \- s- f4 H end;
3 B9 l, o }. F1 X @.CurrIcon := "drivingHome";
" j1 p5 U3 _& F! ` @.DrivingHome := true;! J: d3 Y% V' \' F4 i
end;
8 x8 H- I+ l6 w/ ? q, o) q else -- the vehicle @ is empty, both vehicle and part are in the same dock station
" F `1 E1 q, c$ i( Q part := @.transpOrder;& w/ k" |5 P4 l! n- ~
part.move(@);-- load part- h$ J/ F) z: }
@.CurrIcon := "load";
' m b5 S X0 m) q3 W: ] GlobalDistObj := part.globDestination;
; `; @9 j9 S+ T4 ` assignLObj := rgmanager.rgAssignL;
& r5 Q% T. a: e5 ?9 \5 c! ` row := assignLObj.getRowNo(GlobalDistObj);
8 ]1 k% a! G- U1 F; X if Row = -1 then -- since 70$ p( H, h& Z* O3 z
if lan=1 then
& t, S/ l# U, V$ d5 O3 c4 Q5 U promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
4 s! l, y5 q! T5 w to_str("in der Andockstation: \"",?.~.name,"\""));* o# H0 t, z* J+ c) ?
else- h% h* \0 b' Q# P: P
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
0 }; U8 q9 K S1 K+ }+ h: z to_str("in docking station: \"",?.~.name,"\""));
* A1 K* o+ P: j3 k: H2 w( l' h end;( N9 ^7 W7 `4 P+ S* N5 N) K
else
* B& H$ p b- o4 F9 n, z5 | @.Destination := assignLObj[1,row];, w0 ?5 I8 |# @& X* d% q! Z( L
end; & T' H9 G0 s+ x9 O- i
newDirection(@);
* Y( _( a6 n' v. R8 A @.HasOrder := true;" {. \8 p. @) O6 p+ P2 R; U6 I- m
end;" N ~- _9 q4 I8 B) F) ]* A
end;6 {- G5 \: S% r. A- X
end; -- of the method7 s6 t" u. u, Z
|