/* called by: entrance ctrl of the object 'track'
. b5 i8 X# B5 d9 i c) e*/: X& f) V+ P1 J( u2 T4 ^
is
, U( q/ V i& s3 r7 n part, GlobalDistObj, assignLObj:object;row,Lan:integer;
! ?: P' F; {* M% u6 ado8 O: v5 F2 |8 [: w+ F7 i
Lan := rootfolder.Internal.Tools.AOLlanguage;2 |, C$ Z+ ]: i$ f3 V; a
if current = @.Destination -- else return
: B: J# A" d6 W$ B- v& Z then& b$ G" f1 p; M0 o0 {$ N6 [
@.Destination := void;
3 O! s4 u7 I9 S- h if @.occupied then
& X3 g: ~* Y: G x; g part := @.cont;
( B6 T& I1 P3 a* F3 x: L. x$ P0 y @.transpOrder := void;
/ L3 m7 j2 G/ [- B! j part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
7 h1 j3 u2 W) K+ p7 J! ~$ e) h% @ @,root.eventcontroller.simTime);6 z) o' B9 d6 b, \' q& n9 P1 f
@.HasOrder := false; g! K& l |$ e0 A5 d
@.DrivingHome := true;& z1 a! ]- [( j! p2 @7 d1 t. p
rgManager.tryToStartTransOrder;
l* W9 O& E0 O if @.Destination = void- Y" q. V2 F, ~1 f1 s- _% @+ l W: r
then -- no transport order for vehicle @
7 ^! T4 B* x5 e9 ] @.Destination :=9 D: S( D5 l4 U3 _- ]- W4 j2 |
rgManager.nearestFreeStation(@,track.~);' @6 H: ]5 `' U# \7 `0 k
newDirection(@); . i0 K6 c: O0 t" q5 z
if @.Destination /= void then/ s6 ^; H6 m; M8 r1 p. e% h- b
@.Destination.NumReservation :=
" i1 `$ o, B$ I2 M* Y8 ? @.Destination.NumReservation + 1;
& y3 r' ?& ?5 M% V& r/ ~ end;) R( X4 t. N* ]
@.CurrIcon := "drivingHome";( p) J) B ?% D: A: j
@.DrivingHome := true;
V) i8 [6 |1 I G, c6 f! w end;
6 W1 p I9 g' r6 A else -- the vehicle @ is empty, both vehicle and part are in the same dock station
. J* ] f) }6 X3 L, [# f3 m part := @.transpOrder;
6 S" y2 U8 N+ Q! I1 c part.move(@);-- load part) m( B& V# P; U2 J
@.CurrIcon := "load";* W- q5 b+ ]; B- K( }6 g
GlobalDistObj := part.globDestination;
# `& E0 p6 ?: L assignLObj := rgmanager.rgAssignL;
% H$ A( \& [( G m row := assignLObj.getRowNo(GlobalDistObj); ^# ?% d+ ]% C
if Row = -1 then -- since 70
. G5 n) p5 A- L! n9 g ? if lan=1 then5 V# j, k& j3 L+ C; r
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
6 j+ o3 m7 {8 C! Q. A to_str("in der Andockstation: \"",?.~.name,"\""));5 `8 W/ Y' @& O! Y
else8 y/ u7 [/ y, r* X5 z
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
8 l% w* B' Z/ E* c to_str("in docking station: \"",?.~.name,"\""));
6 }4 s1 o4 \& H4 y* ] end;5 m* a9 X K. g4 D) R+ D2 ^
else
' f2 F. t6 w0 {, x9 x3 _ @.Destination := assignLObj[1,row];9 s" V( C% L9 G. \
end; " @ M+ z r% n0 f( D' j$ y
newDirection(@);
& M5 o$ }5 w, {7 i* I @.HasOrder := true;
/ p5 v! ^( {" r/ l, M+ u1 x end;9 c$ ]3 ]+ q6 W: T0 a0 l* W5 v( X; ]
end;
7 d5 Q2 {9 h a. Yend; -- of the method8 k6 z" r8 x5 |% Q5 z
|