/* called by: entrance ctrl of the object 'track'1 k- j4 f6 Y) I+ s4 Z2 Y J
*/# d) S8 y7 j9 I9 P- z
is
+ l0 }) @2 N, q& i0 e( O part, GlobalDistObj, assignLObj:object;row,Lan:integer;
3 w4 C" C* _8 o9 y+ s$ @do
) V# @/ v1 ^3 x5 @) Z0 I0 f' D Lan := rootfolder.Internal.Tools.AOLlanguage;
6 E0 M9 T3 R1 O; e/ B if current = @.Destination -- else return
! q+ P2 f/ Y' L$ M) s then
/ h% J7 H4 y t* ?7 b) j @.Destination := void;! W4 L- t8 o" D* a* I! H4 J) t# E
if @.occupied then5 x" W; I F5 V2 w/ J5 k g& x
part := @.cont;, S2 ^5 O% c4 G( J: Z+ Q3 G2 r" |% A) \
@.transpOrder := void;5 N+ P& S6 c0 Z7 g/ v
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
' K1 _( G& `' {3 }' F2 H4 U @,root.eventcontroller.simTime);' l; h& z; \1 M4 u( T
@.HasOrder := false;7 h- H+ c/ n- g9 O! c8 N9 z& N d
@.DrivingHome := true;
' s2 Y3 n0 z' n$ i) a rgManager.tryToStartTransOrder;1 j' B5 j/ `4 N1 Y( G) ]. k B# S
if @.Destination = void
, b' T( U* H5 [( T$ [ then -- no transport order for vehicle @* k5 c' G( V2 \0 A$ g
@.Destination :=% {/ @0 i" K* e+ W6 S
rgManager.nearestFreeStation(@,track.~);
2 Y6 m% O9 ?$ [: f! a+ L3 w newDirection(@); % o& q/ Y2 Y: N0 u3 a2 g
if @.Destination /= void then
: X# P$ Q8 M1 i `2 Z: C: P @.Destination.NumReservation :=( E/ [3 g& r; n% n+ n% e: Q2 Z+ g! l2 X
@.Destination.NumReservation + 1;% Y! T/ b% Z/ h# N2 ]) t
end;
1 D6 ` _ s2 n' r4 S/ g( P7 B7 |' a) g @.CurrIcon := "drivingHome";
^' v: a, _( F, m1 T @.DrivingHome := true;
+ K6 y% x3 b6 v end;3 @, ?% K+ I( _
else -- the vehicle @ is empty, both vehicle and part are in the same dock station4 S; F5 `( X3 R
part := @.transpOrder;2 t( A. h- c W- V" _% P) Q1 O
part.move(@);-- load part
; r9 w8 `9 N: J2 }( |+ h; Z7 I @.CurrIcon := "load";% d0 p( f+ D7 H2 k
GlobalDistObj := part.globDestination;
) b0 [ E+ e/ w9 N& l assignLObj := rgmanager.rgAssignL;' C) @! M$ p+ D4 F
row := assignLObj.getRowNo(GlobalDistObj);
* t# I: O5 o' v! }+ { if Row = -1 then -- since 70$ C/ u4 i* Y+ m" s
if lan=1 then
( r. o& O. n: D+ c2 X+ m+ p* `7 R promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
* C4 i8 v: S4 e! f$ S to_str("in der Andockstation: \"",?.~.name,"\""));
4 Z% b$ d! l% h& l% U; C K1 }6 O- r else
2 r+ h. J2 O% B6 ~6 C, Y' A0 q promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
: B0 t4 z" E& ^3 [, _ to_str("in docking station: \"",?.~.name,"\""));
# r' |0 V+ @# ~5 \" Q end;
( g. \. _: [' p. a- p else# Y' W+ O) v9 s) @! t
@.Destination := assignLObj[1,row];7 ?% W3 [2 L3 @; Z! e7 H
end;
' B* ]% O& z' \ Q; a newDirection(@); K- X- R; o& C0 z. U
@.HasOrder := true;
9 r( A; |, Q4 M end;
7 p+ T; ~3 _! P/ @$ O end;
3 {$ M/ c, r( W8 T6 @1 s3 Wend; -- of the method+ y+ [ C' M. P/ W7 x
|