/* called by: entrance ctrl of the object 'track') G9 g; u Y- r8 Q1 t1 {
*/
% m5 h" i* G: C% v, fis' [+ d4 q4 a2 S: y8 Y3 y t% U" S1 H
part, GlobalDistObj, assignLObj:object;row,Lan:integer;5 D5 U) _* [9 U1 ]7 |9 B
do
( a) K# K6 I; `9 f' ]. v) g Lan := rootfolder.Internal.Tools.AOLlanguage;$ B, T$ H2 p/ b( H% O1 X: T: w% d
if current = @.Destination -- else return7 `( h8 j; J5 w* `* T0 O. F: y2 {$ k
then! `5 ?$ `* Z) j6 J* N0 o. ]
@.Destination := void;
- }, t" p9 C3 l7 h if @.occupied then% ~8 G! C+ B+ k S5 H2 B- j8 S
part := @.cont;
5 m/ \' V( N! ~( k9 d @.transpOrder := void;# A- I# S5 }9 {4 v7 X/ M0 m
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
% o' l# A! x' R* _' i @,root.eventcontroller.simTime);7 O( c; A4 J1 a
@.HasOrder := false;" l }( M# Y/ H' H
@.DrivingHome := true;9 }5 [/ ~5 C) L+ {/ W$ ?
rgManager.tryToStartTransOrder;. j% V3 A, k3 J6 T
if @.Destination = void( c, @; Z9 d7 q+ @0 p r8 E: x+ _
then -- no transport order for vehicle @, R. _; @* J$ ~0 U
@.Destination :=
! v- _0 g2 `4 g3 I rgManager.nearestFreeStation(@,track.~);: X( f0 K$ m- X4 T, D7 p' e; g5 [
newDirection(@);
# q4 a- t3 v& Y0 I9 k if @.Destination /= void then' l; e/ g0 P: x& F1 S2 V( t+ v8 g: U
@.Destination.NumReservation :=" L3 ~; O# {4 x+ J2 _
@.Destination.NumReservation + 1;, b* s0 h) y( ~( m4 F' d& B0 Y! P3 R
end;
6 s8 z D- Y' I/ H% | @.CurrIcon := "drivingHome";+ A" `+ R' e1 Q6 X( X: K5 Y1 j; U
@.DrivingHome := true;
# h1 }0 }( L( o end;# p+ V, b( G3 X7 x2 ?; B. g& g
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
+ A% m3 i, ~. k part := @.transpOrder;7 I- k) [; {& n& C& ?
part.move(@);-- load part
o* d6 O# Q1 \- K @.CurrIcon := "load";
4 Z% ~6 \* c3 d" q! p3 k$ C. S! J2 D* f GlobalDistObj := part.globDestination;$ ^3 z' j# i& `6 z: |- {5 |
assignLObj := rgmanager.rgAssignL;
0 S j" Y( N$ e! p) F9 O$ v- [ row := assignLObj.getRowNo(GlobalDistObj);
" \, e& m2 N1 e! R) L5 k/ V if Row = -1 then -- since 70- n( j" N5 d4 N9 q. V# O6 Z/ I1 }
if lan=1 then
) [/ f# i4 J4 M! M7 V9 ^$ m8 ? promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
: M6 x) g. C0 g! P7 c7 d! ^8 t to_str("in der Andockstation: \"",?.~.name,"\""));- M/ ~ X! G7 l+ q9 X: _! l/ [, x
else( r1 Z* w" i* ], x; d* y
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
; V0 u/ g8 T9 d b# T- k, @ to_str("in docking station: \"",?.~.name,"\"")); / f& ^6 @3 z, r$ U/ ^9 ~; }9 o
end;2 l ~! X! ]9 z4 B7 y6 W% A( N, n
else3 P/ i* V8 F4 b4 C
@.Destination := assignLObj[1,row];8 c/ U% ~! g6 `! ?
end;
( n) C& @# D& @. u! W" I0 d0 I F newDirection(@);
% \, X! W* g$ _1 ^" N/ W9 V' z1 {7 w @.HasOrder := true;
( f3 k# z ^5 ?6 D8 z9 T, M end;, ?; Z, Q3 a% ?* \/ ?
end;
9 b0 Q4 f1 H, eend; -- of the method
6 f1 O* r2 Y0 y/ \# j. [, I( Z |