/* called by: entrance ctrl of the object 'track'
: i! ~& H& v+ S- `, [2 F5 L, \*/
9 z% P$ {* s. _3 ~is
5 S ?# q2 V2 A& a part, GlobalDistObj, assignLObj:object;row,Lan:integer;/ Y V# r6 B% w( u6 P- I
do8 s) R1 w5 i- y9 G
Lan := rootfolder.Internal.Tools.AOLlanguage;: T7 D1 q! h# M& o5 F& t5 f+ C
if current = @.Destination -- else return" i/ e2 v" Q# v# }! {$ }4 o i
then
# k t7 t7 w$ N# G7 _9 ]) W3 D- D& ` @.Destination := void;( z6 w- [: c) n9 ^4 B
if @.occupied then/ q* n/ P% C! X* s% c& \
part := @.cont;4 O, k4 D9 d; F: r' b
@.transpOrder := void;* N P+ H4 X) i. Z
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
7 q8 s [4 P. [" O# f& [% Y @,root.eventcontroller.simTime);
, l* H/ K2 N/ `" O! M @.HasOrder := false;
0 I( e7 g& d: Z7 K @.DrivingHome := true;
0 h) ~; e# F/ i- r3 v- O rgManager.tryToStartTransOrder;* D; C9 l9 e, w+ n
if @.Destination = void
& @% e0 f7 n3 ^, s8 b! k then -- no transport order for vehicle @8 J- P5 G2 y8 x) D: r- y1 k
@.Destination :=
& J4 [, I4 X& q$ i9 A. R rgManager.nearestFreeStation(@,track.~);6 n' Y. {/ p1 g6 v
newDirection(@); 2 X& a, y/ o1 m- m9 L
if @.Destination /= void then
9 V& b2 Q% y3 V- W- l# Y2 d @.Destination.NumReservation :=, s. M3 w G2 O# a2 h1 y
@.Destination.NumReservation + 1;) x: U: |0 h, T$ m0 Q2 [
end;
; M1 A4 m$ F7 Q @.CurrIcon := "drivingHome";, D( i/ J( B k* T% z8 D
@.DrivingHome := true;
6 K6 X; Q) `3 J5 ] end;7 ~+ x9 x6 t2 j1 \5 O* o9 P
else -- the vehicle @ is empty, both vehicle and part are in the same dock station. c- t$ Q P. Q& O3 m/ v
part := @.transpOrder;
; t$ y( j& l/ S. n part.move(@);-- load part" x5 {' W# J. C3 F
@.CurrIcon := "load";, ?( ^. }' R) Y" {
GlobalDistObj := part.globDestination;
D M2 S: k9 q5 r assignLObj := rgmanager.rgAssignL;
- L. R$ J. B5 _; z8 K" q, a5 F row := assignLObj.getRowNo(GlobalDistObj); v! n0 z1 N7 R) b' j5 J
if Row = -1 then -- since 70
7 @5 `3 k! Z) o: A if lan=1 then
$ Z" z2 r& Q" h' w3 s8 v6 a promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),7 L% ?8 }" n- ] _+ ]0 r
to_str("in der Andockstation: \"",?.~.name,"\""));1 e/ ?9 [8 O% j
else: j$ i+ L' u2 M% i
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
/ x; J) S c( S( {0 m$ G/ a to_str("in docking station: \"",?.~.name,"\""));
. |2 [' m$ C% ~/ q end;
8 ~. p1 `( ^1 b* |% p0 m else
+ w7 ?8 }; l; S2 @0 s* M- h @.Destination := assignLObj[1,row];
) A t0 X3 ^1 l) [+ x; H5 I1 y end;
! J" N) b8 [( ]& k newDirection(@);- X: L" ?9 c! Z
@.HasOrder := true;
8 W6 f, f) {% D5 \+ y end;6 b2 Y, p% ?# o& P
end;
$ Z. w& E8 l h- Pend; -- of the method
7 Z3 n" G* S- n: f |