/* called by: entrance ctrl of the object 'track'$ ^- j. y) e6 `
*/
1 u, E: _$ t3 U n6 qis
% d) z5 ]4 O1 r' e l# j part, GlobalDistObj, assignLObj:object;row,Lan:integer;& Y* \& |% \( V* s. i" ]0 z" x* i
do+ \9 u6 _3 r) \6 X
Lan := rootfolder.Internal.Tools.AOLlanguage;
8 e- v# [' C6 D# w( O2 k if current = @.Destination -- else return* {/ u6 M# I6 R+ q
then
5 z1 L; ~( ~8 |0 N: f% R- I @.Destination := void;
6 C0 R% N5 ~. h/ s( M& o' A% _ if @.occupied then6 g0 ^ \9 v L
part := @.cont;
2 A# G: t! V" I# v8 p O @.transpOrder := void;+ ~5 J9 R+ ^9 b* K z/ Q4 Q
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
# C+ X' Z% @6 H7 {" r3 F. D% X" J, M @,root.eventcontroller.simTime);
2 ^/ K5 u. Y. N- a- v+ P @.HasOrder := false;4 Q% K: ?4 _ Z* K: r* Y+ F
@.DrivingHome := true;) U' {2 S' w% e& P! Q v d; q
rgManager.tryToStartTransOrder;$ C+ C7 _ V3 g
if @.Destination = void
; |; ]* X" r! S then -- no transport order for vehicle @% f+ z1 `, L- z/ U; e9 j
@.Destination :=
/ @ Z$ {9 ]/ r+ n9 ^ rgManager.nearestFreeStation(@,track.~);
8 W& B. G) I3 @2 E) L+ N6 v newDirection(@);
' t1 s" C ]6 A% T$ J0 F0 n. z0 J if @.Destination /= void then/ q6 y; T" Q) _3 P0 \/ g
@.Destination.NumReservation :=, \* [) I6 s* b: U3 _2 A5 c
@.Destination.NumReservation + 1;
: `7 v2 k' ^) T( T- E- q5 n. S3 W end;
) a t9 O7 n& @- Y( m @.CurrIcon := "drivingHome";
! o4 o7 G. l7 L! ~ _% t1 D @.DrivingHome := true;) X$ g7 \. \) f- v
end;
/ X `. b. q( V3 G C. K else -- the vehicle @ is empty, both vehicle and part are in the same dock station6 F4 l! U1 |& M
part := @.transpOrder;
9 g# Z2 F# R$ g part.move(@);-- load part+ p* b. ], x2 s, F M& _' y6 h: N- Q3 q
@.CurrIcon := "load";
- |& K7 r [& R* l8 ? GlobalDistObj := part.globDestination;0 v2 s4 a; g; T2 P6 ~
assignLObj := rgmanager.rgAssignL;
3 V4 v- G3 s( o( b4 }! z row := assignLObj.getRowNo(GlobalDistObj);& \0 ?% ]: }1 L! Z. |* |# h' U( n
if Row = -1 then -- since 705 t, }/ E* o3 G V
if lan=1 then
1 k1 M/ a& [$ O* ~/ h/ C promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),2 t8 a6 {6 C- ^7 }8 ^
to_str("in der Andockstation: \"",?.~.name,"\""));# n" I# A6 i1 \
else& e( g5 r( s" y
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),* O' j, `% Z& E: k0 [ @. w
to_str("in docking station: \"",?.~.name,"\"")); 2 \* U y! L- E
end;
) H$ _& |! D' P$ t5 U else
; q; A' b. a8 V* Y$ z' h @.Destination := assignLObj[1,row];
0 e2 z; R C* O1 w* R6 @- P5 Y$ X end; 0 W7 W! {) F& D# C& @
newDirection(@);
; v9 d/ C" l5 J6 ?: A @.HasOrder := true;
8 o; m: N3 U5 l9 U! y2 W3 v/ A end;
: m' ]/ y% M1 N; d. } end;
! k( `2 Q+ l. F6 O! v5 F; L) cend; -- of the method
# X0 m5 t; Q8 \! y& b |