/* called by: entrance ctrl of the object 'track'2 {* w+ c* i8 Z( C0 V+ d
*/4 B( w1 v) o$ Z- h. i+ b' }
is# v1 q3 q: y. ?9 Y7 X
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
. ~. z0 K" N! x: F: o4 T/ Edo
( |/ ~" ? ?$ {, P& _7 a5 m" @) Z Lan := rootfolder.Internal.Tools.AOLlanguage;
' J( J+ `' ]& h: A if current = @.Destination -- else return
4 y3 V8 ?6 F% D- w. Z4 R$ L5 f then0 G9 X: }2 i. h( ^9 z& ?! ^
@.Destination := void;( L- t* X* F: Z" m8 y# l/ X
if @.occupied then
# W4 Y, f) [* t# f! o% Z part := @.cont;
) v, ]2 Z3 P9 M! F# Y @.transpOrder := void;1 A0 S' n1 @ w% ]
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,5 w& C2 k: g& P, O, N- V4 K9 k. i
@,root.eventcontroller.simTime);
0 V( W6 w: P7 o) E+ d @.HasOrder := false; g. k6 |% q5 m! k& S, J
@.DrivingHome := true; _5 e6 s' I) p) M3 G
rgManager.tryToStartTransOrder;. F2 h7 d, w* M
if @.Destination = void) B5 g% V- n0 l/ {4 m8 j
then -- no transport order for vehicle @6 x$ c h' v9 v: l
@.Destination :=, T6 K/ c0 h5 n9 B" K; F# g! M
rgManager.nearestFreeStation(@,track.~);- u% `5 M m: l2 l9 L1 q8 A
newDirection(@);
0 i' I5 P* d0 c7 f6 t if @.Destination /= void then
# _! q1 q% H+ Q$ s5 a @.Destination.NumReservation :=# e6 J. h, T0 k; T& ~3 j0 V0 m
@.Destination.NumReservation + 1;
! T3 Q5 U1 b2 J# e end;
; j4 C8 A; M N$ ^) w" Z* B1 ~# ` @.CurrIcon := "drivingHome";
. i% N( U- ^+ z' @4 \( q& T- ~0 i @.DrivingHome := true;+ E# n% c3 `' t5 W: G
end;
: M( G* ^8 P) f& ] B9 z, r3 \ else -- the vehicle @ is empty, both vehicle and part are in the same dock station& D) |0 z$ d9 F# @: ?* r% o& {8 @
part := @.transpOrder;
K, c! }* i1 k9 t& E3 e- x% w% m' O part.move(@);-- load part
: f$ {* i1 C, w, X6 J @.CurrIcon := "load";
- z0 y( l, K2 w* i! N. e GlobalDistObj := part.globDestination;- p8 R" f1 m. K R: ]5 U, F% F
assignLObj := rgmanager.rgAssignL;- _$ q0 ]% G. N/ A1 I# M1 I
row := assignLObj.getRowNo(GlobalDistObj);
, ~* R7 H7 C# S4 l if Row = -1 then -- since 70
. w% T/ c2 w2 r$ a8 z if lan=1 then! {6 Q( o) G) \1 h$ k
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\"")," B4 H: s3 f" m6 Q, v/ c$ ^
to_str("in der Andockstation: \"",?.~.name,"\""));
& @+ \: Q) B4 t6 G" Q3 {' w else, K/ K6 L! \! a* [# _& p7 o( O
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),4 ?+ ?$ f! Y, Z7 L- ^% R
to_str("in docking station: \"",?.~.name,"\""));
$ F. E8 O/ U B6 _1 X9 l; c end;
, g, T1 T% G8 d6 m5 H5 g else" Q$ a5 x( t$ N
@.Destination := assignLObj[1,row];
& R) K- {( K' [! J% s( } end;
6 u9 r4 U; S' H' m newDirection(@);
7 x/ j3 g: T9 O @.HasOrder := true;
. a( I$ H- F3 U$ u, D5 X! [5 P( _) @ end;! `4 z" f+ _" B8 V
end;) g8 i; J: t/ X/ B( w! G
end; -- of the method& H4 h/ _) p) j% G4 m* _0 ]
|