/* called by: entrance ctrl of the object 'track'- S( p2 @7 ^. ]/ }
*/9 }4 K$ ?3 g5 Q! _% p& o6 z3 \& a
is3 U& G7 [1 J: H/ S$ |
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
0 z) U% \7 R' X, V. @do
7 ^8 r/ b' j. h- |, W1 Q6 \ Lan := rootfolder.Internal.Tools.AOLlanguage;# [2 f% d v& V' N
if current = @.Destination -- else return- z3 C4 r* X6 |" S
then
" W/ D* c+ o/ H @.Destination := void;% ^- t4 Z, K6 B- a I. T
if @.occupied then/ V% A. k; k: k$ h7 B
part := @.cont;6 c' J" r$ S& d# u
@.transpOrder := void;
8 s$ I& X3 ^% r. R5 L) g part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
/ T3 S; Z+ ?0 ?# u. i/ \2 x @,root.eventcontroller.simTime);
2 t9 ^3 O g+ M7 K+ U @.HasOrder := false;
; n+ L3 l8 G$ r4 u' s- D. O, ~$ i @.DrivingHome := true;; F5 s; w# J1 C" f' @/ w7 i; t
rgManager.tryToStartTransOrder;* l5 ^# A1 b' P- M6 V, T% a
if @.Destination = void
: K& l6 k0 e3 M/ Z( ^, y5 w then -- no transport order for vehicle @# V5 W+ W4 j' d) r6 v
@.Destination :=
8 C3 [, l" s$ f0 G) ^3 j, v# e rgManager.nearestFreeStation(@,track.~);
- U7 o- j! @/ j newDirection(@); 4 O) W0 f2 q# K- A
if @.Destination /= void then$ X7 j2 g( n$ e3 j# |5 k& e9 R
@.Destination.NumReservation :=. j8 ^8 E6 Q" D4 o! Q: n! I
@.Destination.NumReservation + 1;% O* F/ G1 g& F$ z
end;9 C- |7 L' Q$ T
@.CurrIcon := "drivingHome";
" y) t2 X. W9 o' K: x @.DrivingHome := true;
1 G' q G" M" f4 o end;/ y: A: |; ]2 \8 e' j
else -- the vehicle @ is empty, both vehicle and part are in the same dock station8 d, L n( b9 z, ?2 Y4 L
part := @.transpOrder;5 p) p# F0 @/ q. q/ w$ r# F
part.move(@);-- load part
# ?6 u! V6 P" c/ _1 m( C+ G/ k T @.CurrIcon := "load";
8 ~4 Q$ L2 V4 b8 p# D" n1 ~" x9 B GlobalDistObj := part.globDestination;
8 S1 N, H( X: f assignLObj := rgmanager.rgAssignL;% F' [ i+ ~- Q! E
row := assignLObj.getRowNo(GlobalDistObj);0 W4 x" n2 s& {
if Row = -1 then -- since 70- D- b: t+ ]: q! g3 J+ U0 V3 L4 b
if lan=1 then5 {( w$ g& \7 \$ v# S9 ^: e8 D0 d: G
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),0 M0 A, S! ~9 U% o& u/ k( s
to_str("in der Andockstation: \"",?.~.name,"\""));
" a5 P- q- O5 c% Y! T0 I0 P' r9 I else
. j4 z9 i* I. F/ Q) r promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),' R* |. H/ U9 |
to_str("in docking station: \"",?.~.name,"\""));
+ O5 W/ r+ {) ~$ o( e end;
" I8 v9 Q+ a5 g7 @! m3 g E0 _ else
# E$ A! v3 V, ~' N/ Q4 E @.Destination := assignLObj[1,row];
* k7 W4 P* U. i4 E' a; ~ end;
; H& ~8 \) b# z# ]; m3 D" r newDirection(@);" t! J) J1 }5 B# E- R3 G
@.HasOrder := true;
) ]' X6 r" X3 n( l: f1 G end;
9 a( s( L. p! s+ U2 v' t end;
- u: ~9 m N v. v9 B7 Qend; -- of the method6 @3 f( O/ m, y( @7 l/ Z
|