/* called by: entrance ctrl of the object 'track'4 j1 ` R7 }- C( f/ o) J) {2 W: N
*/
% y {, _2 [- Sis( Z/ D1 X( J& k: R" k
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
) L4 ^! P7 ~: X0 v3 ?: {; }do) g; X0 @0 o$ E% W/ B
Lan := rootfolder.Internal.Tools.AOLlanguage;
- B/ Q# C8 G& K if current = @.Destination -- else return/ |, t w7 G. \) s
then
+ Z( t' S' p+ L0 T& X F @.Destination := void;
" B9 }. d5 r* j+ Y9 Z, P if @.occupied then
, J" Z/ y* `% G part := @.cont;
% O6 _; p' e. d4 f9 d @.transpOrder := void;
! C) @" f, S& e- s9 N part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
. ~) ^& V8 p# P, i+ u; d @,root.eventcontroller.simTime);
6 z- R: n/ p* h% V* {+ w" {, K4 o @.HasOrder := false;
# G( t! k! P) \/ d% K+ j @.DrivingHome := true;
2 F5 e! R$ @$ ^" q' b5 V rgManager.tryToStartTransOrder;
# Z3 u, U5 _) V s% Y" m if @.Destination = void1 ]" y4 r( _& l7 p3 k
then -- no transport order for vehicle @
; P4 N6 w) d6 k- f6 Y1 M @.Destination :=* M7 E3 P$ X9 }! G: D- Y+ h
rgManager.nearestFreeStation(@,track.~);7 [: j) Q$ V6 v7 I+ Q& f
newDirection(@); 4 F7 N# @" M1 E- o
if @.Destination /= void then. }/ J. K- J& Y! R
@.Destination.NumReservation :=1 l$ O4 A4 L! [ U
@.Destination.NumReservation + 1;
3 d, {" ^/ K7 } end;
( ?9 V w3 r. R( s2 |5 W2 V7 {, ~ @.CurrIcon := "drivingHome";8 }4 V; b7 } e0 B7 R1 {- o
@.DrivingHome := true;
' }: m4 k5 e, z0 h) P5 B end;& k& w2 |; }& j) \: r3 }
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
, @- P, I& Q C! l" i part := @.transpOrder;
1 B5 `& Y9 j2 f- l part.move(@);-- load part6 d4 H# \& t( X
@.CurrIcon := "load";
, Z) P& Y7 s% a% w9 G' s GlobalDistObj := part.globDestination;
& {; U8 E V% ^9 c$ V$ ^ assignLObj := rgmanager.rgAssignL;) b" e- k6 s% E. d
row := assignLObj.getRowNo(GlobalDistObj);
. a) Z' [6 W1 O7 \& B if Row = -1 then -- since 70
5 S" Z, s2 B: o if lan=1 then
. E( A9 D% z7 V/ {$ O% c promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
- j# {8 z; A& C0 } to_str("in der Andockstation: \"",?.~.name,"\""));
' H7 e6 M( y2 V8 y' b# e/ I else
4 b) E- D# [/ D7 X* I, F0 l promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
7 E0 ^ |( c5 C+ Y to_str("in docking station: \"",?.~.name,"\"")); " n3 O* d( `7 `9 q+ b
end;
h( n. ?. B: d) d8 o+ ? else5 g4 P4 a1 c' a5 Z
@.Destination := assignLObj[1,row];9 Z& P4 @8 d+ C2 ~
end; + A& [5 u O6 X U, f
newDirection(@);
! E5 m5 {/ U! l/ e% h" H @.HasOrder := true;
" d( d3 V- M) C3 V' X end;
- ^' s3 X5 P" E L end;
9 @6 [( I6 z% y- u; `* w% {end; -- of the method
9 M) X7 t7 {1 o7 z1 b |