/* called by: entrance ctrl of the object 'track'
7 J: e# ?0 J& Q( f4 B: C*/4 Q4 q: G; M8 `2 r9 ^
is
- Y3 U" f5 v% u part, GlobalDistObj, assignLObj:object;row,Lan:integer;
8 ~, I% F- f. p+ m- zdo
8 a! m& ~/ i9 q Lan := rootfolder.Internal.Tools.AOLlanguage;, ~0 p; d6 N" r9 |$ s7 {
if current = @.Destination -- else return. f8 I6 `' k2 n1 W
then* s# I; w' u6 \$ E+ n0 o: x
@.Destination := void;
B& v& \( q* ^+ s0 t% P+ [: { if @.occupied then g9 S! `3 P' P' X
part := @.cont;' ?( s7 ?/ l* r, l1 v% q- V; O7 s
@.transpOrder := void;
! A* w' t' q4 W% V% W part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,6 N0 |% k$ P! v- J4 o7 X
@,root.eventcontroller.simTime);! B" J1 J7 w* f- \3 h0 p! J7 i
@.HasOrder := false;
- ^, V# a, a$ y) T, o @.DrivingHome := true;' ]/ o% @/ X$ [ x }; z! o1 L
rgManager.tryToStartTransOrder;
' ?( J) D4 C! J if @.Destination = void0 f0 I! l; p+ M8 ?$ o0 k
then -- no transport order for vehicle @+ A) V- |# O& J: L& t/ B. N$ ~
@.Destination :=8 m# n) a9 A. \' {5 \
rgManager.nearestFreeStation(@,track.~);2 ]+ I, O, l/ p1 ~
newDirection(@); $ S- R, H) k5 [* n8 w" J) F+ B, T
if @.Destination /= void then0 j7 d( D8 g+ g' m* R7 `
@.Destination.NumReservation :=
- D1 {6 d5 |; v3 d1 v6 s2 v @.Destination.NumReservation + 1;
4 N& d9 [7 N } end;
8 Z3 }5 w1 | ], } @.CurrIcon := "drivingHome";
: P# W% E; g i) b; t0 D @.DrivingHome := true;
# L$ I1 j: O5 z/ ` end;
! S" ]1 v9 c i7 G# e else -- the vehicle @ is empty, both vehicle and part are in the same dock station! N/ f! a4 ?/ D8 \" t, s$ A0 s& Z# I
part := @.transpOrder;
6 S+ l8 s8 C" q: j+ d5 Y! { part.move(@);-- load part! v2 N; k4 |' G% V' N. w
@.CurrIcon := "load";1 T" ]& r. o1 U% {: t9 D! K
GlobalDistObj := part.globDestination;2 z! G! ]9 g' A: v
assignLObj := rgmanager.rgAssignL;' x) ^) Y( g6 e+ z& b* N- o
row := assignLObj.getRowNo(GlobalDistObj);7 l5 j& @* i& [! a! B' ~! z* O2 w5 B
if Row = -1 then -- since 70
/ |+ j; n* u# v* J4 ] if lan=1 then
/ U7 R4 f: q2 r promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
$ d' S: r% z) S to_str("in der Andockstation: \"",?.~.name,"\""));
8 d2 [: R' q/ p) c else
% [" q" g+ L6 k' z# v( p9 W2 p promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),0 J. O' p1 g: j }& \
to_str("in docking station: \"",?.~.name,"\"")); : m5 ~. V% y% e0 u& ?. Q7 m
end;7 \8 g5 z3 G& [1 f4 k- B$ @
else3 L0 P( U" a3 m# i( N( W
@.Destination := assignLObj[1,row];, J$ a1 n5 M5 S, C) R
end; 6 E# E" M. C: g' j0 c6 T y
newDirection(@);, x6 ~) I3 p) d2 D8 ?7 a& i
@.HasOrder := true;
; W3 [% p \5 U' N; }# U" m5 }+ b end;: e9 c: Z! m; L3 P+ P6 k$ w
end;
, @7 f8 }. _" i" q( _, K2 X9 y1 b' kend; -- of the method$ p0 W+ `4 ?7 j7 V% z
|