/* called by: entrance ctrl of the object 'track'
% @- n% c' Z M- m& w4 U" M! U*/" l* g3 ]; H9 C! j4 [/ P
is
, Y u! x h: H% Q, Z" p2 X part, GlobalDistObj, assignLObj:object;row,Lan:integer;
# o b Z J w& K `do
% j+ j: V; x( C# a- @ k7 b- A Lan := rootfolder.Internal.Tools.AOLlanguage;) E9 l! W/ a" W% a' ~. H2 _ V. s1 T
if current = @.Destination -- else return
+ |& m1 \; _2 V3 t! V then
v5 p* h) K2 h @.Destination := void;
- b% v4 x. g" j6 e% x5 h if @.occupied then* }8 q; x A* M0 p
part := @.cont;8 h3 R- L; W% w6 A# e: j
@.transpOrder := void;
' s, e) I( f- i5 o! d part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
% v" T4 E5 L* M/ D @,root.eventcontroller.simTime);
1 W6 x, `" q$ j8 Q: L @.HasOrder := false;4 `/ ?$ ]0 P% d7 d
@.DrivingHome := true;: V$ K$ j; y6 j
rgManager.tryToStartTransOrder;7 J" V8 C9 |+ Q5 a# N
if @.Destination = void# G0 |' m( p. A" A
then -- no transport order for vehicle @
; r7 ?+ m u: m- r. i' O# F) i @.Destination :=/ J! E$ G7 U9 r% Z5 ?6 g! P3 h
rgManager.nearestFreeStation(@,track.~);# R, ~$ t6 @/ a' \
newDirection(@);
6 p6 q4 c) t$ L" |6 v if @.Destination /= void then
! j/ c9 o: q& v @.Destination.NumReservation :=
* D/ I0 o4 n* w5 A% E5 Y @.Destination.NumReservation + 1;6 U/ I" v, t/ }& Z: j* Z6 I2 b8 R a
end;
% R2 U$ Y: f: l# |# l2 b @.CurrIcon := "drivingHome"; h( ^" D# O; ]- Y! ~" g
@.DrivingHome := true;
/ \# f4 V. A& D# M; b end;
: v4 x* u0 O# B i else -- the vehicle @ is empty, both vehicle and part are in the same dock station8 w* J( v! x3 d/ ]# ?
part := @.transpOrder;
' b5 Z9 y3 _8 X' [ part.move(@);-- load part
+ b- [3 ]. `! d G& k @.CurrIcon := "load";$ s2 r- L$ S6 Q- ^
GlobalDistObj := part.globDestination;1 O& g( d, }. s: B& Q+ R% f
assignLObj := rgmanager.rgAssignL;
' S3 b' E( F7 g3 V4 J. b7 y, i0 C& _ row := assignLObj.getRowNo(GlobalDistObj);% }5 }6 C% _# ^3 [
if Row = -1 then -- since 70, e# s3 E$ B% O4 C
if lan=1 then$ V' k, O! R0 v7 T
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),0 m% l' _) n' I6 c7 }; ~
to_str("in der Andockstation: \"",?.~.name,"\""));8 j: ~7 {6 C5 l' {* e" f
else
% H5 |. Q2 v9 X5 I0 D promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),: K& `7 n3 y% Z. Y
to_str("in docking station: \"",?.~.name,"\"")); ) P8 W' {! S n. \
end;8 C! V- [# l+ c3 [7 {7 r$ n2 ^
else, f# l1 O! ?6 H: j; i
@.Destination := assignLObj[1,row];) A3 Z. ?0 J& L- _
end;
; Y* ^7 s7 A* g% P2 T; \- y% n newDirection(@);4 V% p) o _' V0 \5 j& ~) I1 U
@.HasOrder := true;
8 O! P" a& o4 t7 N3 a end;0 x$ L3 D/ G% B% J6 P3 H2 v6 ?( x
end;/ x; U9 v _# V b" ?
end; -- of the method l& J: d+ o/ y. [( e1 J/ b
|