/* called by: entrance ctrl of the object 'track'
( {$ D7 H/ m# A*/: Z2 R9 ?( a8 Q9 D1 r5 \
is
) y6 i/ ~$ e% @: Y/ M6 M part, GlobalDistObj, assignLObj:object;row,Lan:integer;' C4 ?% i `0 _
do
4 u6 s, U. R2 y1 B' H- D: A* ~+ t Lan := rootfolder.Internal.Tools.AOLlanguage;* ~' k8 Z6 X3 s2 h
if current = @.Destination -- else return/ ^: j1 l- Z" G0 x! u
then
1 F. [9 Q! g2 h2 ^' m# R @.Destination := void;1 \! g& L8 u. E* _3 h6 r" g9 k
if @.occupied then
6 K7 S0 I2 i2 ?& _$ m# E8 f0 p part := @.cont;2 K0 P! N+ B q- z' j5 H
@.transpOrder := void;* J; o4 |, I0 w' T" Z \7 ]
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
* ^# m7 ?$ I! L/ ? @,root.eventcontroller.simTime);0 V' ?( i% X" }) f4 N% D
@.HasOrder := false;* m, t0 P9 Q6 Z# K x
@.DrivingHome := true;$ ^8 @( g i' m& f) E
rgManager.tryToStartTransOrder;
- i) O# g0 ^8 a3 _" y if @.Destination = void1 ^! G" X$ w$ t! W6 |
then -- no transport order for vehicle @( _+ T' D- B* A. T
@.Destination :=. a; v2 b7 }# v/ o$ |. u( U$ |
rgManager.nearestFreeStation(@,track.~);) X' w" Q0 o5 q: I$ O
newDirection(@);
4 K' H: S# x G2 U if @.Destination /= void then1 Z" p7 v* `( \: O8 g& B2 ^; e
@.Destination.NumReservation :=& }9 Y' e, n7 X: T3 ?4 O2 A
@.Destination.NumReservation + 1;! Z+ B& e+ _5 C+ p- U
end;" b2 C% ]! `0 s6 A$ L C
@.CurrIcon := "drivingHome";
! [$ Y, t6 S1 f* P. @9 v6 U/ A" N$ X @.DrivingHome := true;
+ F+ {, s, N* l7 T0 N end;
- y8 p3 [& A" J else -- the vehicle @ is empty, both vehicle and part are in the same dock station l, K1 t" m' N$ M. V8 g; ~
part := @.transpOrder;! @8 N; v% C( C9 i* `% Y
part.move(@);-- load part+ U6 e! [: _% b6 G& T8 p- Z7 d
@.CurrIcon := "load";
9 e/ E3 o0 U" W t GlobalDistObj := part.globDestination;2 K$ h6 I; R R; B, B
assignLObj := rgmanager.rgAssignL;
* N/ I* Z+ g' C# P row := assignLObj.getRowNo(GlobalDistObj);" K2 M. Z" Z/ ~5 M0 ?1 k: I3 B" g
if Row = -1 then -- since 70, x P7 s! [) a) o/ y* L
if lan=1 then
6 m5 g' A0 q% D* Q* d promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),0 p/ v* e; h6 ~4 N' x
to_str("in der Andockstation: \"",?.~.name,"\""));. J7 V3 C$ _3 J, D9 B- ~
else3 I6 }2 U* ]8 u. Q
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
. @/ S2 h: f) y7 { to_str("in docking station: \"",?.~.name,"\""));
9 G5 T, L# W2 j+ h; J6 O" x0 C end;2 f$ k0 }9 X& [: s6 {% c" u
else
: w9 A- R* N _& @0 ~8 L @.Destination := assignLObj[1,row];
6 ?: `3 C" h$ l! \0 R1 n end; 0 U* E. w. a: e4 \& n
newDirection(@);3 {; l* h2 s$ e! {( g
@.HasOrder := true;/ O4 p4 l- g7 [# j( O9 W
end;+ b0 I2 H3 j( c; T2 f0 y
end;
8 c% a6 v3 _2 \* e# J: Yend; -- of the method
/ ?- J2 T6 k2 V/ N, m9 D |