/* called by: entrance ctrl of the object 'track'
* J) ^( E/ u; \*/
Y7 Z, r5 V& `+ _ ?$ m4 F" q! b; iis
$ p7 f( x1 u+ U' |) n" G part, GlobalDistObj, assignLObj:object;row,Lan:integer;
0 B) G f1 w, ~do, c4 ]3 P2 Q, j- V9 _/ X9 x
Lan := rootfolder.Internal.Tools.AOLlanguage;8 {4 [- s2 _; j0 e1 y
if current = @.Destination -- else return
& |* N7 h, |3 E1 h4 f( E9 k then
1 \1 X) L2 v6 `$ p- O, I7 y @.Destination := void;' M, t; L- {. p( M3 W, w9 D8 R4 I
if @.occupied then+ n* R! g: |8 W' Z9 x1 l% M; ?
part := @.cont;
* p' ?+ [8 {" p5 w. Z4 X @.transpOrder := void;3 k8 ]. N( R% u& z. c/ T) W
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
* F; g* `3 F; z6 o @,root.eventcontroller.simTime);( `/ m8 i. A. p' |4 O# P
@.HasOrder := false;
9 x- O$ S1 _+ ~5 X: m8 T5 k8 h( \ @.DrivingHome := true;
/ m" p$ K6 [( ] rgManager.tryToStartTransOrder;
4 g$ K3 | S! F. x- O& u6 g if @.Destination = void
) T& R- D! A" ~7 c( L then -- no transport order for vehicle @* ^* q& \: l' I: p K `
@.Destination :=+ T$ U% p* C: _# j/ j
rgManager.nearestFreeStation(@,track.~);$ [* k1 j6 E5 t7 k9 K7 w: L
newDirection(@);
/ f( o& c; t) u3 j% y/ z/ i if @.Destination /= void then4 y" p N' k5 G& x
@.Destination.NumReservation :=
, A5 N$ _7 P) @. } @.Destination.NumReservation + 1;
. ~8 T- q& M/ @! n end;
+ I) k8 `7 E |/ I. B; ]- R @.CurrIcon := "drivingHome";5 J- U, t6 L0 [* I2 z
@.DrivingHome := true;
6 C1 Q& T5 d, D) A end;
, }% ], |, V9 ]3 C/ Q else -- the vehicle @ is empty, both vehicle and part are in the same dock station
% _6 H9 n+ R* f" ~- a+ o1 G part := @.transpOrder;- z1 v2 u9 B7 D1 {
part.move(@);-- load part2 W' Q( o0 a; n9 W( Z5 t
@.CurrIcon := "load";
, E8 r J1 h$ c8 P" m+ R GlobalDistObj := part.globDestination;
5 p1 L3 r+ q4 b assignLObj := rgmanager.rgAssignL;
g$ t; Z- H% s {4 h& r' H* D row := assignLObj.getRowNo(GlobalDistObj);, W* n% D& ^ A* ~3 \% g) F
if Row = -1 then -- since 70
J- P& \, T9 G+ x* B if lan=1 then, ? T; I0 Z& T5 P7 G
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\"")," G" \' p6 D' P5 _5 n& i X o& m: m
to_str("in der Andockstation: \"",?.~.name,"\""));
% b/ D* ?: Q# I' }% k" A, U2 g else
4 Q7 k3 q. ~3 T% R promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),3 P" R. ?( [( ?' n: T9 S
to_str("in docking station: \"",?.~.name,"\"")); / ]$ T: |$ X3 b% L" F0 v
end;6 _5 h, z9 K3 t/ z. o
else
a6 M/ k! ~ \& R0 ?2 X @.Destination := assignLObj[1,row];
. |/ N' k% k/ L" X# k1 I end; " y, A R! ?( E# v! k% |/ t$ s
newDirection(@);
6 ^* E1 e' k2 X- U: H @.HasOrder := true;
2 m+ G) c0 Z3 F9 p, Y end; S: {4 n O$ O( }! Y0 d
end;0 @0 B% ~5 C9 t" D
end; -- of the method! V! a- d3 E9 I" ?& _
|