/* called by: entrance ctrl of the object 'track'0 T x0 G4 ~& n# D9 B- j7 _" d. _
*/& E# K7 N$ E' D6 b) f
is
w# }7 e6 q. n part, GlobalDistObj, assignLObj:object;row,Lan:integer;/ ^2 L9 d U! g$ n7 r1 o
do
' E! t( {9 b3 W Lan := rootfolder.Internal.Tools.AOLlanguage;
1 v9 ^# I/ b7 ^/ O: j3 ~ if current = @.Destination -- else return
& G* u+ j8 C! W2 q: ?4 g then
, P# a1 a ]4 H, n8 X0 N @.Destination := void;5 K' Q' c p+ ?0 u% f! o
if @.occupied then; R: p* ~# o( r& k& P9 i7 G
part := @.cont;! ` D% U& P( j- @% Y v! `
@.transpOrder := void;- c& C; x& c8 c9 X; [
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
; B) w# T+ a& F! P6 d2 w @,root.eventcontroller.simTime);
L: C' Y9 U$ }- V @.HasOrder := false;3 M; G" {/ S1 U6 V8 O
@.DrivingHome := true;
( }& G0 L& q4 ^3 J5 v rgManager.tryToStartTransOrder;$ k, d3 \- h4 U/ \# P
if @.Destination = void/ n, V& _6 b0 D& \& d$ I
then -- no transport order for vehicle @
) i2 T! y! |& M( u; _6 s0 s- N! R @.Destination :=9 K3 _3 ?! u# k5 ]2 a
rgManager.nearestFreeStation(@,track.~);
) |5 y- E/ V) z9 B0 ] newDirection(@);
: o: W* w; ?4 G! x3 [ if @.Destination /= void then
" V0 ] W% h, ^; t, F. {& d @.Destination.NumReservation :=
^# F2 M. Q A. D @.Destination.NumReservation + 1;
$ ?, c* [: L3 b. a# L end;) F5 x$ j/ a9 K. }+ X
@.CurrIcon := "drivingHome";
: S# @; {1 K4 @( F @.DrivingHome := true;
* k' |1 S$ y; n/ o end;
, C# E8 _" \( U else -- the vehicle @ is empty, both vehicle and part are in the same dock station7 A% ?( I4 ]. ]* m9 A7 G
part := @.transpOrder;
# s, B# H- D% ~/ f( X& M part.move(@);-- load part. N1 w- l& m) j+ W6 s
@.CurrIcon := "load";
! J& R6 i6 C* D5 b GlobalDistObj := part.globDestination;& O1 ~* s* E' K Y( u7 D! {
assignLObj := rgmanager.rgAssignL;
6 @: F8 y1 v0 r9 N# y1 u row := assignLObj.getRowNo(GlobalDistObj);& v6 v6 P j" H& d L; F" K4 q4 Q- }
if Row = -1 then -- since 70
% M. i( E0 A$ F if lan=1 then
7 m( ~; ]6 ~! F w/ P8 E6 ? promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
8 J# W( ]* y8 f- s) e to_str("in der Andockstation: \"",?.~.name,"\""));1 u4 w3 P; x) |
else
' d2 O& l3 g$ x* H3 V% F2 ?6 j promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),8 P% t' u& }+ l [3 e+ N$ Z1 L
to_str("in docking station: \"",?.~.name,"\"")); ! `; B8 R2 d" x& T* H% `* f! |
end;
: S# o0 G8 P8 f& p2 p else
5 z) p9 K6 o1 o6 Q @.Destination := assignLObj[1,row];
% v* J3 W3 e6 T end;
+ m/ A* a' S. |7 Z$ { V! ^ newDirection(@);6 H2 ~7 b9 s' n/ b3 O p, ^
@.HasOrder := true;
# t- @; n3 K; j$ i end;
# a2 [) F1 y* k k end;& E( d5 h/ v# Y- A* `8 s
end; -- of the method9 E/ \1 ~: b! ~8 \2 P F+ F4 m
|