/* called by: entrance ctrl of the object 'track'
. T, N$ M/ o" d" p/ E( K*/
0 W5 J% X$ | A* S3 q4 _is/ H2 p6 V" p5 ?; X; p0 H
part, GlobalDistObj, assignLObj:object;row,Lan:integer;* A: |5 M9 k/ U9 G4 q9 n" f! x7 {
do! R- E, V I0 ]& }, |7 `
Lan := rootfolder.Internal.Tools.AOLlanguage;1 E8 Q% g6 S3 S' ?* ^" Y2 X; x
if current = @.Destination -- else return+ } M! Y2 {' m: Y
then) |0 N. S0 V/ H2 `: N9 P* V2 d
@.Destination := void;
: e G6 B7 i7 k% u if @.occupied then
) j2 e- E5 I$ I* _2 B part := @.cont;
5 m" W& ]7 L; h" e, J5 y @.transpOrder := void;( d8 q r# {, y# L3 H- z
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
2 S2 H5 d; o& p: Z4 ?9 `# `8 D @,root.eventcontroller.simTime);, b0 n5 n: J' ~% d# Y
@.HasOrder := false;( U4 j s5 O7 t/ V, ~
@.DrivingHome := true;
}8 m; u: I D/ F. F rgManager.tryToStartTransOrder;8 w- m" K4 t! C: m! Q7 t
if @.Destination = void4 w# D9 H0 A& S5 A4 C* V
then -- no transport order for vehicle @9 \3 i) ^& v9 d
@.Destination :=: h! ?0 k! R8 H: _; R5 X, u6 c# [
rgManager.nearestFreeStation(@,track.~);
! M: x2 }$ W* f0 ~ newDirection(@);
$ s0 }6 c+ }. A: g+ e- K$ Y/ s if @.Destination /= void then
% H. `( N6 O/ F& P! h8 @+ n& K8 X$ n @.Destination.NumReservation :=$ D% |0 x2 m* @, k7 Q
@.Destination.NumReservation + 1;4 U, j' z$ `: {& G
end;
& e; Z8 D/ _9 r @.CurrIcon := "drivingHome";
4 k/ R. @) A% \) }0 E9 u& ~. l5 `" t @.DrivingHome := true;8 ~! A% f2 n& X2 ~. e
end;
* Z/ n' O& k& @ else -- the vehicle @ is empty, both vehicle and part are in the same dock station
. y- }# {8 ?: { part := @.transpOrder;$ Q" v% s+ h0 |' ?7 F, @( W1 B6 i
part.move(@);-- load part
/ Q7 E2 \2 S/ I& U" U) e @.CurrIcon := "load";
6 S5 `$ J+ x9 ^ GlobalDistObj := part.globDestination;
( e: U/ C* a" P2 Y |- t8 s0 w assignLObj := rgmanager.rgAssignL;$ p6 y( S" p. Z( J" d, I/ a
row := assignLObj.getRowNo(GlobalDistObj);
3 A) M3 f- }5 f, O' |- l" [ if Row = -1 then -- since 70
$ `, j$ j9 R* O" V- D8 E, \ if lan=1 then
- M+ q0 N e9 a$ P* T promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),- G; I7 j2 @+ ~& [3 J7 j8 [( J
to_str("in der Andockstation: \"",?.~.name,"\""));
% Q) B1 h& J2 }$ d8 C else
`5 x4 A. u4 C% t: m9 ]8 h2 O promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),3 N1 K5 k ^1 h
to_str("in docking station: \"",?.~.name,"\"")); 7 ?( Q* J1 g1 x+ [: f* p$ I
end; ]" B, [ m0 ~3 g; p9 B& ^
else+ p, W+ U/ p' _7 h6 ]6 L- ~1 o
@.Destination := assignLObj[1,row];
1 W9 a; ~4 c. B8 y3 x @7 G# j end; 7 {1 }) ^7 O& w$ F7 d L9 p, j
newDirection(@);' s8 j, a2 L# ~1 D& V% S
@.HasOrder := true;
# Z, p3 D( Z" y end;
' J. v: B/ ~6 r# p. z- \) M! v end;
4 G+ @- }% \ s* X) pend; -- of the method$ Z( K* `/ P* c* t- E8 b$ a
|