/* called by: entrance ctrl of the object 'track', O2 j( s+ e$ B
*/
7 y' }0 b* f) `0 ?1 E; w8 Sis
" g0 c+ g. S9 X& m- v2 X. r part, GlobalDistObj, assignLObj:object;row,Lan:integer;
0 d' o' K7 c! ]8 [/ k' Xdo# ~ a8 s' B, U' X: F5 U( }
Lan := rootfolder.Internal.Tools.AOLlanguage;. H, F1 J* f6 {5 [+ F9 ?8 A/ A/ b
if current = @.Destination -- else return! J( J o! H1 W, `6 H
then
5 R# I2 R5 z: U$ J( s, h' G6 D# j6 h @.Destination := void;
% s l1 L r0 X" {$ c if @.occupied then
. i% y8 \$ l* n9 Q. c2 a part := @.cont;: V% _- V# z4 R: }8 a
@.transpOrder := void;
4 N) }, ~" q9 M2 ? part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
% e. `& n2 _1 \* q @,root.eventcontroller.simTime);. w; W+ S) d% N3 R6 f8 O
@.HasOrder := false;/ e5 s" @, b$ N8 }
@.DrivingHome := true;
# V1 x/ P1 |* R0 V( U4 H; r rgManager.tryToStartTransOrder; \! c. O/ O, _3 V9 p; Z; P
if @.Destination = void
" `4 T; f( x8 N# I+ p+ \3 t then -- no transport order for vehicle @$ P. P( [) B# t2 K( p j8 J
@.Destination :=, }% {& g/ O, r8 ]
rgManager.nearestFreeStation(@,track.~);
: |) K+ a) Y& v newDirection(@);
" @* r x2 E* i if @.Destination /= void then
/ j7 _3 f" Y, C4 A0 `' k @.Destination.NumReservation :=" Z8 c7 g8 F, ~; x( J/ g
@.Destination.NumReservation + 1;
! a2 n! j% m: K( h$ U3 v end;" i+ A5 O1 ~8 x* D, b
@.CurrIcon := "drivingHome";$ g# u* I! U* p( b1 F$ K- [
@.DrivingHome := true;
, a( h% [$ Q2 G- {$ }" M end;
" [+ H- u; M) k* K* W5 \/ h( D else -- the vehicle @ is empty, both vehicle and part are in the same dock station* u( n$ n( m$ F4 U+ h! C# r) a
part := @.transpOrder;- a: d- Y: C. g9 S2 g
part.move(@);-- load part9 d. [4 L- a, o* n4 R3 i2 P
@.CurrIcon := "load";
* O8 l* U; s; g& f/ w7 g8 h GlobalDistObj := part.globDestination;
/ M* g( x0 p' @& i Y assignLObj := rgmanager.rgAssignL;
( ~# a$ W; c! p% i3 K row := assignLObj.getRowNo(GlobalDistObj);4 ~6 U# \' T; b v5 \
if Row = -1 then -- since 70+ }( _ [# J+ r7 q: H9 L
if lan=1 then" c# u M5 n: q
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
" ]: C- W3 x7 h/ N' k0 g to_str("in der Andockstation: \"",?.~.name,"\""));
2 z" G' r& X0 h; c$ V% a" B else
# ]; Y' N$ ?0 S ? promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),! O1 G; E2 i; q5 M0 i8 f
to_str("in docking station: \"",?.~.name,"\""));
: N. g, c% K ?& } end;; v/ e0 a2 u1 X9 b+ @& q) Z1 X
else
! B7 N( z6 g* D @.Destination := assignLObj[1,row];) t& p) f) \7 r2 H; e& _0 [, E$ X
end; # d$ [1 X1 k4 X
newDirection(@);0 ~- R& ]# f% h: e2 E# o1 e/ Q
@.HasOrder := true;! `+ G8 w1 }. w* D2 K
end;* V; C0 d. W' X* }: e
end;# N' z/ I9 W- V" \6 x D3 b( p
end; -- of the method8 L5 o* p( E; e) F
|