/* called by: entrance ctrl of the object 'track'+ B( L) s4 b- @. R
*/
2 v7 T; B" h+ S/ w! _is
& I/ v: H# ~3 e2 ? part, GlobalDistObj, assignLObj:object;row,Lan:integer;
, {$ R) D3 [" h8 W! T0 fdo
* r+ \* i" y0 ` R, u0 e Lan := rootfolder.Internal.Tools.AOLlanguage;
2 y6 u3 D7 p/ E6 d if current = @.Destination -- else return! N' h/ J7 [' F) b4 y* u
then2 B3 n$ a2 F: J. d9 X" b T5 G) x
@.Destination := void;
& a3 w$ Z# d/ r if @.occupied then4 `, H3 k2 p6 R- h" @' Y
part := @.cont;2 }8 b i" r0 M2 I* c! b" L
@.transpOrder := void;' N) L+ r! c g- b6 o- y8 y
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
- t( y4 F; c* o2 S$ l6 m @,root.eventcontroller.simTime);" R$ C( Y& |) G5 Y) ~9 ?& c
@.HasOrder := false;
6 E+ G$ o. A; p6 o! J. o @.DrivingHome := true;
0 v0 M5 e; V: B rgManager.tryToStartTransOrder;; y* ^3 P5 x+ {, Y, e: z" |" I3 i
if @.Destination = void# S- p2 Y6 L% F: A# a
then -- no transport order for vehicle @
$ ?" f2 o0 i5 d9 b3 Q7 |) ?* o @.Destination :=
# I: O, |' @3 x S- e rgManager.nearestFreeStation(@,track.~);
; I5 L% x# E8 n4 l9 P* E1 d newDirection(@);
- X# I) k& H+ C: Q if @.Destination /= void then3 t# u/ y" _8 F7 Y+ r2 j0 |; e
@.Destination.NumReservation :=
7 S/ ?3 ?) z6 q; X3 x6 L @.Destination.NumReservation + 1;
/ m) k0 d( H1 @" G; ? end;
% ^' z1 R8 {, d* U7 t1 x/ _: e. x m @.CurrIcon := "drivingHome";+ ^- j3 O2 f! |; b1 [
@.DrivingHome := true;
* R* S5 U5 K \0 G5 K Q end;
6 ~' e3 n+ H- R$ D+ N0 V else -- the vehicle @ is empty, both vehicle and part are in the same dock station! i. d. R: N& ^* |6 x
part := @.transpOrder;
% Q6 m! O, W% S4 U' o* e part.move(@);-- load part& ]$ _) t) G( p! i4 V
@.CurrIcon := "load";
$ `' ?, @8 O5 `& I( A GlobalDistObj := part.globDestination;
" A9 O% s' q. S; \5 v assignLObj := rgmanager.rgAssignL;
0 Y2 \ {( V3 |3 a5 k row := assignLObj.getRowNo(GlobalDistObj);
" }: L% o% f1 I, y) Q if Row = -1 then -- since 70
+ t, \, l: z5 q& \$ W if lan=1 then
1 ]- T0 ?( }4 l' f, ?, V* K promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
: \8 l3 H5 Q$ l( ~: J- O to_str("in der Andockstation: \"",?.~.name,"\""));9 I$ A: l. P' ~8 {! c
else
- c6 W* X9 N% V! Y" o3 Y% y: l9 l promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),/ ]" ^7 a1 H+ e( p' D
to_str("in docking station: \"",?.~.name,"\"")); ( y, V" J( g# p% p h2 Y D! z
end;# u9 }* r# s* U f2 B7 |
else( l/ l; A+ _2 V/ |3 D6 }8 i8 P
@.Destination := assignLObj[1,row];* O9 t p$ T- c
end; ( r& a5 z* H7 ^# u: U
newDirection(@);/ k. X0 [. K6 U6 s7 l" W; L' E
@.HasOrder := true;
% g) x% ?2 W; V end;
( g; Y2 ?! _. U1 a& \: h, q/ g end;
& y* S! ~; a8 w$ ]end; -- of the method( C' R* t q2 G$ ]0 s$ A
|