/* called by: entrance ctrl of the object 'track'
3 [' R% z5 \5 y+ s4 k. T*/
7 T. \# \. m9 f/ B2 _0 N: his1 [. t. l5 k4 W9 D, g; w' M5 W
part, GlobalDistObj, assignLObj:object;row,Lan:integer;* r; C/ W1 Y8 d$ g( d
do
: s- y- T' ?: n. z Lan := rootfolder.Internal.Tools.AOLlanguage;
- ` C5 H( Z( D. ~ if current = @.Destination -- else return7 Y7 W) s& Z* {
then$ N+ \/ x; d* j: U% l2 x% h5 V
@.Destination := void;6 b9 w! S8 e0 e, M
if @.occupied then' Z3 E% \& p& k) d
part := @.cont;
2 I \$ \3 [+ z @.transpOrder := void;; U7 U* C f/ a; ], b* g
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,5 D( M9 {2 f9 [: n" R+ K
@,root.eventcontroller.simTime);4 F9 P/ |( u+ y% ~% w
@.HasOrder := false;" R* F e; ^$ V# M3 R2 Q' f. q
@.DrivingHome := true;1 V' `, Z; S" R& B
rgManager.tryToStartTransOrder;
5 l0 B0 C9 w* L( \5 ~( N if @.Destination = void
# P1 j1 S) m9 ?- @4 T then -- no transport order for vehicle @
6 n8 v) a3 w1 S) o( U @.Destination :=% R/ P. |; f7 J3 q
rgManager.nearestFreeStation(@,track.~);8 O1 g+ \) D. A2 |/ @+ d& Z( y! }
newDirection(@); O! i, w( J$ B% C, S; |" n
if @.Destination /= void then8 |5 X Y2 O% _( ]# G
@.Destination.NumReservation :=
& p' t ^4 ^, ] @.Destination.NumReservation + 1;
y7 P& V: m) @2 [6 s+ f+ X- ]3 v end;
& l% v, X6 f4 q9 N @.CurrIcon := "drivingHome";
( L: `+ ^) y5 l/ O. O5 N @.DrivingHome := true;- ?- `7 z$ ] k; n
end;
) k" q' v% {! R( F& J z" |9 B ^1 v. i else -- the vehicle @ is empty, both vehicle and part are in the same dock station
& y% G: V/ Z; u; ~9 c: \' q y, e5 y* z part := @.transpOrder;. K' ~# w' }- d, N3 i
part.move(@);-- load part+ S$ i! }8 f- _0 P
@.CurrIcon := "load";1 H- b) l ^ d3 B' T& Q3 Q6 s
GlobalDistObj := part.globDestination;
* G4 B4 A3 K u assignLObj := rgmanager.rgAssignL;) p; Q. ^' f$ s* J& k4 l, ^
row := assignLObj.getRowNo(GlobalDistObj);, h8 G H% a& o* {* s/ ], l+ B% U
if Row = -1 then -- since 70$ a. ~5 g: L8 W3 H
if lan=1 then
, e4 I% [' h O0 {) F9 y) o promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
* w. ?% K; e& o# k! S to_str("in der Andockstation: \"",?.~.name,"\""));1 t* m; h+ f5 k* F8 I- a
else
, g7 t. a$ _6 X2 b7 `/ Y+ R1 D" | promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
% E; ` H. R& z3 j! R7 | Z to_str("in docking station: \"",?.~.name,"\"")); ! d/ ^& E$ Z% Y J' L* q
end;
/ H; T, {% @, S) W! b2 s4 E else
4 e N- Y; J; l' m1 e% Z @.Destination := assignLObj[1,row];3 [7 K, T3 I: m
end; ; n3 }9 J( D/ }/ o7 R% u& ^
newDirection(@);$ S- B( s& N( I' E* v
@.HasOrder := true;8 D7 c' W; ?% v$ A8 S' M' f
end;, W! {# L9 J( k8 C; {" G
end;5 H" d" ?" _* s' E+ j
end; -- of the method+ h' {* N7 \1 U4 }. x. W) k
|