/* called by: entrance ctrl of the object 'track'% q- V$ D# {& X' C5 Y7 \* S3 k
*/9 M' Y5 |# U; _7 o( Z8 ^+ y, v
is" M; s% B y' K; I+ o
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
9 |/ z E% ]$ a) r8 k/ U5 M$ P7 E. K) Sdo. z9 h9 I i4 i2 K4 C
Lan := rootfolder.Internal.Tools.AOLlanguage;. d. i$ v, M+ ?
if current = @.Destination -- else return
' L/ T6 g0 c7 U then& P- L. y' W; a1 R I. J
@.Destination := void;
6 D# z: H$ h3 X: X6 Z if @.occupied then% ?7 w: X l1 b% A3 N5 m% a% o
part := @.cont;
; W2 }- K! k2 W @.transpOrder := void;
7 d7 \9 q' G* ~8 A" u3 l7 F3 C part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
5 |1 c- R/ H5 h0 Y! _, h' H @,root.eventcontroller.simTime);8 z) J( i4 h$ ?9 h3 Q
@.HasOrder := false;
7 M# ^" N8 t6 @9 \% z, l @.DrivingHome := true;
7 T6 F( t9 z* X. C3 h8 | rgManager.tryToStartTransOrder;
' q) I& a* K) x9 T if @.Destination = void/ T: g( Y, V# e- M$ n- D, w
then -- no transport order for vehicle @
. K3 s9 J# h# N% B! m9 {+ M @.Destination :=: {- O6 W! N5 X, F( ^
rgManager.nearestFreeStation(@,track.~);' K6 A: {* F9 R" ]& p6 k
newDirection(@);
. [, X# L& w6 v5 V% F/ R1 M if @.Destination /= void then
1 v( i0 p8 n/ P/ x( I, J2 L% ?; _: \ @.Destination.NumReservation :=
1 q' a0 q: L5 J. O" Q @.Destination.NumReservation + 1;
q$ \+ n: Y' ?0 k end;
/ L2 u0 `* o |' y3 P* x @.CurrIcon := "drivingHome";( Z" Y: n- ~( A5 W) E% h
@.DrivingHome := true;
$ f8 o& u2 a7 R* n7 e3 r0 j end;
' M6 x, g2 \0 v# k E7 t else -- the vehicle @ is empty, both vehicle and part are in the same dock station& g: R( t2 q; k' k
part := @.transpOrder;
, |- @& M) g8 y8 N- ]: y+ d part.move(@);-- load part( P5 _& n4 o- d& ?; z- A
@.CurrIcon := "load";
) _8 M* ? d/ W4 |# e; u GlobalDistObj := part.globDestination;
4 m4 e8 T! j4 a3 W1 m assignLObj := rgmanager.rgAssignL;; E/ y- H$ e' I+ @" O4 Y* a9 D* c
row := assignLObj.getRowNo(GlobalDistObj);# x9 }) b! V) [6 u% C# c
if Row = -1 then -- since 70
5 N' g X# F, f+ `$ V o if lan=1 then$ ^: \/ S& [ m
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),5 @) K( t0 w" `- y. u6 h; b) |- J* u
to_str("in der Andockstation: \"",?.~.name,"\""));& P o/ ~: X. | @& z. D
else9 `2 d# M" u8 \0 r) O: Y/ P
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
8 v( Q; k. \: Y, T7 |2 ] to_str("in docking station: \"",?.~.name,"\""));
* p+ o0 i( g$ T, @ T1 v8 h end;
8 ~1 H9 L3 B4 i2 W7 B( Z3 c; H% ~7 \ else, [7 N% S0 [, `2 e+ y
@.Destination := assignLObj[1,row];8 R1 d3 w; z4 e! C0 x$ `
end; : s, k* m5 `' p! f! V+ {$ Y
newDirection(@);! T+ q# `: `" c5 O
@.HasOrder := true;
+ H- U) Q- v, u2 x9 E7 c1 Q end;( A3 D! i' n- q% R# F
end;& n( j4 p ?" k
end; -- of the method
6 h2 j' q$ V2 r. w) m) \ |