/* called by: entrance ctrl of the object 'track'
6 S1 L7 l) s9 d0 g*/8 G% C3 T: O3 [
is n7 p: {2 b; P7 o
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
" p- Y& D u9 t; c Udo
7 j- T- }( Q* ]9 @ Lan := rootfolder.Internal.Tools.AOLlanguage;
, n( b4 l$ k" ?, x2 G' x if current = @.Destination -- else return. a6 j8 w6 k" y( s8 E0 g- N! j7 I& `
then
P& `" z$ o$ k @.Destination := void;
, w# A* h$ E. e/ C3 x. W if @.occupied then
* `6 h8 f$ R( Q: ~$ |3 ~+ l part := @.cont;; p4 e8 B+ Q& a7 W1 i4 C+ { J. C
@.transpOrder := void;
: a$ z/ F/ I4 l: C2 K part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
. b3 a0 b- B! |8 m @,root.eventcontroller.simTime);
) K4 V0 z/ v6 D+ _3 x' b @.HasOrder := false;
/ f, ^/ v& d9 o- I @.DrivingHome := true;
! n, m, j7 v" }' D5 c+ x* V$ D rgManager.tryToStartTransOrder;. i! Y+ A8 `/ ~' Q* I, y
if @.Destination = void
! M1 D/ j9 c6 i) c7 M/ M) O8 m then -- no transport order for vehicle @& d/ `9 x5 M4 {5 ~0 k
@.Destination :=
4 {( F6 F8 \/ |/ C rgManager.nearestFreeStation(@,track.~);
. i$ y! w7 n1 G1 i) w, W; l8 R newDirection(@); 9 c9 v. q% P+ S* k K
if @.Destination /= void then2 v. d3 m3 G# i& P+ S
@.Destination.NumReservation :=
) {5 ^$ J) ^* s3 ?# ?' h$ E @.Destination.NumReservation + 1;! m' `# w, u. q) U4 e
end;
6 B& H7 }; e+ `! h5 R5 X @.CurrIcon := "drivingHome";1 g9 {- H9 K+ a: B) \5 W# Q3 |% X$ z
@.DrivingHome := true;
* ^! V% \9 z& A% ~" G- k end;0 p( s: X# b7 S
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
6 U: u% Y: W: t$ p" v5 N: B. ~ part := @.transpOrder;
6 D3 y3 O4 Q1 B# G part.move(@);-- load part
P4 \. g3 f- {* b3 V9 [% I @.CurrIcon := "load"; ~, Y# `: Q8 G. s- n% K, m
GlobalDistObj := part.globDestination;0 n/ G" ]* Q) u% X& x; P, {
assignLObj := rgmanager.rgAssignL;
- P" q, l3 b: b+ ]$ A row := assignLObj.getRowNo(GlobalDistObj);
2 V! j4 } J" N if Row = -1 then -- since 70+ Y3 {+ P" b- T. |$ ^% g) h
if lan=1 then. c: Y0 F/ v, u r7 a- A
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
% ?8 O6 N, X& Z7 V* f to_str("in der Andockstation: \"",?.~.name,"\""));/ r# Y% F: a8 V2 l6 C
else
; F3 _% k; h2 @% T& A promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),8 X$ ^& z; ^$ U+ D
to_str("in docking station: \"",?.~.name,"\""));
% m6 i9 [! v- P7 N( K$ m end;
; x. q/ ?8 g3 i! ?, z; i. C! ^2 h else
! j8 l: @( j8 R, I1 D @.Destination := assignLObj[1,row];
* z) W: w& y* k3 P2 P end;
* ?, N+ @' h- L7 V. p! p$ ] newDirection(@);, Y, S5 J0 T# q7 H' H4 u* K; G0 Q2 \
@.HasOrder := true;
6 k; K& Q0 \0 o; h$ v& E end;
" c# i# ]: O6 r' X* Y6 V1 n, L4 q end;
( V K% r& P) ^1 E2 b; O& Xend; -- of the method2 T8 l) X. I! R; }7 r# J* o& R
|