/* called by: entrance ctrl of the object 'track'
C; w% W; ^; y. @5 ]*/
/ n z1 I! O9 d; @ S' o' W6 g+ Gis7 m4 ^2 v6 R; {, H
part, GlobalDistObj, assignLObj:object;row,Lan:integer;4 t% d# X/ e+ U0 v- ]5 {
do& P. \: Y% R9 v" f
Lan := rootfolder.Internal.Tools.AOLlanguage;
' \" b. c- ?9 \1 w/ W if current = @.Destination -- else return
" B7 P/ i. i. R then8 F8 U3 d/ [( R5 d4 M$ i& x
@.Destination := void;
* r4 p/ [+ \4 J( T5 L2 ]# {+ s& ? if @.occupied then m# @+ U8 t4 t" B9 D& R
part := @.cont;* w) X m8 ~3 I W3 l
@.transpOrder := void;
! ~' a" i" t: P; c/ V# h part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
1 ^, F7 ]& [! z5 l! |: j @,root.eventcontroller.simTime);
7 V3 o4 j, Q) h @.HasOrder := false;
) W: p. c. q8 y9 P$ d @.DrivingHome := true;; a& J; {. t" k
rgManager.tryToStartTransOrder;4 ]& i3 J' N5 o; n
if @.Destination = void
# v( n+ p$ p6 \2 {. V/ H then -- no transport order for vehicle @5 H4 R2 k; S$ H; R
@.Destination :=
4 G( o: r% C* p; q rgManager.nearestFreeStation(@,track.~);
! |( Z R- R* W9 i# M0 g newDirection(@); " D, ^7 A2 K" R# U s
if @.Destination /= void then
; ~9 s8 J' y! V; i( c: f @.Destination.NumReservation :=! s7 f T3 y, O% B& \6 K
@.Destination.NumReservation + 1;
. F9 x6 ^+ C+ @& k* x# M; S end;) f1 C! q1 y' \1 w& j: a2 }
@.CurrIcon := "drivingHome";
9 n/ T% q& A9 T2 M) [ @.DrivingHome := true;
( k" u8 B- R7 k! r' I. v end;2 c5 a' I) \# w% U G+ u4 y' y8 q' {, _
else -- the vehicle @ is empty, both vehicle and part are in the same dock station0 U* B9 C5 e' i N
part := @.transpOrder;# Q! H+ i; F, I, O* F# k% Q
part.move(@);-- load part" v4 d- I& G3 o. z4 N$ u
@.CurrIcon := "load";
$ a: J4 g! D5 K GlobalDistObj := part.globDestination;
% c3 c% s7 r5 |$ Y assignLObj := rgmanager.rgAssignL;
# e- S* x, ?8 m5 i6 G row := assignLObj.getRowNo(GlobalDistObj);
/ o8 {# a7 q- b( U- U if Row = -1 then -- since 70
& D- X. @" E5 a* G/ C+ o4 M+ @ if lan=1 then2 L4 d: d) G0 q& v. O2 R1 W
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
2 |" Y% \$ y& ]2 {: j to_str("in der Andockstation: \"",?.~.name,"\""));2 I4 p7 L9 @& V5 i2 I4 Y. p% }% q; |
else
/ [ s) H" I' x1 | promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
* O" D; i1 F* } r/ B to_str("in docking station: \"",?.~.name,"\""));
1 y, `+ Z" T# U) }9 {: Z end;
9 j1 @% ]4 j- D2 w, L else5 y) y. t# u( p1 K$ V' E6 G& g7 i
@.Destination := assignLObj[1,row];) E3 [8 m* l$ H" K
end;
: v% {6 Y% g/ r: Q newDirection(@);, V# [2 B( |4 _1 x9 P' L0 t
@.HasOrder := true;
7 ~# G! N" k$ m- W% n c) K+ o( Q end;2 M& p" L: w' g$ Y$ A6 W6 G, c% R
end;
9 k- C0 e$ P- \( L6 n! q. Q+ y send; -- of the method
9 l. [' k, J3 J |