/* called by: entrance ctrl of the object 'track'
% g7 E( G( X+ l: S) z' m4 L; ` K$ ^*/
" Q _1 L) {) j7 n3 K: G* Q: wis* ]7 M8 y" H5 G: @4 V" Y8 ]
part, GlobalDistObj, assignLObj:object;row,Lan:integer;- Y6 O6 t& \+ P- m# S) c/ N ?9 C0 _! f
do
4 U: R- { w: Q9 s8 Q Lan := rootfolder.Internal.Tools.AOLlanguage;
$ ^' K2 h- n0 ` d- k2 N# P if current = @.Destination -- else return3 T. L5 c2 \1 c$ o
then4 |5 W) |& p. {- g1 t& c
@.Destination := void;- |) b$ f0 [* p; T, A4 y
if @.occupied then
, [' b/ @6 e6 C8 X1 G' i/ r4 \3 G part := @.cont;
. x$ k8 a/ h' w. P2 `3 C' r- T @.transpOrder := void;
" H$ Z; Z* ]7 q3 o4 m$ a part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
$ D' h2 {$ ?$ \ h5 ] o% k @,root.eventcontroller.simTime);$ K& y% s/ Z. C% k
@.HasOrder := false;
8 ^% A! P$ B# I @.DrivingHome := true;4 ^5 `& U8 n) M' O: `( r5 x
rgManager.tryToStartTransOrder;
! J& R5 {! b8 a* h1 U8 r/ h if @.Destination = void/ C# @* p+ h( F- G; p
then -- no transport order for vehicle @
5 p) ?& i2 r" K# }4 ^ @.Destination :=( n: h4 |1 ?6 B% C& i( y* l
rgManager.nearestFreeStation(@,track.~);
$ U u1 W5 ^* s( @; z0 R newDirection(@); 3 C" T2 j3 G. g0 a2 p
if @.Destination /= void then4 `$ j7 T' v3 [. Z
@.Destination.NumReservation :=! m; i) I4 }# G: Y
@.Destination.NumReservation + 1;8 S4 V- d3 {% g8 T E9 v! L
end;" N6 C- ?+ p3 z( ^# g! P
@.CurrIcon := "drivingHome";
" a! B' e; C$ \4 A- d8 q @.DrivingHome := true;
: l F0 z2 |( X# @" |& `8 x end;7 N# Y+ |% f7 j
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
* |7 _6 D1 e& f; B( Z part := @.transpOrder;% j3 r# ]* H! G$ X( A
part.move(@);-- load part; j/ w0 C/ y7 @9 B: H$ K# ?, [
@.CurrIcon := "load";
) x; N, s7 k8 V3 z# u i GlobalDistObj := part.globDestination;
, Y% g1 e- r# h- {& `0 t8 k5 ? assignLObj := rgmanager.rgAssignL;* P: F& P' Z, V9 i% J
row := assignLObj.getRowNo(GlobalDistObj);
2 ~9 {8 l4 }, W& e; X4 y# j if Row = -1 then -- since 70
" w" q3 r2 I3 k% y% r4 n if lan=1 then
% Y8 G# U" b5 K. a! ` promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
' k$ |' }6 H" w+ d, h' ~ to_str("in der Andockstation: \"",?.~.name,"\""));
3 n* B- N% X8 d9 W) Y3 z2 f8 z# V) g else
( B4 v, A* t! { promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),4 U$ ]& G W8 t5 x- D3 a. w/ D/ @
to_str("in docking station: \"",?.~.name,"\"")); ! q* B$ h/ d, k% Z; j" `
end;& H2 Z+ l# ?. V$ c
else; Z" |0 g( Q; @6 X9 a/ K
@.Destination := assignLObj[1,row];
/ c; H w9 s9 X! I) y7 M end; ) G j* p- [5 g. J
newDirection(@);: b2 p) O6 U9 [0 z: C0 k9 i
@.HasOrder := true;
5 v1 ~/ r, p; Z' D! Z: z, M end;
/ c5 `' v1 t3 x; {& z. J end;
6 q& w$ ]5 s4 s8 z, K' Mend; -- of the method/ d7 ?. a: a$ p7 Y$ x
|