/* called by: entrance ctrl of the object 'track'
4 P1 C, A* i6 x9 i*/) ]4 E$ g% L5 W2 P4 I7 M8 K4 i0 G
is3 n2 W4 |) K8 [+ w8 W. R3 A* c
part, GlobalDistObj, assignLObj:object;row,Lan:integer;, {0 ^% P( m5 I0 k0 r' r
do
, N9 G4 `) }4 ? Lan := rootfolder.Internal.Tools.AOLlanguage;
N8 z/ y5 y" c if current = @.Destination -- else return1 @2 _; \+ P6 \' ?
then
& ]1 [3 ?, Y) a% \( x @.Destination := void;% V2 p' j: _2 M1 h) G# Y
if @.occupied then! ?- a y2 M0 ]1 [) R9 Y v- V
part := @.cont;
, [/ s, C8 _& C/ k. P7 C @.transpOrder := void;
2 H# x- s! B+ ? T2 v' A# f/ d# | part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,; o1 A# |; E4 t
@,root.eventcontroller.simTime);1 e4 j/ f1 [- y# o- A6 G
@.HasOrder := false;
. r% L1 _; P/ p7 L" y5 u4 l @.DrivingHome := true;
. ?0 g/ {( s, b" i/ X0 Y" x rgManager.tryToStartTransOrder;& \" ~7 e) J( o1 I5 q& E/ [
if @.Destination = void
& ] @) I6 [2 [2 f1 k, B; R then -- no transport order for vehicle @; R) Q7 z+ H# g/ b
@.Destination :=4 J6 l# U; b' \) v
rgManager.nearestFreeStation(@,track.~);) F( A$ J1 R5 P& R; X$ g( L
newDirection(@); , ~) e/ w1 ~$ i6 C# H6 a- @8 Q6 `6 s
if @.Destination /= void then
( Y6 P. S3 j( J: G% q- Y: I7 J6 b @.Destination.NumReservation :=
+ {" @0 M6 Z$ Z' z2 w3 w6 r: }' k @.Destination.NumReservation + 1;
4 e5 k0 z, q/ w$ Z$ P- p end;
; b0 B% e0 E* p( m! i/ H+ V+ s @.CurrIcon := "drivingHome";
) S+ Q6 S# d3 E; e/ o( a/ K& ~ @.DrivingHome := true;
1 c) C7 K! o$ U9 J# Q end;) K! k/ X, ^% V* O
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
, c3 d; R! o6 @5 a3 X+ g8 z part := @.transpOrder;; ?/ `5 y% b. d y
part.move(@);-- load part' w# u) X! ~" }. m- a8 L
@.CurrIcon := "load";
2 v) `0 D! V- S1 f GlobalDistObj := part.globDestination;
1 `. G9 a! a" |, D( h4 W! d assignLObj := rgmanager.rgAssignL;
* n3 }" m8 q$ K+ k: H+ X$ C row := assignLObj.getRowNo(GlobalDistObj);+ T0 }9 m ]8 A, [5 X
if Row = -1 then -- since 70
( Y1 C: A* K7 I* ?! M) d" W+ a if lan=1 then
7 h, c8 D; ~# m5 P o promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),1 Q1 t" q6 M2 G5 r+ I0 ?- q- T/ P
to_str("in der Andockstation: \"",?.~.name,"\""));( ^% ^, }2 w( \1 ~# t
else1 o: k! l1 Z6 R* g7 G/ t% v
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),3 Y* ^: x" Q/ P! c5 K! c
to_str("in docking station: \"",?.~.name,"\"")); ) X( B0 n& n+ j; P# r% A$ G
end;
/ @ D' r, k. k) }/ s! ^ else
7 M% G: C- o. Y( G$ u+ }, d @.Destination := assignLObj[1,row];
3 _% s0 [& m$ A- S4 _2 k end; 3 V8 Z: X# S/ e$ b" j" Q
newDirection(@);
; y+ m' d+ ^& g @.HasOrder := true;- e$ N7 x k9 p% M4 P/ y/ ^5 {3 Y
end;
: G9 l& z8 f' w4 s2 I end;$ b( B0 o7 S/ ]% T$ i2 q+ o
end; -- of the method- F/ Q+ A" r. I- k
|