/* called by: entrance ctrl of the object 'track'5 Q0 U/ y, M; U5 |9 ]
*/, g# o( l3 H* [
is
( a+ }! F$ Z% ~2 {0 ] part, GlobalDistObj, assignLObj:object;row,Lan:integer;
" o% S8 c! B$ s- A6 c0 t$ \do0 ^9 L8 ?8 q0 A1 ?+ L
Lan := rootfolder.Internal.Tools.AOLlanguage;. _. m' R# S j! b
if current = @.Destination -- else return8 Q3 t* A* u+ ?7 `% W _9 Z5 E6 t
then
2 n9 t$ U0 v0 M# M @.Destination := void;
! d# |/ M& C* S' B1 E/ n* U if @.occupied then
. P4 w, h& k. p8 P O; b part := @.cont;
( p& t+ ]1 y7 Y# T: I0 J @.transpOrder := void;
% x1 D4 V6 ~# b: l( K part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
/ b3 Z( [5 o+ I @,root.eventcontroller.simTime);
, P: Z: m& E3 d/ X i/ w @.HasOrder := false;
/ J) f! G1 h: X. }5 M( F" D$ B @.DrivingHome := true;4 Z' l- {) e9 N' o# Y
rgManager.tryToStartTransOrder;: T4 v& p' i ?) G4 B
if @.Destination = void: t0 V1 Q+ i* }9 y3 H0 I
then -- no transport order for vehicle @$ c% c+ Z$ t: o. W. H
@.Destination :=3 C5 } h) w/ M, T; K4 K) ^
rgManager.nearestFreeStation(@,track.~);- }; |( s8 ]# v* N( k
newDirection(@);
. |9 f% c$ O1 y' L7 c7 m( i if @.Destination /= void then
1 K( A7 i) v. C8 m! v @.Destination.NumReservation :=
: Q( M; P2 P. S5 E$ Y# a @.Destination.NumReservation + 1;
7 H M3 R' x- S) b) T* y6 V* \ end;
, d7 j: j" g. t; D$ I @.CurrIcon := "drivingHome";+ n9 P3 S I) S& a2 k! A
@.DrivingHome := true;7 A- k; R- r y+ k k. A' d
end;
+ r K+ Q" A/ ^ else -- the vehicle @ is empty, both vehicle and part are in the same dock station
3 m$ l5 w' t; G2 N% f part := @.transpOrder;
, O+ R* s# b4 x8 `8 N part.move(@);-- load part6 b; F6 P+ P: T6 d
@.CurrIcon := "load";
# s' J- C% f0 G: M GlobalDistObj := part.globDestination;) k$ y; T! D& M7 R$ I0 P
assignLObj := rgmanager.rgAssignL;* `7 b, O5 o {
row := assignLObj.getRowNo(GlobalDistObj);
- r' k9 n; B, [- ~! k! {& l if Row = -1 then -- since 70
# w: `* Z% f) m# ]. L) p if lan=1 then
% ^. v% q' z/ X( _8 ~. a promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),. ~' ~2 r" u6 E, ?4 P. C. J8 v
to_str("in der Andockstation: \"",?.~.name,"\""));
! ~) U3 m0 L( r& ?2 R6 C6 k else
& [' o/ n2 b. k* q( X1 }& Z promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),5 R6 m7 o# w7 g8 T5 z0 |* |
to_str("in docking station: \"",?.~.name,"\"")); ' g8 y K) v5 ?
end;3 I* b& h6 b7 l7 C
else
) w/ X& z* u% B* z" J2 Z @.Destination := assignLObj[1,row];
4 P2 ?) X! [1 Y$ Y end;
( z1 Y, A1 R3 E3 H- i newDirection(@);+ o1 N; T2 d |; L* p9 {% Z
@.HasOrder := true;
' z8 z4 t' d, c) y( _' z" X0 l end;+ d; P Y4 g8 e3 F! ]
end;2 f/ @4 h; W% H$ k! p1 T* ]7 H
end; -- of the method
( Z. i" ]9 v( G |