/* called by: entrance ctrl of the object 'track'7 N- b: i8 O' p9 \8 _ d) e
*/
6 R4 ~, R" U3 l6 D2 E8 @- lis. Z/ V1 r) [8 z: I( G8 u
part, GlobalDistObj, assignLObj:object;row,Lan:integer;' h2 p4 H: n4 b C4 ]8 Y
do
- @5 e, I: S( X- |, W6 y* x Lan := rootfolder.Internal.Tools.AOLlanguage;
0 \: @( k; g9 C7 O/ H# { if current = @.Destination -- else return
. ?" \5 q0 l- j% v4 a then& X' S: K+ W" r
@.Destination := void;
) d$ u6 T4 E: u! O if @.occupied then
( P5 K' x$ k% p( j part := @.cont;/ j. P/ v) d1 j/ M' ~/ x
@.transpOrder := void;/ b% u2 k. S; t* n* a7 N6 J9 O$ [
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
0 A* A: q8 D1 v: D8 H _6 @ @,root.eventcontroller.simTime);
' q. i/ ?: ~: G" j q9 M @.HasOrder := false;) N: V2 T. |9 e* t% W# H* I
@.DrivingHome := true;2 Z6 D% P" ~6 q1 g( j T; C
rgManager.tryToStartTransOrder;
1 h) y5 T3 d% |, }3 K. X" k if @.Destination = void9 A B8 t" f7 Z b
then -- no transport order for vehicle @/ a0 f2 K% @+ S0 f
@.Destination :=
* |% y5 l! [+ M$ n" P; p" X! {+ c: g rgManager.nearestFreeStation(@,track.~);% p. Z2 Q3 f+ a. F7 m
newDirection(@); / ^ n6 v: E0 s: X8 ?5 t. T! q
if @.Destination /= void then5 D( X& N% W. a2 l, ?1 T8 L6 H* h
@.Destination.NumReservation :=
- c* ?: G. f7 h; P* V, \ @.Destination.NumReservation + 1;
1 ?0 A5 E* K- N, l end;
9 t+ B- W, x- u, a @.CurrIcon := "drivingHome";% ~6 e$ ^7 \2 t f8 N8 G$ H" P
@.DrivingHome := true;: }& W4 j: l9 m$ W/ q* u* z9 c
end;
5 K1 ~: M) ~) f- A- T- y. H" g7 \# P8 [ else -- the vehicle @ is empty, both vehicle and part are in the same dock station* ]5 ?' C, l0 e! V. g
part := @.transpOrder;
' }" Q+ M5 Z; u' A) E part.move(@);-- load part
0 A) K6 A/ _1 f0 N7 ]6 D8 l @.CurrIcon := "load";
7 ~1 I( I* ]) |2 z5 S# l GlobalDistObj := part.globDestination;
8 _3 ?0 x4 W) f- _3 t. j assignLObj := rgmanager.rgAssignL;: _0 a5 g5 \# L. @2 N4 G' Z) x$ x
row := assignLObj.getRowNo(GlobalDistObj);
8 b. o1 L* {4 r K! o3 Y4 k/ S9 n if Row = -1 then -- since 70
8 W, Z0 X, y. b if lan=1 then
: m/ d" T+ P; t6 I* Z3 ?+ J% P promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\"")," f* Y R' L Q+ ^! l% F6 A' K
to_str("in der Andockstation: \"",?.~.name,"\""));5 u8 A# M" G1 W3 c& ^
else( n4 X0 {& f G) S% l
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),) L7 a+ U3 m: ]& w
to_str("in docking station: \"",?.~.name,"\""));
% d' V0 ?6 R$ Q4 v" i& S end;. X8 j7 G9 ^4 ]5 Y N# s. ]
else
1 T+ I, P# z" o$ \; q' W x @.Destination := assignLObj[1,row];
: i9 o& J" }6 |6 m1 l) Q) f4 g. d7 K end;
# E& T+ c* f8 S6 W/ E newDirection(@);
8 D8 ^( ]6 G' I' t @.HasOrder := true; S' ]1 t+ N( N$ w& D
end;9 I% K1 R. W! X# c% Z+ {5 u1 }2 e
end;6 ~, B% b& u p! _% @0 |" z
end; -- of the method7 h3 g. P6 r9 F) V# V
|