/* called by: entrance ctrl of the object 'track'
& U# a% I) q" c" c& t9 c+ @*/' n$ Z1 V( r7 A, ^; z
is
& _. ]7 ]7 a! Z! I8 ^% V part, GlobalDistObj, assignLObj:object;row,Lan:integer;# A/ j: _& B, u7 |
do
5 v6 a, D$ @4 X* @8 k- r Lan := rootfolder.Internal.Tools.AOLlanguage;
5 y; {5 M& T/ Y# { if current = @.Destination -- else return
% M3 @' _" y$ E) ~ then+ w/ | x$ z% S( `6 f' y. I) E
@.Destination := void;
, R# ]" U& S( A5 d' b if @.occupied then
" t3 E" I6 `3 a1 }8 \ part := @.cont;! p5 C) R; O2 N' o% D$ F
@.transpOrder := void;& ~: x) O: e( j4 p' u& d2 y
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,6 | r5 m5 O' x/ ], l( T" B
@,root.eventcontroller.simTime);6 @# i8 ^( h% i+ X
@.HasOrder := false;" O% q9 Q, a" y# v7 k, i, P
@.DrivingHome := true;* \4 l( R# b7 \, M' D! f& L
rgManager.tryToStartTransOrder;
6 N/ ?' a* K. R; H+ `$ e0 e if @.Destination = void0 j5 I/ @3 }" v2 i. I8 Q3 ]; {
then -- no transport order for vehicle @
6 G$ x! T3 U/ [: r; N! i @.Destination :=, R; q. `8 U8 S
rgManager.nearestFreeStation(@,track.~);2 ^; c/ g" _- c4 K3 g1 L
newDirection(@); / I4 g9 g+ J& c# }0 M' A
if @.Destination /= void then
# ^( A& A( V" j2 n$ p" @ @.Destination.NumReservation :=+ L0 X2 R8 z$ k- p
@.Destination.NumReservation + 1;
* O( f9 B9 D& r4 S" G end;- J' Y$ m9 M, [$ L/ n2 m
@.CurrIcon := "drivingHome";0 A1 H3 K" z$ P, i# h9 x9 J
@.DrivingHome := true;" c4 ~8 `7 E* `8 J# ~
end;
% r: h" M: g4 A else -- the vehicle @ is empty, both vehicle and part are in the same dock station0 V( K5 A2 `7 X! ^6 L2 c# \" X; B+ S4 n
part := @.transpOrder;0 p( W. e$ s- ]: U t4 r
part.move(@);-- load part0 U3 i, `2 J, A$ i
@.CurrIcon := "load";5 k5 ^% G6 T/ O% t; R/ ^9 Q# m! P
GlobalDistObj := part.globDestination;
# `9 T, E/ n' J/ P Z1 Z assignLObj := rgmanager.rgAssignL;) m6 Q/ m1 E% W
row := assignLObj.getRowNo(GlobalDistObj);
6 n1 ]. f/ `: ^+ j+ m: K& d if Row = -1 then -- since 70( R' Z S4 t2 D; P* K: n5 ?
if lan=1 then
9 ~/ |% B) o; T8 O, f promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),1 e) o; V& D/ a9 e* ~% o
to_str("in der Andockstation: \"",?.~.name,"\""));5 j9 X) i7 G" |8 ?8 F _
else! M6 g4 [* x7 |& F! \
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
* `6 B* P0 P- D3 m" U% a4 ^ to_str("in docking station: \"",?.~.name,"\""));
- n2 L Y/ n2 ] end;/ \7 W8 @' P4 v- K3 E: ~$ \/ G
else
b* C) T( n3 e' t8 N @.Destination := assignLObj[1,row];, j& K9 p/ M [
end; 8 n3 G9 R) s& L& d) t3 `9 n
newDirection(@);
& N8 j6 W* D9 q5 B- } @.HasOrder := true;3 ^2 N, u: z8 J8 x
end;! `3 W6 ~. C; l
end;+ T7 m, b' d% `# H* z1 j8 t/ y1 G
end; -- of the method5 E8 j8 ~) u( u- R8 h$ D
|