/* called by: entrance ctrl of the object 'track'
& H0 `$ I5 E2 m+ r" P3 c% H1 h. \*/" _' @9 `5 a& \: W+ B' v; L2 i
is1 M1 f0 b8 }5 u
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
i& G! P* e* h' Y6 l! ?% \3 s u7 _do& S. s+ X z% f" J6 ^5 D8 U$ l4 t
Lan := rootfolder.Internal.Tools.AOLlanguage;
! H) l( ^( R! j, _6 f if current = @.Destination -- else return- i4 E* {1 i- r3 h" n% K1 l
then! |4 X5 Y8 ?- I! h5 f9 }
@.Destination := void;4 c, N' D4 J( S, @
if @.occupied then, F! s3 H+ ?, A; ]3 E
part := @.cont;1 e6 C, u+ a8 c: f$ p6 A7 b
@.transpOrder := void;7 {0 V- v# E0 B7 _6 _0 y3 p
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
6 `/ {9 r$ G. s- Q @,root.eventcontroller.simTime);* u8 h( ~& G; O. S4 A7 y8 C
@.HasOrder := false;
& i5 S3 _ Y! a2 ^ X4 C! g2 ~! m$ S) b @.DrivingHome := true;8 Z/ p, @% k: N0 Z9 H8 w$ x
rgManager.tryToStartTransOrder;4 k; Q( Z) Q) ?5 @
if @.Destination = void6 m# c7 P3 e3 J% A; u+ D/ H
then -- no transport order for vehicle @' M6 C6 o* H0 B7 m4 i& {; s+ j
@.Destination :=
8 C/ }# c! U. w5 D. _: O; c5 B rgManager.nearestFreeStation(@,track.~);
, Y4 [1 V J; O' H1 R newDirection(@);
: S2 |& r- l* B9 z) s& } if @.Destination /= void then7 g) @- a4 n3 Q. T; i
@.Destination.NumReservation :=
' o$ h% \$ z9 g6 s; | @.Destination.NumReservation + 1;# C1 _( ^) ~) Z% T2 g7 h% ^" |
end;" D9 T! B! S- l
@.CurrIcon := "drivingHome";/ G. o" ]4 C6 {9 [0 P. k; k) C
@.DrivingHome := true;
+ ?% S, }" P- R! A7 M end;$ N! X- m5 |; Q5 l/ z1 S. [
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
: s. \9 I0 Y# d$ {4 F part := @.transpOrder;
O7 u2 f: d* x4 K! a# P, A part.move(@);-- load part2 e1 }! z# W3 ?1 Z& b6 D
@.CurrIcon := "load";/ L- [% r$ ?6 ^2 g9 r6 H* w% i q
GlobalDistObj := part.globDestination;
m- a3 C: Q6 X7 T; q assignLObj := rgmanager.rgAssignL;; u4 w( Z( Q- t
row := assignLObj.getRowNo(GlobalDistObj);2 s" Z- x! E% O/ f( ^8 A
if Row = -1 then -- since 704 L$ k* x' O+ q p0 Z" x @
if lan=1 then
# q. C. d0 {* E( A promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),& t/ u. x' ?1 z2 y
to_str("in der Andockstation: \"",?.~.name,"\""));
) S* p7 O, W1 f6 A# ? else
. X5 ]9 d! S5 F promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""), `+ L( @. x( x( N8 _
to_str("in docking station: \"",?.~.name,"\"")); ) I" h* O0 ]2 p* o
end;
- f2 C* l7 O3 Q8 u: @7 { else
7 L T7 W$ E: n0 C2 U5 Z. Z @.Destination := assignLObj[1,row];
. @7 s- a' u" O3 N. E5 p- p: o end;
7 G) j1 C" N( O3 ~: H newDirection(@);$ O1 ?8 C$ N' Q6 M( K/ v
@.HasOrder := true;9 p s8 [8 @7 d. {2 I3 {! V3 J
end;
: H8 o8 d; P/ M6 h7 H* m2 Q end;# g/ } e. \; u6 N
end; -- of the method9 c" U" `9 b3 j. Z4 M. ~
|