/* called by: entrance ctrl of the object 'track'
+ B: ]9 A, s/ d*/
# r- ]% m+ T$ @2 i: k2 A8 Tis
7 N. e% R+ P q2 A- ?% Q6 s3 k part, GlobalDistObj, assignLObj:object;row,Lan:integer;6 e, p5 N# F5 I+ h5 e# ^
do
. e1 A; W" q# p; \ Lan := rootfolder.Internal.Tools.AOLlanguage;
- L! W% l7 x" r if current = @.Destination -- else return
: w4 N& r1 g+ n8 _ then
+ q/ V6 H5 [. i @.Destination := void;
6 m$ O# q" O' w& g if @.occupied then
* I0 @: Y: y' T; ]8 j d% X& r part := @.cont;$ P1 l/ G) W8 D/ J
@.transpOrder := void;% M. C- d$ g- G4 \) g
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,8 L. F3 d2 f: s. b" {: w
@,root.eventcontroller.simTime);
1 J9 x4 _1 u- @! S7 n. K) r @.HasOrder := false;0 T {+ R3 L; a# U$ e) h3 V
@.DrivingHome := true;' j) w e4 @) V8 D$ s, X0 L7 \
rgManager.tryToStartTransOrder;
2 i4 c2 W7 N8 V2 @ if @.Destination = void
) s3 F6 ^ m% [ then -- no transport order for vehicle @
* l f' r( k/ }1 R @.Destination :=! J, Q A! B8 l2 W; y- T
rgManager.nearestFreeStation(@,track.~);
" U. \& J* I. s7 r r- Q4 R. _ newDirection(@); 5 e5 Y# V3 I3 O8 l
if @.Destination /= void then7 H$ J+ q( J# `0 r* `. Z
@.Destination.NumReservation :=, g1 W) I9 Y+ ^& y' D ~/ @
@.Destination.NumReservation + 1;, y: D5 J( |$ ?5 L Z0 @' p9 x
end;8 y0 w7 @$ p2 U* h* ^
@.CurrIcon := "drivingHome";$ U8 f& Y1 }; r! }
@.DrivingHome := true;
6 c5 o( F, H* X; q end;0 H i! @2 e0 X+ O: W
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
4 o, U& T2 S) R. m, i1 E part := @.transpOrder;2 }' s* V# O! r6 Y
part.move(@);-- load part4 W! X' D& v, c$ H- A
@.CurrIcon := "load";
0 I* w! V- R. q6 h2 g- z GlobalDistObj := part.globDestination;
; {: t' g% Z7 S0 @ assignLObj := rgmanager.rgAssignL;
+ ^5 S" t6 n7 N$ b% d; Y row := assignLObj.getRowNo(GlobalDistObj);$ [+ l! c$ X% Q
if Row = -1 then -- since 70 \5 C6 M) l$ a; g
if lan=1 then
9 [+ l4 ~% j' I$ C) G" j+ W promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\"")," f$ z+ O/ ^6 s$ e
to_str("in der Andockstation: \"",?.~.name,"\""));; s M' X* ^: l9 a. A
else
4 r/ N6 D1 J; I3 [& I1 ?3 x# E* U7 c promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),- k- x9 P; A7 _! \, S3 y
to_str("in docking station: \"",?.~.name,"\"")); ' ^" _$ Q6 Q3 g, h
end;1 |; Y( ^9 Q; X* m8 n4 D
else% y$ Z- t) Y2 K
@.Destination := assignLObj[1,row];4 K- j1 ]0 y, p' s0 }/ M
end; ) W4 {7 y0 F* `/ {
newDirection(@);4 R7 }' v }3 ]" i
@.HasOrder := true;
M2 C% U4 d9 D2 r! D$ h end;8 O8 f: _( C% G3 f/ p
end;9 H3 D" {! w( v5 M6 e* N5 H# c6 o
end; -- of the method
5 g$ Q8 |( N3 g" }0 {# t& l |