/* called by: entrance ctrl of the object 'track'
5 ]0 r" K* R- d9 c, r3 G8 }*/
* x* X8 p' u& tis
1 A0 ^: H6 w l/ ~) ?, \7 K part, GlobalDistObj, assignLObj:object;row,Lan:integer;" U @+ _/ o% M1 J* |
do
% D$ j+ }' L* \# N) B0 f Lan := rootfolder.Internal.Tools.AOLlanguage;
. C( A. i8 i6 ?( H0 s, } if current = @.Destination -- else return
9 x& T% } V' P, b- d then
8 K6 T7 u) g$ ]" Y. d @.Destination := void;
+ w$ e0 k! Z H2 T: S% L if @.occupied then6 l6 V$ Y& J: N8 c
part := @.cont;4 ]' p" N2 h) C0 I' H3 I1 z4 m' c
@.transpOrder := void;
! t4 C: `+ P* G; _3 n. o/ a2 V5 l9 P part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
9 y7 B& x* U6 h @,root.eventcontroller.simTime);
& J: }& W$ W' u6 B# K# ~ w @.HasOrder := false;
1 A4 y; I# r. L% {3 D; A* U) D @.DrivingHome := true;9 L4 K% j ^9 Y4 j4 e
rgManager.tryToStartTransOrder;8 h; t' e% |; p- k/ C
if @.Destination = void% ]7 X+ c1 l! @2 K, p5 f( S
then -- no transport order for vehicle @+ A- [* \5 [9 \6 l
@.Destination :=1 A: i; ^2 G# ?6 w( F- {8 d
rgManager.nearestFreeStation(@,track.~);& H3 j3 z7 D; s( x6 ^% P- H1 }
newDirection(@);
8 g0 q4 L% e# P5 x& ^ if @.Destination /= void then
3 p i) m% e4 z @.Destination.NumReservation :=
6 J. x$ o1 }# G, p( E6 } @.Destination.NumReservation + 1;
, r* B) h* H, N9 ]- h end;
g3 L: g2 W6 j @.CurrIcon := "drivingHome";% u* E0 i5 d( Z6 U/ B( t" t
@.DrivingHome := true;3 Y& p! Q& P* D- S3 s
end;) Z1 ^7 u1 j! T9 J: X: k, }/ @
else -- the vehicle @ is empty, both vehicle and part are in the same dock station8 J+ K' L: V5 t2 l! S7 ]
part := @.transpOrder;
! X& [8 X9 F( c+ ]6 b part.move(@);-- load part/ k3 L: l6 T H# X
@.CurrIcon := "load";/ C& {, o9 t1 S( s2 U+ U! ]0 U$ u
GlobalDistObj := part.globDestination;7 ?8 C0 l/ @) v# H; z+ o+ u
assignLObj := rgmanager.rgAssignL;
/ g, ?$ o X7 {' X; D, _ row := assignLObj.getRowNo(GlobalDistObj);
! `* | e5 _1 U; X% E if Row = -1 then -- since 707 ^: `6 B N+ r4 q& @- T
if lan=1 then
8 o) f. `1 R, N. G' _ promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),2 D$ n1 \* y1 Q& ?' c/ N4 c
to_str("in der Andockstation: \"",?.~.name,"\""));
$ o: y2 L5 L. _ else5 h1 P z# @3 t& t7 v
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""), K" T/ w2 ]! e: z2 ]- V
to_str("in docking station: \"",?.~.name,"\""));
( C- W3 ~: [8 z( {) U! R end;2 h/ ]7 k' y0 A: a
else
% M" K: M$ _1 B! w1 J: x! | @.Destination := assignLObj[1,row];
) c. V9 t& d: g! B! o end; ' ~. _& f ]. L( R
newDirection(@);- |/ F' W3 U$ W% M! W
@.HasOrder := true;
# R% n+ T7 B% b end;' }/ K) Z Q8 s) K/ s* q( i
end;& [$ m; M! M# c+ q
end; -- of the method
& ?3 G# Y3 W7 j c- k+ \0 Z2 k9 Y |