/* called by: entrance ctrl of the object 'track'
, M6 t; j$ Q$ E( @*// l* z" V$ g) I9 x9 o
is: R; V5 N$ I$ x& X
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
, ~$ @+ _" n% u. J9 Ldo( o: a1 @( b4 O
Lan := rootfolder.Internal.Tools.AOLlanguage;6 k, n: |' v: T/ a' ~, q
if current = @.Destination -- else return# h4 I1 l4 ~+ r9 x x
then
# u8 @' T. P( |$ {7 B) S @.Destination := void;
* o4 K5 {1 J6 w! H if @.occupied then9 l* K. C2 B, c2 e7 H9 I; z$ J
part := @.cont;* _% ]8 C$ h/ b( k% F
@.transpOrder := void;; f1 ?# \9 |4 B. \& K! I3 p
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
1 u c, s4 Y Z! w, X# ? @,root.eventcontroller.simTime);
$ g# M. f0 H) u- f; \! G* R) ], L @.HasOrder := false;& Q9 f( A/ L( f) `: u
@.DrivingHome := true;
' g& k3 W% q% C. p+ J6 {$ I' P rgManager.tryToStartTransOrder;* M, }3 g$ l' y' Q9 i
if @.Destination = void8 M8 z' o( }; ~9 d- p
then -- no transport order for vehicle @
' V2 y3 f1 T: \' o6 V @.Destination :=
2 e% V+ e0 u& n9 m rgManager.nearestFreeStation(@,track.~);
- @, C3 t6 _& @7 T$ ]' F" q; M newDirection(@);
! I ?9 ~: J; y5 m( }+ k if @.Destination /= void then
; z/ b6 x1 L& u7 g: N: M0 ]- a @.Destination.NumReservation :=7 V3 ^0 ?* W& R3 Q
@.Destination.NumReservation + 1;
: S) U$ f% X& @& v0 d+ z# r end;
$ v" P2 U3 W; Y1 _0 f0 Q3 U @.CurrIcon := "drivingHome";
% j' k& T# _3 Z) U3 Q! X8 D @.DrivingHome := true;# v5 A0 M% g G* t k
end;+ W7 s A: u# w$ t$ q( Y
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
% M. `/ p! y0 f9 u part := @.transpOrder;; y0 S9 B- [6 U
part.move(@);-- load part
0 @6 p( c' r$ p @.CurrIcon := "load";: m' p( y3 X* g0 W8 V' c9 ]
GlobalDistObj := part.globDestination;/ Z1 D- O6 o1 d
assignLObj := rgmanager.rgAssignL;
3 o9 h1 C3 ]% } row := assignLObj.getRowNo(GlobalDistObj);
6 d, F1 L) g! X) h# @* `. t$ B if Row = -1 then -- since 70
5 z5 L) P# [* a" c+ J9 n1 z if lan=1 then
8 f# B# E/ [) q3 ^" j# u promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
1 A+ Z3 |! q; Y; S0 n to_str("in der Andockstation: \"",?.~.name,"\""));
4 l: S" w& W: X9 p5 I, `$ F" _/ _ else+ }5 r' i& g9 x+ b/ t
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
" D; ?# i# D2 K3 Q* r4 N to_str("in docking station: \"",?.~.name,"\"")); ! v( C/ E0 h# e; a5 h
end;
8 r1 G9 s# x* _( t4 t* J' ? else
- k) L6 i6 B" A/ h @.Destination := assignLObj[1,row];+ z: o+ K9 P$ s6 V* z# ~/ U
end; \, L: w6 \5 f8 r( g" q% }
newDirection(@);9 |, i* S" c5 w5 C
@.HasOrder := true;& U, _& X5 N2 C
end;
! F3 d. S+ X- l5 \ end;
/ m4 @$ r7 D+ P5 Hend; -- of the method7 e% H# e A h9 k$ Y
|