/* called by: entrance ctrl of the object 'track'& q5 d! W! q7 J# \, I
*/
( k! L6 W- g) \/ J) w6 g1 Zis2 {; k9 Z1 n |6 y
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
; v$ I$ ?! C% p- @do$ x- }! s! h8 @* n6 I
Lan := rootfolder.Internal.Tools.AOLlanguage;
6 n" c. P& ^/ Q: l if current = @.Destination -- else return
+ s; h. {& C. J5 |% Z# A9 ]* T4 t then
9 V l& o% f8 O+ { @.Destination := void;7 t. M3 f. \3 c/ j
if @.occupied then
2 [* s; y8 M2 w part := @.cont;9 T1 F9 E* V7 p
@.transpOrder := void;
) \5 M# S# ]; s$ S8 X- ~ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,- [) y, p" v J& D; ]
@,root.eventcontroller.simTime);: T: P3 Z( M& T( _! T
@.HasOrder := false;
4 @9 K) e% A6 I" _% u& g @.DrivingHome := true; I$ \7 @5 j- b2 ^' Z6 T' o4 P
rgManager.tryToStartTransOrder;( Z4 J: X! C E c* i6 M
if @.Destination = void
3 {4 B. [* G. d/ d2 \ then -- no transport order for vehicle @6 M* p9 _* h' {! B
@.Destination :=) C1 M! v2 [/ M+ {/ T4 B
rgManager.nearestFreeStation(@,track.~);
( s( |3 C* i1 [" S3 _ newDirection(@); ; P* m: L$ b0 T, J! ?1 A. Y
if @.Destination /= void then" F9 v& g8 s/ H/ U4 W* j+ p
@.Destination.NumReservation :=
( R4 |# {. n: {: x, }4 ?" O @.Destination.NumReservation + 1;
2 B. ~7 i' l: F$ h2 Q end;. V+ Z* P8 z8 ?
@.CurrIcon := "drivingHome";
8 v" P+ |. d3 `5 d @.DrivingHome := true;& q7 Z% U* Q+ r3 b
end;7 A2 M( }4 {( Q$ O
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
% l% a( h8 w+ `) v part := @.transpOrder;$ B6 U* C3 M' @" k, H# _9 G: S3 ?5 O
part.move(@);-- load part
' x+ M9 R( }0 y( e6 z l4 I F @.CurrIcon := "load";( k$ w6 K5 [! q5 j: ^* w
GlobalDistObj := part.globDestination;
# Z1 B- y1 e! P# X3 j% R/ y$ L assignLObj := rgmanager.rgAssignL;1 [$ H& P' q3 z, {/ y' b
row := assignLObj.getRowNo(GlobalDistObj);4 J$ Z7 `# ]9 ~( y
if Row = -1 then -- since 70
% a$ Y" b3 F/ V; H if lan=1 then2 S% \# \0 j' ~" w( {2 E B3 p- ~7 e
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
5 Q- P- |' }# J: ] to_str("in der Andockstation: \"",?.~.name,"\""));
4 r4 y' ^ U) q3 P } else
! o) o& ~& N. M& {" @3 A promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
6 t- b* h/ q, L. R to_str("in docking station: \"",?.~.name,"\""));
& {9 A8 ?% G/ ` end;
$ f0 h1 k- G0 \& u7 @3 u else
{9 z# ~0 G3 r. O @.Destination := assignLObj[1,row];
, N1 f0 q1 G( {! g0 ? g end; , G" a, ^8 o1 ]" w) g. W8 U- ~+ R
newDirection(@);, f# y* v |* h: ~! F# ^
@.HasOrder := true;
$ J& [6 N; U3 Y) G end;$ A4 n9 D! q/ Y) }
end; E6 r+ T1 e R( ^/ i$ I
end; -- of the method- c+ t7 a K |4 k4 |
|