/* called by: entrance ctrl of the object 'track'
* D/ G- p5 @8 X* _*/6 V% G/ V' i# n, X6 G+ s" ]% a
is+ S9 \3 I1 e, N* X
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
1 J* M0 M" B; Zdo
" ?5 e2 ~/ H' `2 n7 M j Lan := rootfolder.Internal.Tools.AOLlanguage;
7 P ^( R) ]. \, i, y& v m2 w( m% W7 a if current = @.Destination -- else return8 q+ x+ j. F( O" E+ x5 J( @5 N& ^+ U
then
6 z2 w* s( i9 r, _9 w- e @.Destination := void;+ H0 P% V$ T" R8 z8 I" M3 }6 S
if @.occupied then
( u( v/ k9 M- R' y part := @.cont;9 X* B# w6 k2 {
@.transpOrder := void;* x) S5 m; u7 {. X! @: N! b
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,6 [! j6 F, R; l* Q, J3 ?5 u& T" d
@,root.eventcontroller.simTime);
& o' y8 O) C/ B5 C" r @.HasOrder := false;
& U, t& a: H# D* I/ |/ N @.DrivingHome := true;
% O& F t" N* \1 e6 C6 t' D) S$ X rgManager.tryToStartTransOrder;
. A8 x$ a+ q9 z* z/ \) i: ~- B if @.Destination = void
! J$ M7 F: G8 r9 m8 K2 t6 o1 O then -- no transport order for vehicle @) F$ {9 y8 ^( @! R
@.Destination :=
$ y. f# o+ U3 R4 f( s2 v; ^ rgManager.nearestFreeStation(@,track.~);
# R1 \: a- D1 e: Y newDirection(@); . u& D0 B* ?# v5 ]9 q' f
if @.Destination /= void then
w8 \ Y+ P) n6 d @.Destination.NumReservation :=
+ i* Z3 \- u% ^4 w( M @ @.Destination.NumReservation + 1;1 U2 C- [: m4 x5 V/ W# P A% X8 F
end;
" ]" n1 P# S) B. [ @.CurrIcon := "drivingHome";
# P% d; r7 G0 R: i$ F( n& H @.DrivingHome := true;" W3 l: L3 o. V1 {& K, ~8 d
end;
$ R" Z7 g: w% C" l3 M else -- the vehicle @ is empty, both vehicle and part are in the same dock station
5 I, k+ c8 _7 l2 }$ z part := @.transpOrder;
2 x" Z; X% U8 X part.move(@);-- load part8 L4 C& ]* z/ g
@.CurrIcon := "load";3 m/ e& F9 v) c* Y! \6 @! F* y
GlobalDistObj := part.globDestination;5 @( U5 I" R9 L. V, H/ ]7 l9 @% J
assignLObj := rgmanager.rgAssignL;; {7 i4 N0 n3 J3 d" W
row := assignLObj.getRowNo(GlobalDistObj);2 N/ t9 w/ ~! `! q6 @2 W
if Row = -1 then -- since 702 g1 n) b* _% F$ }, _
if lan=1 then3 P8 }( Z/ A1 O% J
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
* x9 C/ d" ?+ i' @ to_str("in der Andockstation: \"",?.~.name,"\""));
& Q7 H: T" t- V' C7 A+ `2 J else+ f+ Z% u7 m- ~$ d! ^; G/ e2 c$ J
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
6 n5 r! |* e5 d% z, r to_str("in docking station: \"",?.~.name,"\"")); 6 w7 e+ W& _) q Q& z
end;
; ?+ c5 v1 R, e% v4 o# _' g: x else
! [5 Z% w5 }/ i. p! w% | @.Destination := assignLObj[1,row];
% w( U( b* L9 v0 B end; 2 y# X) w, {& g$ Q
newDirection(@);
' N* H% P ~; P @.HasOrder := true;
2 r1 Z( ^0 d. K" X: F( a end;
: V9 U1 V* M2 I, n% ] end;
. p9 u& h( \& A2 nend; -- of the method
- y1 ?+ Q; F& p! P" L: w |