/* called by: entrance ctrl of the object 'track', H- Z/ |6 f5 u2 K8 ~$ ]9 q
*/
s. o6 Z' r! P7 |0 J# ^ nis2 |. X5 _: i6 S9 u, J
part, GlobalDistObj, assignLObj:object;row,Lan:integer;& d( P x: ]- U
do
6 P9 ] A6 |# V6 ` Lan := rootfolder.Internal.Tools.AOLlanguage;
q9 ^' y) z: |* f5 @; k$ t6 s if current = @.Destination -- else return* _' b! ~' t/ |
then: u# T9 Z* j, w/ h6 @( h
@.Destination := void;' m3 Y5 K& Q9 B+ g7 S$ D0 E4 s6 w/ y
if @.occupied then A% i0 i% R0 B4 K* `, ?9 ^5 ]
part := @.cont;
, v& x* y- g9 \: p3 x @.transpOrder := void;, D5 ?! b6 M0 N! }8 a/ m; [2 d" g
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,/ p9 ^4 K1 F+ R, f+ M5 H6 ]/ U! d' Z$ p
@,root.eventcontroller.simTime);7 H6 M* B E# j, M: i6 j5 R
@.HasOrder := false;
; C% B# R, Z+ t @.DrivingHome := true;; z |( d8 t4 a. s+ l
rgManager.tryToStartTransOrder;
/ w/ _9 b' ]2 R& C% ~! c# V0 Z if @.Destination = void
7 Z+ b/ @( o8 A# M; X then -- no transport order for vehicle @/ t. }& Y7 J, [; \( @8 r9 P! n
@.Destination :=
, V3 P+ I. b7 N rgManager.nearestFreeStation(@,track.~);# i/ g1 l+ m9 n
newDirection(@); 5 z8 |6 s7 [' e1 g4 v
if @.Destination /= void then
& r3 S' D4 h5 u. W @.Destination.NumReservation :=
9 f! o4 j) k) K+ ~+ }. s) a( [* R @.Destination.NumReservation + 1;
3 L$ r0 v- f/ F& E end;6 \; A6 G+ a3 u8 i
@.CurrIcon := "drivingHome";3 p3 X# p2 V# j
@.DrivingHome := true;
: i" h& {# ]5 W0 [; K. ? end;
; l! v! o4 q. w7 g6 U, ~2 O else -- the vehicle @ is empty, both vehicle and part are in the same dock station
| d' L+ H( x part := @.transpOrder;
T: S/ l, D2 V- j- l9 ~2 W: E3 l7 r part.move(@);-- load part7 E2 S9 s+ s5 |; e
@.CurrIcon := "load";
6 i" a. {1 d) |6 R" d6 h& s GlobalDistObj := part.globDestination; Z6 B' F7 R6 u( j
assignLObj := rgmanager.rgAssignL;
3 m" \0 m* w& ~8 z- q row := assignLObj.getRowNo(GlobalDistObj);& }! i3 ?4 q% u5 E
if Row = -1 then -- since 70
( B" D$ {% ]& K$ K9 e3 j/ ^ if lan=1 then
% n' | p6 o8 V Z# ~ promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
- W5 @3 |* S4 { to_str("in der Andockstation: \"",?.~.name,"\""));8 S4 b2 L, z' i' E
else; d6 K4 c! ]; u( P+ |4 O1 N8 @
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
1 A( R- }. t8 K; R7 Y to_str("in docking station: \"",?.~.name,"\""));
9 o+ g* F# c1 y" D# ^ end;
5 T9 \6 `2 |, P. v else2 l+ C3 D! c# X. E1 f6 B3 D
@.Destination := assignLObj[1,row];
0 x* E$ [* B) e) S- e end; / K5 G K% a" v& s
newDirection(@);
$ [8 G* j- h5 C1 Z: a5 ?0 T' | @.HasOrder := true;
0 B) a9 K0 b% V end;
+ s3 s5 C& m% _5 z' l end;
. Q$ N5 y9 ~ R9 }# a" ~end; -- of the method% c5 p/ t! J; D* _: D6 p9 Q, Q7 Q
|