/* called by: entrance ctrl of the object 'track'
- h1 [9 R9 l1 i$ H' B2 j. ]*/2 T$ A) M7 L1 K, ?, e# ~4 A0 R- q
is
) W# ^# P9 L* ? part, GlobalDistObj, assignLObj:object;row,Lan:integer;
' p: r' {5 z2 P, C( A" v5 wdo
$ w7 J9 g2 }, o) D' G% n* ?( A6 B Lan := rootfolder.Internal.Tools.AOLlanguage;
' c b% L2 a& X* l if current = @.Destination -- else return: J8 r: X" j# u3 k- h5 L
then6 | o# ]- A$ F0 o7 m
@.Destination := void;
% E* k( j8 b6 ]4 |* Y9 r; N if @.occupied then& M% C/ L$ M+ x9 H' n/ _! [% q
part := @.cont;
; T. b, Y; U. y2 f" f+ Q @.transpOrder := void;
1 M" F8 B3 x3 p' |5 a' ] part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,, d/ J K0 ?2 A9 O
@,root.eventcontroller.simTime);
7 H+ Q, e- @$ ~# K6 o I8 Q @.HasOrder := false;
2 _: E5 I- ^( w/ a0 x9 v @.DrivingHome := true;: ]5 e9 P. j# c/ o0 f6 {
rgManager.tryToStartTransOrder;
* @ w, O d2 L z& D if @.Destination = void
' x% p3 z9 k- p& m$ O then -- no transport order for vehicle @
! A9 u9 q* Z0 Y/ y* T @.Destination :=2 ]$ W$ i3 D7 K6 l6 }; p; ?7 O0 ~
rgManager.nearestFreeStation(@,track.~);
; f5 s, [9 |' c9 T# z+ p/ E( J newDirection(@);
4 N3 J/ K' _4 f/ p5 }# m% U if @.Destination /= void then
, ^, H% K6 O: R @.Destination.NumReservation :=
8 b2 c0 D! p# N+ q. T/ B) P. B @.Destination.NumReservation + 1;
$ y% \+ K4 t1 P. d8 R/ S, x end;' D" m4 i) K& ^* }* j
@.CurrIcon := "drivingHome";/ o# E% e* ~* s+ x
@.DrivingHome := true;
4 ?9 ~% d9 G& E+ o' v g end;3 i/ r+ s; h# I- m
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
7 q9 p! E5 k1 i% H; L [1 {' Z part := @.transpOrder;
+ E# t1 ]0 d% G part.move(@);-- load part
% Z& ?5 l; u0 a! j @.CurrIcon := "load";
) W) P8 k' C- W: A+ X5 K GlobalDistObj := part.globDestination;
7 _- k: ~; ]% w& w+ L# ^ assignLObj := rgmanager.rgAssignL;
2 v; W; Q n. L; L: d row := assignLObj.getRowNo(GlobalDistObj);
( r: h% P& Z( s& b if Row = -1 then -- since 709 p) h' j) o/ U7 d5 `
if lan=1 then
1 g; H0 k# h0 \+ T c. o# I promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
' N6 [( w/ K5 c, J' |5 L3 m to_str("in der Andockstation: \"",?.~.name,"\""));
! r# ~( o5 P! H6 K else5 W6 p( `9 q9 e5 a v1 L! @
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
5 V% |4 K5 x3 D# _; h! P' E to_str("in docking station: \"",?.~.name,"\""));
% z2 k1 m( ~+ Y: j. J end;
: C- p: E) d+ u else0 r3 x! `" X, t+ O: n3 _
@.Destination := assignLObj[1,row];% \# ~0 `5 `8 h" t8 P
end; % X, D n( l- Z8 K1 x5 } X
newDirection(@);: B6 w3 O3 L$ p u; O5 z9 q
@.HasOrder := true;8 z! s7 m9 A. l) V: E
end;$ l. S0 j0 j$ Z: s
end;
) l8 Q2 W, M; |. B: s' S( Qend; -- of the method
; e' _) ?2 B9 f1 l, I( \" N |