/* called by: entrance ctrl of the object 'track'2 P) W0 {. l% o' [3 S$ A8 ?( A
*/: W" k6 g, g! Z7 F
is
; R# B$ V5 J& }9 t3 I' q part, GlobalDistObj, assignLObj:object;row,Lan:integer;
% G# Q% S$ W* a. Zdo+ t8 v) {+ K2 ` p* B" ?
Lan := rootfolder.Internal.Tools.AOLlanguage;
^" Y+ u' _6 | I4 r# I) \ if current = @.Destination -- else return: q' k/ c& n) m3 B* ]0 y; q
then6 E# j2 r$ Y7 y" e7 I5 m# v) p( ?
@.Destination := void;
+ D, g* _+ ~% Q# n: M( y6 u9 c$ k& @% q if @.occupied then
- z0 H9 u& P: d1 g" X( b% w: n part := @.cont;
_$ I* ~ ?. F! C @.transpOrder := void;
4 `- k5 ?3 y m$ ~ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
7 r& E# S5 m" j0 P @,root.eventcontroller.simTime);
% f' N5 |& w. w% d @.HasOrder := false;
- |6 W+ b9 ]& y% E @.DrivingHome := true;7 s$ r6 t, D8 y( C+ M" K6 `
rgManager.tryToStartTransOrder;
( W" q, }9 Z+ Y% i) o# `% p if @.Destination = void
V& X" I/ @$ _2 ?$ O7 ~ then -- no transport order for vehicle @
5 ^4 g7 f+ F `) z @.Destination :=1 s& k3 ^2 Z1 X! a% Z8 W) o* Y
rgManager.nearestFreeStation(@,track.~);
* W* j+ Y3 S3 m( {; S M. Q newDirection(@);
$ w) M* G1 B; R/ L9 q& ]3 B( ? if @.Destination /= void then
+ e! V/ W% v/ e o @.Destination.NumReservation :=* _* }+ }0 W9 A' v
@.Destination.NumReservation + 1;+ _9 G" o, t" l
end;
6 ?9 v' X7 ^+ f/ P @.CurrIcon := "drivingHome";
' Q9 _8 e! Z3 n( T" H# l/ o @.DrivingHome := true;' f" \8 h* R* N! M
end;4 x/ i& O; n2 Z" |
else -- the vehicle @ is empty, both vehicle and part are in the same dock station( C% M0 S! h- V- e2 P. v# D
part := @.transpOrder;- x. y' o7 d- A
part.move(@);-- load part
+ e, s( \6 y+ i1 ]( I5 R( G( n5 g @.CurrIcon := "load";
- i6 ?, N& i, V7 ]; }- Z GlobalDistObj := part.globDestination;. S" Y3 O( ]9 y
assignLObj := rgmanager.rgAssignL;
0 S3 C( T% r* j' q row := assignLObj.getRowNo(GlobalDistObj);& ~5 j$ T$ p5 P. r9 S
if Row = -1 then -- since 70
w+ i0 p8 u C, I6 [$ e) D if lan=1 then
+ t z/ E8 \; {+ @( N. @ promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
3 f. q* [- D6 R( f# N to_str("in der Andockstation: \"",?.~.name,"\""));0 K4 G, [0 f" K, X1 i
else
6 q! M" B" F" L0 B) z/ Z promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
0 R) k7 @6 g5 l to_str("in docking station: \"",?.~.name,"\"")); + U- C5 V0 }) b4 S3 e; U* b: s$ v
end;
3 P- j5 E6 T: `) U else
: T2 C8 p; d4 h: U4 D3 y( H @.Destination := assignLObj[1,row];! \3 [. j) i: T! G+ L1 F8 c
end;
: A- } b. Z+ h0 E newDirection(@);
5 w g6 R; _( o0 C | @.HasOrder := true;6 R. x3 b& J4 Y
end;
9 J' L1 B9 d k end;
; ^( x" s- n: |4 K: `* Iend; -- of the method
2 |+ o6 e) g+ Q) D; | T |