/* called by: entrance ctrl of the object 'track'
9 l% Q" ]7 }- S- v5 T: \*/
. H: _. F8 L5 g/ W' c, Qis
- Q4 w+ h2 X4 u$ [ part, GlobalDistObj, assignLObj:object;row,Lan:integer;
5 ~' I. H3 y2 ^% K2 d8 ado* d$ i( J0 F0 y4 h- ?
Lan := rootfolder.Internal.Tools.AOLlanguage;- o0 M, x" c5 e1 b8 z/ Y
if current = @.Destination -- else return3 C' }7 q8 H7 ~# U- W# P" K' ?/ K
then, l8 k9 e4 y0 |% L9 U3 K5 t
@.Destination := void;
+ I# q/ i5 X7 X) k( q) G& D6 R if @.occupied then
* F/ v, H6 y" [* ? e' _. \' v) Y* H part := @.cont;* `7 Y; {* e, f, z- p) U) T0 {
@.transpOrder := void;
9 [* V2 S) |, d; } part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,$ M: U3 R. E' ]$ s3 K
@,root.eventcontroller.simTime);
% B2 d. ?( S: ~3 h5 x# s! C @.HasOrder := false;0 Q5 C; e/ l+ G- ~! W
@.DrivingHome := true;
8 o9 M( i! ]# a' ~5 k @ rgManager.tryToStartTransOrder;
9 B( E$ ?2 B4 y3 h if @.Destination = void' u, m; x; {. V+ f
then -- no transport order for vehicle @
( v3 ]# v& c& _( b @.Destination :=& x/ e- ^4 L1 W" R0 C- ^3 G7 k
rgManager.nearestFreeStation(@,track.~);6 e! d0 E$ C, R* ^, y
newDirection(@);
+ m* i) F! ?( E if @.Destination /= void then
$ ?4 @* Z$ C! s2 a, k, y9 G @.Destination.NumReservation :=
% ? x- m- d% H/ C' L3 P @.Destination.NumReservation + 1;
6 _$ g0 q9 Y! B) `0 o( v2 C end;) M4 L# g! r* L: e
@.CurrIcon := "drivingHome";, b6 u' X L# w2 ^6 ~- ^
@.DrivingHome := true;4 }2 N5 ?1 \; E) r: u
end;6 x! |8 c, Y- ] a6 L" m& m6 o
else -- the vehicle @ is empty, both vehicle and part are in the same dock station# x; x* p; u) q& q
part := @.transpOrder;
K% d$ Y6 \ B6 q/ I3 w part.move(@);-- load part
: @9 i& m9 s- N/ l9 B" | @.CurrIcon := "load";3 C8 s3 {/ h! b2 M
GlobalDistObj := part.globDestination;
6 j/ B9 k& h' M assignLObj := rgmanager.rgAssignL;
" l5 f* P. f# }% \ row := assignLObj.getRowNo(GlobalDistObj);0 N" _: J$ B& I1 [
if Row = -1 then -- since 70
/ K8 {5 T6 h F if lan=1 then3 W! H: T V' q0 X A% u
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
W/ y8 ]6 H; t2 T9 k) D7 w) @7 R to_str("in der Andockstation: \"",?.~.name,"\""));
/ H+ _" S5 ]9 l, H4 p else
# ^, E U. n2 J3 d* l" J) `4 V promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
/ V, C) i, a- a% e5 y5 }2 G to_str("in docking station: \"",?.~.name,"\"")); " R$ p) Z& k8 ^4 E9 d/ f' W
end;$ z3 i2 G% _' I9 v4 c0 S5 s) x
else% b9 { Z- \5 H6 L4 x7 U, w' Y
@.Destination := assignLObj[1,row];$ f. g$ W! w6 p+ Y" H. i. W4 S, q
end;
( B: P$ m# d" R newDirection(@);
9 H1 _2 Y& I6 G9 ^2 D, [ @.HasOrder := true;% D; K. X/ P4 X8 i" r' R" e( b
end;
. Q) w5 N! Z4 H" D" h( O; X# ~! @ end;
6 o" Y' j' L% o vend; -- of the method( \ w0 w7 c1 K7 X& q
|