/* called by: entrance ctrl of the object 'track'& Y- E" l4 e* S4 P
*/$ z$ Q' M2 D+ X, s
is
6 k _, A7 d2 s' K2 e/ \ part, GlobalDistObj, assignLObj:object;row,Lan:integer;
0 A" x" |/ O. ~( J5 F3 f% T( ?1 Edo
9 `4 G) [% [1 a5 w8 X Lan := rootfolder.Internal.Tools.AOLlanguage;
- z0 p* P5 c8 g( _1 X5 d: [ if current = @.Destination -- else return
& @% a7 B- o; B0 ?7 P+ _ I+ z! Y5 g then
5 V1 r' U3 A$ z, X @.Destination := void;6 S C h& Z7 K
if @.occupied then/ a" g, s- J% ^, X- k5 P
part := @.cont;
9 @9 S, {; u: ^* m. \$ U7 \ @.transpOrder := void;) a1 D, D( ]' Y" r; o/ Y
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
$ s! P) z9 `2 R7 I- Q+ k @,root.eventcontroller.simTime);
0 F/ s3 F0 z# M @.HasOrder := false;
$ T% q( ^ L5 ]0 ^3 M @.DrivingHome := true;
* _0 F7 z! n( ?$ Q0 T# g6 Y5 V& h rgManager.tryToStartTransOrder;
) K' c! q f5 e+ c if @.Destination = void8 E. H+ S( Z) x [ B2 j
then -- no transport order for vehicle @$ A3 s1 i; X2 d8 H& h! L# ^. F
@.Destination :=
) X$ x& W, ]' P3 c7 W" W rgManager.nearestFreeStation(@,track.~);
, d; {+ X; X% R newDirection(@);
! m7 z1 F6 ~0 A4 X+ G% E# Q if @.Destination /= void then
# X7 F& O6 D8 ~) U" E @.Destination.NumReservation :=
1 n& t& f" F k, p. w @.Destination.NumReservation + 1;/ V5 L: c/ I7 \0 l; S }
end;. M0 K! V9 s, ~% @
@.CurrIcon := "drivingHome";
: v @% u0 W( Z4 [; ?. i @.DrivingHome := true;
+ S! a3 J8 @$ }* ?, P/ a* r) N, Y/ w end;6 }4 q+ n& z) [$ z
else -- the vehicle @ is empty, both vehicle and part are in the same dock station. X: o# R d6 v$ l5 b. y
part := @.transpOrder;
' A7 H' z" f, x7 Q part.move(@);-- load part+ y. @# q6 e$ E; v1 G
@.CurrIcon := "load";7 S7 f$ b5 u: e. U% D
GlobalDistObj := part.globDestination;
( J1 e( B0 e, J8 S( A/ l assignLObj := rgmanager.rgAssignL;
$ D# h+ W- ^5 }% q+ m! @4 P7 B1 s row := assignLObj.getRowNo(GlobalDistObj);
3 k8 p1 o8 I, n7 } if Row = -1 then -- since 70% P' h! q, V& _( U
if lan=1 then
2 o/ {- S1 Y7 G/ B promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
* U5 w/ u2 L8 R" a+ \. u6 ~8 k to_str("in der Andockstation: \"",?.~.name,"\""));; B3 K6 G' P5 J' h2 |( w
else6 f- a4 l+ R1 R% R
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
; ], ?% n5 y! a: `9 { U. N: D to_str("in docking station: \"",?.~.name,"\""));
! d; l, Y7 v4 B end;
2 \9 }/ k. e# C- E/ I4 p else
0 F& Y8 C% n9 C q) D0 c) U3 Y @.Destination := assignLObj[1,row];4 S& q0 X4 t$ S/ N) D4 C4 N5 r
end; ; O0 ^5 A1 x( t# s( G% h) x
newDirection(@);
" o# o7 ~6 S7 m& \9 J6 ~6 K4 r% j8 j @.HasOrder := true;" x. r6 O2 d. ^. }
end;' `' ^. x5 O# _) x* Z7 }
end;
# @3 x1 O$ a' x% c9 X4 e( D7 qend; -- of the method* H6 x6 y; s& U9 f. L
|