/* called by: entrance ctrl of the object 'track'
7 L! g( w7 k! T7 z6 Q' u*/5 o w& n5 |8 t! |# e3 x9 K' t
is: w" U& Y! N3 C; M1 V! w
part, GlobalDistObj, assignLObj:object;row,Lan:integer;& l; a" G- Y7 M. M
do
& S, P$ b5 l5 g# q d1 Y Lan := rootfolder.Internal.Tools.AOLlanguage;
% ~ J# s# g% p0 u$ D( Q if current = @.Destination -- else return
9 j/ i& c& x% `4 P9 f* n then
0 `3 I1 h$ Y9 v- I @.Destination := void;. Q& U; \3 p3 A, Z
if @.occupied then) u( Q; K/ ~6 \ e
part := @.cont;- ?$ Z& Z' \) ?( N n! s, P
@.transpOrder := void;9 \8 L/ x; u0 ~) ~: @0 ~
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,7 W0 K% o& g; H4 n
@,root.eventcontroller.simTime);9 G h/ k7 T( m$ |) ~" e' w
@.HasOrder := false;/ M, o( v1 P- Z1 X- q
@.DrivingHome := true;8 ^ q# Y' U9 W) `. f1 I; P/ E \! p
rgManager.tryToStartTransOrder;
3 n8 p' @, ]1 m/ G0 i if @.Destination = void# t0 r- c5 h$ _
then -- no transport order for vehicle @
2 C& B; T5 [2 T( L3 ~ ]8 E @.Destination :=- e6 f1 ~+ ]6 O) ~$ f$ V
rgManager.nearestFreeStation(@,track.~);
: q& x2 \0 O* S4 C newDirection(@);
$ p$ F' m- o, h* T( ~; m if @.Destination /= void then
; o7 h V) e: Q. T) {" w @.Destination.NumReservation :=
r4 g$ p+ h8 b, K% Y! m @.Destination.NumReservation + 1;
: o) |/ T3 w1 b5 @% r) m end;2 w, W$ i3 S a# R7 D# ~5 r
@.CurrIcon := "drivingHome";
' C: b8 |1 E. l7 K. m- s" y @.DrivingHome := true;. i3 R8 E& S* l O
end;
% [6 Y3 c. L3 P* e7 t7 i else -- the vehicle @ is empty, both vehicle and part are in the same dock station
3 [" ?/ a8 l6 Y0 d7 w/ x: c part := @.transpOrder;5 Q1 X/ k6 s# {" _* x7 r
part.move(@);-- load part( ]# }2 W% V- T# P* p F
@.CurrIcon := "load";0 h6 y3 T% V- E# d6 X
GlobalDistObj := part.globDestination;
/ {* Y. j b9 j/ o# P( \% l assignLObj := rgmanager.rgAssignL;& G0 C" j! I3 u) |8 t7 R9 T
row := assignLObj.getRowNo(GlobalDistObj);- J9 `+ L# g( G$ p
if Row = -1 then -- since 70- Q2 A9 f4 f7 I6 H' G+ A$ Z
if lan=1 then
( |& z) Q( {1 G: X) R' y' { promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),0 f2 r$ s4 \, \# d; W9 |8 ?( ]
to_str("in der Andockstation: \"",?.~.name,"\""));
4 V6 [ O1 q5 W8 D$ q4 @ else2 u5 ^) J% B" K% `. A
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
! j: j3 @4 X% I9 R$ ] to_str("in docking station: \"",?.~.name,"\""));
4 ^& c7 u5 s8 j: E end;/ F' D( [5 V- R& x7 v4 F E
else
- g+ U) ]* G, C @.Destination := assignLObj[1,row];
, w: Z* X8 M2 i end;
% j" F) K$ `3 O" t* n+ d: l newDirection(@);# I; L! k$ O: |$ W4 C7 O* s2 Y( l4 G' r5 a
@.HasOrder := true;
2 s7 o- [: j3 o, b2 M# w end;
# L& }+ a1 T m' Z, H0 } end;
& }1 w$ u3 F* u6 p) Y( u+ Hend; -- of the method
0 r# f$ X# G6 Z' X |