/* called by: entrance ctrl of the object 'track', r* o3 I9 `2 [) ~2 @9 @
*/
; Y7 N( v! \4 z$ \% Tis
% d0 k0 a3 h4 w1 N part, GlobalDistObj, assignLObj:object;row,Lan:integer;, p$ e: n. c5 K2 W' @( W$ l
do
. m+ w# O8 T* ~! \, J# m Lan := rootfolder.Internal.Tools.AOLlanguage;
& n. `/ w3 q8 i) P% f# ^ if current = @.Destination -- else return
# ~& N- ?# Q; t2 W" s9 d" F9 t then) V; V `# S2 o( ?! J
@.Destination := void;
' }3 a+ r( x- N1 ]0 U& a if @.occupied then
. L% O5 V+ u& e0 G" z: G- B part := @.cont;
- C4 f! o0 g/ Y- I1 m2 ^5 C/ T @.transpOrder := void;
6 y* w9 l1 _# j; h7 f# o part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,* h$ f5 g Y3 y5 A# R: \2 D
@,root.eventcontroller.simTime);1 Q" j3 {4 y! M& ^( B
@.HasOrder := false;, D4 x( {4 H5 ^/ u/ n$ H5 i r
@.DrivingHome := true;
! K9 Z* B2 P4 L6 u1 q! o rgManager.tryToStartTransOrder;+ x1 L$ c; n8 S4 K, e
if @.Destination = void8 s1 q; u: x3 X
then -- no transport order for vehicle @
# J8 t3 x7 t6 Q' ~( ` q( r6 L @.Destination :=% t, W: e& [0 t5 K/ ?' c9 `* X+ y" L, t+ Y
rgManager.nearestFreeStation(@,track.~);
* [) e" D% ]( U7 \3 u' H0 z newDirection(@); 7 ~- Y Y6 J" g! V0 B" }- w2 k
if @.Destination /= void then
8 {# b0 c) w3 {/ g8 w @.Destination.NumReservation :=
+ x7 {1 `0 M: E @.Destination.NumReservation + 1;9 O. f4 q4 o, K! Y/ ~2 y
end;
. y6 f. e$ B1 s7 N: N- q" s- q @.CurrIcon := "drivingHome";
B9 w9 P! L1 m2 { @.DrivingHome := true;6 H/ a* Y3 V+ E: _% f' |0 G
end;
+ Z% a* r6 y5 B0 b else -- the vehicle @ is empty, both vehicle and part are in the same dock station
" Q4 F1 u8 S8 t part := @.transpOrder;. F2 x8 u* A) ~" o( h
part.move(@);-- load part& n" U2 S7 ^7 h! H
@.CurrIcon := "load";
" A: @! C4 f4 c' q# V$ z GlobalDistObj := part.globDestination;
: h s. r. \, Y! o assignLObj := rgmanager.rgAssignL;
5 f; J) I* h- W# \* q+ l _3 ]& F row := assignLObj.getRowNo(GlobalDistObj);
- W! T# s1 ^4 X2 R5 u: J% G if Row = -1 then -- since 70
9 g3 e3 A; x {. n) n: @ if lan=1 then8 J, j& i4 @; ]+ Y6 [/ w% j
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
. z' K. M ]4 }( F( f7 F to_str("in der Andockstation: \"",?.~.name,"\""));
: `0 E5 A( [4 t) Z" B else8 n" f. Y7 G+ A0 ?- A
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
9 z5 M& k( f- _: ^7 s to_str("in docking station: \"",?.~.name,"\""));
) p; ?1 I8 d3 M! [+ u( X; _5 u end;6 g; g3 n9 d) A7 o7 Q) X
else
4 c W' x5 z1 {+ {, K8 d @.Destination := assignLObj[1,row];' |) q% U/ b1 {' ]
end; + ~+ @. P8 c# _+ ^! B& ~4 l' m
newDirection(@);
7 A1 O. C) Z1 x F8 z: E! g @.HasOrder := true;
5 `, T) _# {, ]7 @# Y/ ~0 a1 u% J end;
5 j- S$ O2 T; w( F end;
4 `1 p9 W: k( V: ~end; -- of the method: ]7 v' M0 f- I) t) E
|