/* called by: entrance ctrl of the object 'track'" y. W/ `3 {" u, X$ e
*/
6 |3 d5 v' l4 n; H9 yis' H- j4 ]8 G" S9 w9 ]( i
part, GlobalDistObj, assignLObj:object;row,Lan:integer;& v( Y' ^ H# m4 i, D
do
( s- T* H# x" @$ K6 _ Lan := rootfolder.Internal.Tools.AOLlanguage;
* P- b. ~' j n- f2 ~0 W% N3 H if current = @.Destination -- else return" I3 [4 P4 p, U7 Y& A5 n
then3 F* d# S/ k2 C2 Y! J
@.Destination := void;$ L+ t X/ O# w2 c
if @.occupied then
6 B& P0 M* }0 I" W part := @.cont;1 o+ _: k! J6 o2 f: m" u
@.transpOrder := void;' z- V4 \1 J. r4 s4 ^
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,* ]; ?# u( s/ y6 c; n
@,root.eventcontroller.simTime);# ^1 l" B% Q7 l7 l' C5 a
@.HasOrder := false;3 i9 d6 ^8 p3 M
@.DrivingHome := true;
3 G, y* q8 I0 M1 v2 Y* ^ rgManager.tryToStartTransOrder;* {7 {5 ~" I' s7 b- W7 D5 s6 c
if @.Destination = void8 Y( A2 j( ^/ e# f+ E& b
then -- no transport order for vehicle @
/ s; I' U! C3 A3 y3 T# Q9 h, g @.Destination :=3 @& M/ \5 L7 A# V' e
rgManager.nearestFreeStation(@,track.~);2 m9 a; {4 ~& k$ A Q
newDirection(@); * p3 |3 S( y9 |8 {- _, G! [3 H J
if @.Destination /= void then
' u, d' b: R6 A0 c `; T" u8 k7 a @.Destination.NumReservation :=6 a/ ~6 a1 u+ ?
@.Destination.NumReservation + 1;+ I% t6 c$ J) T
end;
! a7 d/ }/ c4 g @.CurrIcon := "drivingHome";4 { ?. r' B/ @+ t: Y
@.DrivingHome := true;
1 D/ v: R* c& J! r( y" A7 v1 c" c end;; a) p r! j) _* Z8 c5 ]
else -- the vehicle @ is empty, both vehicle and part are in the same dock station2 d) ?8 p% o6 |! z' u
part := @.transpOrder;
- k# F+ D0 w) Z part.move(@);-- load part* z% G* _2 I+ p" M$ S% f, A
@.CurrIcon := "load";4 ?) M5 P/ e8 e0 s L9 ^
GlobalDistObj := part.globDestination;: g) |1 J( Y& c* Z* R
assignLObj := rgmanager.rgAssignL;$ k- t* C# E9 X+ J8 k, [
row := assignLObj.getRowNo(GlobalDistObj);0 C% s4 J& X2 D
if Row = -1 then -- since 702 H1 \& p$ J# a$ a
if lan=1 then: V, [: c4 d1 D6 Y
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
& Y( v3 }4 |5 } y) ?) j. D% V to_str("in der Andockstation: \"",?.~.name,"\""));
: V' j/ q ~* n" B! D5 ?% E0 V, a1 \ else4 f3 H6 v( `0 z. k2 W0 A
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
; e+ ^, C; A9 G0 v* Y to_str("in docking station: \"",?.~.name,"\"")); 2 t, w" b! ?# X/ ~2 _/ d9 u" i! a; F
end;
8 d6 F. z! e6 A0 V5 V' j else1 f) a. T# M7 w$ Y# \
@.Destination := assignLObj[1,row];
# f# o6 G& M5 r, n& ] end;
& }0 H5 H0 k* \ newDirection(@);
: n- A, e2 n' C+ [# ?5 h0 h @.HasOrder := true;3 ~6 c; v) g- w J
end; P. Y6 n6 x h: n4 C7 s- |
end;
0 a" Q* n3 \: a! M0 u% ^end; -- of the method
5 r1 X. B- j9 n |