/* called by: entrance ctrl of the object 'track'
7 l8 d1 _- d5 p( z4 D! h% c*/
# a; p; J* s Dis1 Q- f4 ~9 C/ a1 C, p& k5 _7 S
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
/ H7 a* f' r2 S1 j W) U- a( ]1 }do
* ~& y$ q0 ~- l4 ?- P Lan := rootfolder.Internal.Tools.AOLlanguage;
8 W4 s: y6 u& G( z8 x$ O0 z if current = @.Destination -- else return# X) [) ?. i8 G
then# x `2 Q- U1 Z$ C6 Z* z }/ ^! h
@.Destination := void;
3 X7 N7 I8 d- D) l# G# B/ \6 s if @.occupied then/ d( h5 l# E: L7 g+ T- S+ Z3 h5 h6 A( s
part := @.cont;
- F* u% F- g2 j& | @.transpOrder := void; M& {8 d& j+ g' Y3 B
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
6 L: {1 \* @8 q" A% m @,root.eventcontroller.simTime);
2 D9 U& w: f' ]( k& }6 i. V @.HasOrder := false;5 i! n# Q9 q# Y8 B6 i
@.DrivingHome := true;1 S# B: |" p+ R! w) G A9 \* Z* I3 C
rgManager.tryToStartTransOrder;! k- ~; p/ I( G' g
if @.Destination = void3 k1 a2 \: ?8 N9 B4 H
then -- no transport order for vehicle @
( b0 W: R% ]8 L& {4 @ @.Destination :=
. ]. A" p' y0 r# E Y- Z3 F rgManager.nearestFreeStation(@,track.~);
f8 n# r' W+ v2 L+ m newDirection(@); + F& `, b; ? {0 W: ?
if @.Destination /= void then" w& x1 _4 ~% d9 M/ Y# a! A- v+ w
@.Destination.NumReservation :=! G0 j+ _ ]6 ~8 o& ]
@.Destination.NumReservation + 1;9 W1 ^' f# S# a [; [9 C, Q |& h" u, p
end;
3 }& n3 ?5 l+ I5 S5 B: { @.CurrIcon := "drivingHome";
7 h7 C# W4 ?/ v4 U: G' L3 d& u @.DrivingHome := true;% H9 E: L9 I/ w/ L4 }' w( Z
end;3 \3 J0 ^) v3 `0 N4 A0 u( ^
else -- the vehicle @ is empty, both vehicle and part are in the same dock station4 @: m2 G' T# H0 o& o+ X: i
part := @.transpOrder;
7 F5 r% N0 e+ t7 z9 \" @. x part.move(@);-- load part
( B5 [" w0 g% P; q @.CurrIcon := "load";; t5 M. N% k& w6 Y R4 Z7 B- P. u5 Y
GlobalDistObj := part.globDestination;) b) o* S/ F6 d% ~! \( t
assignLObj := rgmanager.rgAssignL;8 Y, N7 b$ q1 t4 f, h
row := assignLObj.getRowNo(GlobalDistObj); r$ O, s3 k5 v6 m" R: y- L/ i8 |
if Row = -1 then -- since 70
: |0 j" ?" i. |" T( R! C. \8 H% N" D6 w if lan=1 then
3 j" @( U5 C" c" W9 V7 T8 | promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
: O( Q9 K" c+ Z to_str("in der Andockstation: \"",?.~.name,"\""));8 V6 @" w1 H3 ~! i$ G8 i
else/ m6 b7 Z+ B) `/ C% x6 ^
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),( n/ G' B$ c- V2 E9 Z/ B
to_str("in docking station: \"",?.~.name,"\"")); 8 h4 b6 |4 O2 F, P1 t* w
end;. x+ |6 t: \* ?8 u1 G1 `
else* y3 }# n, F1 l/ o9 o/ q( y
@.Destination := assignLObj[1,row];( s8 M- S" Y: V; }+ O5 c
end; ! N1 e [$ Z3 S7 i* ^, ?+ J
newDirection(@);: ~6 }( z" s" {4 I- k) U1 ~
@.HasOrder := true;
5 e; i8 H% a* B6 p! |$ t end;3 o7 N& U+ G3 t; U
end;
/ S/ w. ?& {$ t4 \$ j9 B, xend; -- of the method7 W' }0 p# R& J* V# O
|