/* called by: entrance ctrl of the object 'track'
w9 ~" C" C, x8 |3 I# r" c# c*/
; k1 ^5 h7 z6 z( N) z+ ois
' ]8 x: B2 g% r, V part, GlobalDistObj, assignLObj:object;row,Lan:integer;* M+ b. M" a- H) I' d' }8 t* j
do* D6 B- ^" W {5 \/ }4 N7 K5 d
Lan := rootfolder.Internal.Tools.AOLlanguage;+ R6 w9 h4 f4 i+ g$ {$ G% d
if current = @.Destination -- else return
4 J- U0 X9 P+ j% R0 a* k then: `( O& [* v; {/ B) K* h
@.Destination := void;: {, r) g1 ]6 ^- D+ d
if @.occupied then7 X$ K! p! o: H0 X: i
part := @.cont;, t; F2 V3 p- W- P0 F
@.transpOrder := void;+ Y/ v/ y5 D$ v. [( c2 a9 G' e
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
/ A' p! \, V$ s! s/ h6 f) [4 S- t/ u @,root.eventcontroller.simTime);
3 U( Q- A, o/ S$ p: Y+ X, [$ d @.HasOrder := false;0 h9 {9 F& @! m( F& U
@.DrivingHome := true;1 A3 ]( B+ K+ p. |$ O7 l2 Y" w+ P7 h
rgManager.tryToStartTransOrder;
/ x0 ^' V, n6 z2 C* T" Q( Z if @.Destination = void
. N9 R4 T: s7 F+ \5 G( d9 B% e; {( I then -- no transport order for vehicle @
# M( {" }$ z: e @.Destination :=
8 I2 j b$ `! m; \/ t rgManager.nearestFreeStation(@,track.~);% ~' U/ n* i- y
newDirection(@); # J( ]$ ^' b; f# f% I
if @.Destination /= void then% a* e' ~+ ]8 {' X4 O
@.Destination.NumReservation :=* n4 G# W. n ^
@.Destination.NumReservation + 1;# n( I9 X- ^2 E" `
end;
; o" j8 F6 C9 _ @.CurrIcon := "drivingHome";
0 `- \5 K Z" n7 U5 \/ z @.DrivingHome := true;7 j# c* f4 p7 V* |! ^
end;8 r5 l6 {0 o" V% w5 y' B
else -- the vehicle @ is empty, both vehicle and part are in the same dock station3 n* A: A# Z: q/ b, x, B
part := @.transpOrder;
, m4 [: ?( v, ?7 D. h: e part.move(@);-- load part" w- j1 l, p) D
@.CurrIcon := "load";
7 \ y/ C' D6 W7 O GlobalDistObj := part.globDestination;5 Z4 V, I# E5 C$ i0 \. {
assignLObj := rgmanager.rgAssignL;* L" r) j+ a' D# T7 m
row := assignLObj.getRowNo(GlobalDistObj);
0 o; J; \& i/ u( @ if Row = -1 then -- since 70& }* @8 e+ ^, M9 I4 t. \
if lan=1 then% f5 j- J3 b( V' }! n
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),! X- n1 F: e( _+ g+ b
to_str("in der Andockstation: \"",?.~.name,"\""));
+ F. }3 e: p9 Z a& x, M' } else
7 e5 G3 P& r# u0 m8 K* l promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
3 H3 Y! P. q+ b7 q' I0 e to_str("in docking station: \"",?.~.name,"\""));
7 l5 }' B8 u) {; y+ v. M end;0 f* \* y" d- t% n0 Z
else
2 r* I1 n1 ^6 ]9 r @.Destination := assignLObj[1,row];
* u0 g' o$ {4 G0 e" ]: e end;
J1 M3 P- j1 }. d+ M( c newDirection(@);" g/ r" B, r4 f
@.HasOrder := true;
2 N4 J c' \' k end;
# r7 \! U( \0 M( x# a end;
' w) w3 k3 e7 v9 ]1 {end; -- of the method9 Q; m6 S; e0 m2 {. M( D6 S
|