/* called by: entrance ctrl of the object 'track'
: S0 `# M( b t2 m5 @$ d*/
+ k( Z: @0 u ~5 ?! pis; a7 \0 J# Q* z6 _
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
1 e( m2 s, o& N+ l1 \- q9 Cdo' _6 C5 {. B% _" P; R; O' e6 m+ i @ q
Lan := rootfolder.Internal.Tools.AOLlanguage;8 c/ k! _5 M. |
if current = @.Destination -- else return
- d7 K4 b2 D: B0 p9 H1 L8 e, } then
& @9 p T4 w; \2 r @.Destination := void;) O" M0 t8 E ?/ [
if @.occupied then# A( w A$ N/ b+ y
part := @.cont;% ~: y0 [$ }) |3 S" O2 x
@.transpOrder := void;1 j! F& Z9 Z: V9 p' M( [- f5 n
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,# R% R$ Z* F6 _( D6 P, G
@,root.eventcontroller.simTime);
. @% l* ]+ x7 [1 d @.HasOrder := false;! Y, P+ {+ [) g, i" f3 N
@.DrivingHome := true;
) p: A# H8 @4 M" k1 T( h rgManager.tryToStartTransOrder;# ]- C0 ]- T. T3 a. h
if @.Destination = void7 d- t- N, O0 ^9 e) C, I
then -- no transport order for vehicle @: j+ P4 I5 Q6 n/ s- t
@.Destination :=7 u6 s- @3 @& e0 z4 M
rgManager.nearestFreeStation(@,track.~);' \- i9 ]0 R, P
newDirection(@); 5 Q! q+ D1 C0 {6 d, N, q7 K
if @.Destination /= void then+ x7 b5 P; l( k
@.Destination.NumReservation :=
7 I2 \* l: I: V @.Destination.NumReservation + 1;
- ?" e' s& f% n' r2 h! _ end;8 s2 y; f! z* W
@.CurrIcon := "drivingHome";
" R, u* E @2 f- t/ v i6 s @.DrivingHome := true;" I% K5 C. i4 a9 S% O+ q
end;
$ s$ p. F" V6 {- M4 T else -- the vehicle @ is empty, both vehicle and part are in the same dock station7 S1 x0 |3 a$ s) g2 p8 j `3 F: I
part := @.transpOrder;
8 G# i% l/ y4 U5 }: u part.move(@);-- load part, _ L7 K6 G" Q$ E' G
@.CurrIcon := "load";
7 E* W0 H& E% w- i/ J. b GlobalDistObj := part.globDestination;
& Y$ a2 W2 a. r- D* T6 O assignLObj := rgmanager.rgAssignL;
# `, K t+ ~4 Y# A2 g row := assignLObj.getRowNo(GlobalDistObj);0 ^- X7 b: b$ Y1 p4 Y& |
if Row = -1 then -- since 70
. j3 }3 G0 |4 p5 q1 z* f if lan=1 then+ s" O$ v. |( t( c
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
) m( z( A3 L6 c( L* k, f: K' ^ to_str("in der Andockstation: \"",?.~.name,"\""));
; A3 B7 W4 E! P5 U else! _8 }! i( N0 K, S/ U5 i3 c
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
3 `' F, D$ s+ r. M$ X to_str("in docking station: \"",?.~.name,"\""));
. S# b8 Y) D9 i2 _/ Z" J end;3 N6 F. w+ ?1 z/ ^
else
1 h/ `# @: S. y" e @.Destination := assignLObj[1,row];; j/ ^; t% l: ^
end;
* h/ T& W5 i6 @. n# X newDirection(@);
& \5 |9 [2 `( o% q$ D0 \ d @.HasOrder := true;
6 K: B" \. `( T* W9 A end;
# S3 i5 M5 S, y( e+ U end;* i8 A) j; O" N) }; f( @* S& K
end; -- of the method/ _1 I" L7 `1 t3 u" o! m
|