/* called by: entrance ctrl of the object 'track'. M% c' h3 V, Q1 J1 N1 _
*/
, m% p" Z- @4 n9 Iis9 ]" L+ H) i1 U
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
8 }# L# J3 r$ h/ [- Mdo
% [- S1 N4 ]5 R Lan := rootfolder.Internal.Tools.AOLlanguage;+ `/ p, Q* V2 Q( }- D- O
if current = @.Destination -- else return5 o$ x+ F9 w8 k+ _
then$ } K, L# p5 m
@.Destination := void;( u! t# @. q2 z9 C E: \
if @.occupied then
" L7 N8 D l$ `$ j part := @.cont;+ U M8 [' E4 C; h
@.transpOrder := void;
6 s! |. D9 v9 `. o& R' Q1 P part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1, }6 f2 [" F/ f1 T$ J w% h
@,root.eventcontroller.simTime);
- L1 S; I& }, w& W6 k9 ?4 b& j @.HasOrder := false;
2 f. `; L/ S5 ]: W7 ]" r% V2 _ @.DrivingHome := true;
2 }: a9 h+ a1 |+ U* H rgManager.tryToStartTransOrder;
) E$ y! w% k6 ~( ?* z+ v1 j& [3 S if @.Destination = void
8 t+ |; `4 H q, i: q& H then -- no transport order for vehicle @
4 D) r- b" ^+ o @.Destination :=- G6 P) @" o! V# z, m! U; H
rgManager.nearestFreeStation(@,track.~);
3 Q! s5 T+ V+ D2 U: d, v newDirection(@); ( N! O. j1 e& I% A f
if @.Destination /= void then
% E$ K7 k; Q# m. `$ o8 ~ @.Destination.NumReservation :=
3 l* N" @5 o( V @.Destination.NumReservation + 1;
! c" i5 b! x+ I end;
/ H0 [6 X0 d6 z b, R Y! W! i0 t @.CurrIcon := "drivingHome";
: ^6 S& B, u( a/ k6 Y8 }# [ @.DrivingHome := true;
6 U% q1 D; n5 w. f$ I/ ]) S3 n" S end;
* \0 ^' Z4 @) [9 c8 C, u2 W else -- the vehicle @ is empty, both vehicle and part are in the same dock station
( x4 }7 [! w; ], g part := @.transpOrder;, D6 J( J* ?) a# b
part.move(@);-- load part
, [: e# i0 m7 B: [9 U @.CurrIcon := "load";+ |, G- d2 N2 Y: ?- G3 W: c
GlobalDistObj := part.globDestination;1 _: z; M& W0 K7 K# [
assignLObj := rgmanager.rgAssignL;* H! J/ u' F) {$ i
row := assignLObj.getRowNo(GlobalDistObj);9 r; R% t2 V/ O/ r$ ~1 H( o
if Row = -1 then -- since 70
+ [$ C& ]( u8 w4 Q0 Y if lan=1 then
! }# a: O7 J5 h7 b% | promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\"")," m& S2 Z- p0 z3 f. `
to_str("in der Andockstation: \"",?.~.name,"\""));
8 V+ d/ J1 X! T3 z" }' p1 r' \ else
6 M0 r" K2 H0 ?( D1 ~6 i& T promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),; k1 L# y" B; J, ?0 z8 g
to_str("in docking station: \"",?.~.name,"\"")); , R" {( u: h" s+ `* Y4 r! t
end;' ^! p. K" ?* y+ z, |
else
+ D* `1 E A. M. N @.Destination := assignLObj[1,row];
( x$ M9 J# N! C5 V, x0 e end;
' D8 W% q8 G! F; W4 X- B' B newDirection(@);
8 K, M9 t A: [8 C! | @.HasOrder := true;& |, t- ]) z) J
end;
6 Z5 ^ P% i3 D( S9 x4 O end;
, W n- w; g C+ ?7 z) n; h& dend; -- of the method" P9 @- a% l8 ~
|