/* called by: entrance ctrl of the object 'track'* q0 h% d. Y( I# y: j
*/
% j+ k3 h. N1 q, b# W$ _$ `9 c( fis$ g5 R$ s5 N+ M! J. g
part, GlobalDistObj, assignLObj:object;row,Lan:integer;8 I" b5 t) |" i. {
do4 E) C$ L& ^- ?# \0 Z1 ]& |( w# ?
Lan := rootfolder.Internal.Tools.AOLlanguage;, G1 @" t4 B: I" H" F5 j2 S( d
if current = @.Destination -- else return
k2 Z: f. x8 J4 \( K1 y2 M then6 k6 W/ o0 t( _ Y" A1 l
@.Destination := void;0 f1 b }9 R" l) c
if @.occupied then8 M& b9 t# q5 S$ v! u! V5 A- s2 J9 t
part := @.cont;" ~6 T8 m/ S6 E" N: r; h* S
@.transpOrder := void;
$ f, R& p; x$ ?. X7 J* J part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,1 I& ^5 |9 J; E2 G; B/ d* d
@,root.eventcontroller.simTime);/ Z* y, @. J4 p9 F
@.HasOrder := false;% p# c; G) V6 ]" ?! X: T, [- p- J
@.DrivingHome := true;
- {+ f* d3 F1 T+ z rgManager.tryToStartTransOrder;
9 C' D5 ` K6 g7 y9 j/ X0 N if @.Destination = void
8 l! K( ?6 R' h, b5 y- J2 K then -- no transport order for vehicle @2 v1 p) H0 u2 Z- \9 P3 A* f* v
@.Destination :=
- X8 k5 V: O3 b% e0 H3 q0 Y- w rgManager.nearestFreeStation(@,track.~);
) w, X s* U! o L- O newDirection(@);
! w4 Z5 v, z+ v9 g6 e if @.Destination /= void then
9 u5 M+ o2 H6 `5 _# M! I @.Destination.NumReservation :=. L% r2 [2 i- q5 F
@.Destination.NumReservation + 1;
4 D: B' E1 F+ {$ Y9 F0 h end;/ B. B4 _; q3 h. d; a! c; D$ ~9 d
@.CurrIcon := "drivingHome";- A }- Y% a# s& b! ^, |4 _( u
@.DrivingHome := true;3 A/ y3 v+ }% F8 i" F
end;* M v2 ~+ {- r
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
9 G8 u, w z, f4 i, j8 p l part := @.transpOrder;3 s6 N( ?# F. v% F x3 p
part.move(@);-- load part( p% o8 h1 N Y
@.CurrIcon := "load";, L" Q: q- L+ t( P
GlobalDistObj := part.globDestination;, ^- i0 x# a% C. P
assignLObj := rgmanager.rgAssignL;
' u, C, a4 S) W# W) L0 x row := assignLObj.getRowNo(GlobalDistObj);
% M- [4 c3 r- Y9 l7 Y# k9 A K if Row = -1 then -- since 70
2 {( f# I! c6 T* c& q5 X3 G if lan=1 then4 L% Z* ^, [" l/ X8 w- n* \3 g3 P
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),+ p" J) w N z+ _4 S
to_str("in der Andockstation: \"",?.~.name,"\"")); R6 L( C+ X1 c1 v& e0 L
else
; o" A! H0 u, E0 \! T# b: J promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
3 G( _5 s% @ ?9 N m to_str("in docking station: \"",?.~.name,"\"")); ; ~* j0 l' Q( q6 n
end;
4 u8 K0 H+ C/ O% K7 d else
+ s; e- ?1 x( l% q' Q @.Destination := assignLObj[1,row];
9 F( l4 p. |' x) `) J& j end;
/ x: i& d e; K: T4 ` newDirection(@);% N8 }3 u7 v0 V; J! q( O9 U
@.HasOrder := true; J! G8 }) Q( g* L2 A i. L) v) R+ v
end;/ k! g7 ?7 z# b- {
end;" j) w# d% @8 k) m# S7 x S
end; -- of the method
% q4 Z. L& [) { |