/* called by: entrance ctrl of the object 'track'3 I' o1 O% E, |) p8 V
*/
8 v' s- w' [- `6 D2 }( uis$ u: o6 `% C: O7 F) t
part, GlobalDistObj, assignLObj:object;row,Lan:integer;8 L$ O" M. [* g( K- s2 C6 ~' q5 C/ p
do
, z7 L4 p( O2 q- V0 c2 P Lan := rootfolder.Internal.Tools.AOLlanguage;& a9 z5 h1 P$ q m3 W8 G
if current = @.Destination -- else return
+ F+ T V2 S9 G' ^+ w& h+ h# K- H then% u# P, Q% s) x
@.Destination := void;, Q4 F2 M/ I8 C6 W8 e3 L& [
if @.occupied then
7 O" R! q( J$ U part := @.cont;
) S! p: R6 W9 ] Y8 X @.transpOrder := void;( D7 K* Q$ O9 Y# h6 }+ C
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
# Q* i( P. G; |1 D0 V @,root.eventcontroller.simTime);4 Y( F) f. M6 e, N: |# S ]9 g9 i
@.HasOrder := false;
7 V1 [+ @) z7 F6 I @.DrivingHome := true;- [& a- ]- b& Q' v
rgManager.tryToStartTransOrder;
: ~; W/ z0 T; ]# ^ if @.Destination = void$ e" I9 j$ Y, x5 X O" F% ~; {
then -- no transport order for vehicle @8 p8 b! F' w7 b5 g2 \# T
@.Destination :=, j+ u* Q" j. t
rgManager.nearestFreeStation(@,track.~);
" L9 R9 S# \/ I. l# j newDirection(@);
) R) b; Y- ]( I, W if @.Destination /= void then5 } R2 k0 [5 e
@.Destination.NumReservation :=$ D$ I7 t8 s( L) Q
@.Destination.NumReservation + 1;1 Y9 L7 Z$ U+ V0 _6 i
end;# v g! h9 M3 \7 `) H$ n/ Y
@.CurrIcon := "drivingHome";# j3 F5 e r2 ^# j4 H
@.DrivingHome := true;$ E2 K) _$ q: _, J5 B* b, n
end;
v( M" E% g' { else -- the vehicle @ is empty, both vehicle and part are in the same dock station7 h4 t- v5 v o
part := @.transpOrder;. H* ~. _4 Z$ w7 ]1 x
part.move(@);-- load part/ N; i' M7 g) c* {; Q! c
@.CurrIcon := "load";
3 [! W' \# z/ R9 j) \/ j5 r4 Y: h0 D7 Y GlobalDistObj := part.globDestination;
4 Y, \" M, c: ^* f1 J) W7 O assignLObj := rgmanager.rgAssignL;, z/ D% e! A% n% F+ k, x
row := assignLObj.getRowNo(GlobalDistObj);! ]" G- w3 F$ {1 ^2 C
if Row = -1 then -- since 70
+ {$ |$ H; D- W# O if lan=1 then
0 H; y+ {' _% G' `" J( m5 s3 C promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
1 I% t9 S! f1 R8 }& F to_str("in der Andockstation: \"",?.~.name,"\""));
# P& s0 s, h. h/ g+ q else
- F3 Y$ e( N( m4 ?( m! [ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),9 g2 d/ I: |! l! F. K
to_str("in docking station: \"",?.~.name,"\"")); 9 o2 c# M" V( g9 e1 p0 L2 j
end;
9 Y$ L- _$ e: Z6 k+ n) `& V else8 ]5 W7 ]7 N+ N) ?
@.Destination := assignLObj[1,row];4 r% i- g& q4 ~8 `" z) R3 O
end;
) o& m; |, e' L( E G, M newDirection(@);
0 a. R' m4 p8 |3 F+ E/ U0 S5 C8 R/ r @.HasOrder := true;1 @. s- O' K4 a J
end;. G) e; P6 M; v1 F8 p) n( _0 d
end;
& M0 L; M) A* Z* ]( Yend; -- of the method; \; a4 G q2 R) A# P3 r. U
|