/* called by: entrance ctrl of the object 'track'; ]! W/ L- S& Y3 ]% _$ Q
*/
1 a7 G$ e) ] e: |, N" |is
* e+ K% N [, _) I, w" v part, GlobalDistObj, assignLObj:object;row,Lan:integer;, j# |' w; t3 \; V: I
do
; U2 y& E) f- G. I0 N" w$ t2 E Lan := rootfolder.Internal.Tools.AOLlanguage;
8 P0 D, a/ h5 m+ }: C0 j" @* c if current = @.Destination -- else return
. }3 @4 p: n: l* V" K: s then
3 O% `6 l# m( |8 o$ y9 R @.Destination := void;
& ]7 n* V& W( a8 C if @.occupied then
+ D( J' z: A8 r- I- p. U! H part := @.cont;
2 m" H' @4 \& z% J$ N' ` @.transpOrder := void;; G6 P8 A3 u! I2 D# K1 l% A; b
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
' k4 R9 B" V8 z/ F, v @,root.eventcontroller.simTime);
$ O6 m ?) M3 `1 { @.HasOrder := false;
3 F3 J, o, m: x& u4 q! A/ w @.DrivingHome := true;
! R8 s/ ^$ K) S8 G( x rgManager.tryToStartTransOrder;! r/ M( g5 v$ G
if @.Destination = void
) T6 i* b& _! Q# r then -- no transport order for vehicle @( S4 @; `! w' |2 ~, V4 C
@.Destination :=% e" d9 u. D* K
rgManager.nearestFreeStation(@,track.~);
8 {# N3 I! D* ^) V1 G& T newDirection(@); / y& s8 e5 c% [; V" e- H$ O
if @.Destination /= void then
3 q o* ]$ o) x% p# o @.Destination.NumReservation :=: y }, f2 T0 i& e2 y2 ]* n5 w
@.Destination.NumReservation + 1;4 U7 ]9 Y. m( R0 g
end;
. }( v: c5 u5 U @.CurrIcon := "drivingHome";% e' y6 M- ^# w( X4 E* w0 `8 @' F `
@.DrivingHome := true;& u* a2 t6 t! E' O
end;2 s7 D9 b1 ] d4 Z
else -- the vehicle @ is empty, both vehicle and part are in the same dock station- H; E! q8 u1 p" Y# i) Y
part := @.transpOrder;& Z% j- l& t. s4 l2 s9 S, x3 C
part.move(@);-- load part
' g$ q% H6 P- l; j& x @.CurrIcon := "load";+ a* e5 e; X& Z- ~, L* H
GlobalDistObj := part.globDestination;
0 l5 s' v* e$ [2 F5 `: \ assignLObj := rgmanager.rgAssignL;& I8 y/ B4 I7 `( R" v- a+ R
row := assignLObj.getRowNo(GlobalDistObj);
& r# b+ M4 Q1 ~4 s- x8 A v2 n if Row = -1 then -- since 70
c) I$ n6 ? g6 [ V- K1 ` if lan=1 then
- A1 ], v6 A6 r% B promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),( n7 s5 `6 i# L% F+ p/ ]
to_str("in der Andockstation: \"",?.~.name,"\""));
3 ^( Y6 w: n+ k( m7 V! @ else
% f( G7 | H; k% N promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),2 L1 Y6 B4 j- o W( y9 G9 c
to_str("in docking station: \"",?.~.name,"\""));
% T, ]/ a6 t, @) w& [' x( @ end;
* Z8 L: Q8 v4 g- d. M( p' h# k else/ _7 \% Q3 B9 W ~/ `( _+ d5 m0 m
@.Destination := assignLObj[1,row];# e# ^; X7 h6 z; M+ q
end;
2 y6 g8 }' w! _4 I* e' c- o newDirection(@);5 K! Q! ~8 h/ _+ i9 ~
@.HasOrder := true;) ?) A$ l4 l: ?8 A& P+ v
end;4 d5 I l: P! H, r
end;
6 a( H+ I/ }* x; {3 I" d, X! }/ @end; -- of the method
4 v8 r! U+ H! F; s/ Q; |: z8 Z+ b |