/* called by: entrance ctrl of the object 'track'
" Z1 D V8 o$ X' K9 g9 b9 g ]4 I*/, T0 y, m& H% f9 b
is0 S( ~8 ~( x- ]2 L, B: {* d
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
" y' @- Z* p3 R* m+ Jdo0 i4 k: H" K3 c# q+ h2 l9 a
Lan := rootfolder.Internal.Tools.AOLlanguage;: q- n0 `( n+ T
if current = @.Destination -- else return8 n' z; L* `. S E* J
then# D( K. D9 V" O5 X
@.Destination := void;
8 S: y4 b; u& ~, p: b if @.occupied then$ ~. a, k+ h- E8 H
part := @.cont;* N- Z3 [% _0 _1 x% ]
@.transpOrder := void;- K. `7 c- L/ [3 R& k) Z- ? N
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
5 ^. t B8 N( I7 m, {3 F, [( { @,root.eventcontroller.simTime);& v w* E7 V; V- q0 m8 ~
@.HasOrder := false;
; |* s- p/ |0 l2 X @.DrivingHome := true;
6 x6 S2 b* `5 s) b rgManager.tryToStartTransOrder;
8 `' ^ W6 g4 L if @.Destination = void
3 O% R: f5 h' j" F8 m then -- no transport order for vehicle @2 m: e7 @# T) \8 ]
@.Destination :=, H8 e% D2 M' P: s
rgManager.nearestFreeStation(@,track.~);
% M) X* [3 j/ ^9 B7 j newDirection(@); ) D1 G3 g3 b" q }% M" Y0 N
if @.Destination /= void then
0 P6 e9 }0 x7 k5 A$ s& N- R @.Destination.NumReservation :=. {) _, W# D* k" {
@.Destination.NumReservation + 1;) b1 L1 ~( P$ T% j$ a
end;& s# O8 l9 |3 L9 Z" E' g/ |" Y
@.CurrIcon := "drivingHome";- \2 [% t* P* L, u( M
@.DrivingHome := true;
( P n4 v. ]- v end;
' p' n8 S7 N( [: m4 H1 Y+ z$ h8 g else -- the vehicle @ is empty, both vehicle and part are in the same dock station) F) ?% f# L# l7 y. g
part := @.transpOrder;8 C9 _- r) G! S i! {$ g" v. {
part.move(@);-- load part
2 G3 v' {3 i5 p3 U2 q4 r; l1 B @.CurrIcon := "load";
7 P9 c' M, x; ~# z7 \ GlobalDistObj := part.globDestination;
# K$ a( P+ P6 E: v* w assignLObj := rgmanager.rgAssignL;
% A* u. {- {- [: `- i. [9 D4 ` row := assignLObj.getRowNo(GlobalDistObj);
% y* G1 w$ }# ^, } if Row = -1 then -- since 706 X, ~4 v6 J! i$ @1 f, B" L ^
if lan=1 then7 b. d* S6 ^2 r/ w% v" k6 S8 ~9 z
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),. ^1 n+ i0 {! ~$ I: b2 ^
to_str("in der Andockstation: \"",?.~.name,"\""));
4 t7 H& A- |7 ~0 Z2 l/ ?& {: \ else
% f9 b$ N* o5 b$ b promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
3 A; k8 ~" z+ v to_str("in docking station: \"",?.~.name,"\"")); # }8 d; J$ X2 [! y: o" c& D% K0 g
end;
: K5 l5 G0 e; `: A else
- t2 h# m$ X; Q @.Destination := assignLObj[1,row];! b5 d7 L. d# t+ N
end;
$ V: H. r0 j; W- U3 C1 b newDirection(@);# E5 ~, _3 Y( W0 Y
@.HasOrder := true; G2 q- N8 d" g- V( B
end;, i' d& T) B3 q+ G6 l( ^
end;1 U- g: V" y; J: r1 M
end; -- of the method6 Y/ l: B; _9 T9 z; K
|