/* called by: entrance ctrl of the object 'track'. V, E+ [- M; g1 {( i7 N
*/
$ ?8 `5 U2 I* E9 _7 T& Z& _" xis/ P* Q9 O1 ~1 h7 d- Z2 O
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
" a. F: S$ T [2 [$ ]do
7 p1 F) [# Z1 c6 {, K/ k$ s Lan := rootfolder.Internal.Tools.AOLlanguage;3 M5 `' v K# V J9 u4 O+ R
if current = @.Destination -- else return
* |5 g: C# {5 \; i then
6 K F4 N; I( c& w9 B @.Destination := void;/ I1 u. J5 R3 M+ U) @5 i
if @.occupied then& a( C6 a; B9 i
part := @.cont;
& f5 U4 U0 Q4 p& e- d2 Q1 L @.transpOrder := void;; }0 V, { T2 j o- _+ ?* \# }
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
7 j9 ^, w! Q1 a& P4 ^- w( v$ w @,root.eventcontroller.simTime);
5 L% D9 K' B* d( {/ ] @.HasOrder := false;0 \. v. @5 \# [7 t
@.DrivingHome := true;1 J% B6 C5 [# B( F/ j# G
rgManager.tryToStartTransOrder;1 M! |+ a' I8 R' t: }' ?
if @.Destination = void
5 c7 k6 V7 a# x g* w then -- no transport order for vehicle @ h# T$ W+ G k, K
@.Destination :=
# x& S3 U" l& ]) k rgManager.nearestFreeStation(@,track.~);
[% m6 {4 q& `7 A+ p newDirection(@); % A2 k* `8 }* X/ s7 F/ Q( r& e4 t
if @.Destination /= void then
: l6 w0 R, m' h' J. H `( Y | @.Destination.NumReservation :=
! _$ h; u, k4 a; o, d" d+ F @.Destination.NumReservation + 1;3 n5 e3 { \( A7 U- u: d- x9 U
end;
) b4 ~; ~* G' p @.CurrIcon := "drivingHome";$ K; w. o# r9 v: \8 E; P
@.DrivingHome := true;
+ B5 g5 c* J& r7 Q, y& @ end;
7 r7 l( L' k' ^0 @' c3 d8 X% U" U else -- the vehicle @ is empty, both vehicle and part are in the same dock station
2 B% k# R9 G8 s. B part := @.transpOrder;
* I) |5 T; I) C' h3 ] part.move(@);-- load part7 M6 ]6 {" _, a& X$ |
@.CurrIcon := "load";& T3 s0 W# n$ {/ P9 [
GlobalDistObj := part.globDestination;; {$ \& @$ k$ h% k F3 g4 r F
assignLObj := rgmanager.rgAssignL;0 `, v8 O5 i) D1 x; _5 U9 j
row := assignLObj.getRowNo(GlobalDistObj);* V$ u" f& l* k
if Row = -1 then -- since 70
# w+ Z1 {2 \9 m- s S7 G# a if lan=1 then% b* j$ \+ z+ N: R
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),5 M) {2 B5 v) p7 x. T1 Y$ L
to_str("in der Andockstation: \"",?.~.name,"\""));
{0 @3 m7 r0 p1 a6 u else5 u7 h' r! J2 ?" j
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
) C) i$ S) @6 B to_str("in docking station: \"",?.~.name,"\""));
$ ^, q, q8 E5 M1 i2 y' v* y end;
D- F* y9 | ~/ Y+ \9 D else" D: q1 H ?) Z
@.Destination := assignLObj[1,row];0 o5 B' G/ \0 a& n
end; . u9 O: n' H' B. W' I
newDirection(@);
, s. s+ _- b9 B/ L0 f# q7 ~2 b1 ~ @.HasOrder := true;5 t( y& T2 T3 o7 X9 S
end;3 L q0 \7 e8 [% ~3 z' X% L
end;9 s* Y/ b8 z: {' l8 X
end; -- of the method$ P8 r: Q" h T; \' \ f& E5 M
|