/* called by: entrance ctrl of the object 'track'8 Z: ]/ P5 H Y9 ]4 z" L# |$ P
*/
4 p" M. K8 Q+ K/ D) `is
4 a1 m! a* l. c1 n( `4 P) r* e- f part, GlobalDistObj, assignLObj:object;row,Lan:integer;& T% b: z) H0 x+ L
do' J9 J2 \) U: K$ u
Lan := rootfolder.Internal.Tools.AOLlanguage;6 `+ T4 U$ l' X S
if current = @.Destination -- else return# i, I4 t! @7 a+ s, k' Y1 E
then
( G9 N9 m6 c% o# D @.Destination := void;
+ p) C8 T& i- K" L% t0 _9 r0 `5 J if @.occupied then
6 h: o1 |" y( M* z! p- N6 `8 G part := @.cont;0 ?3 j5 B, B$ o7 g* G1 B+ g5 T
@.transpOrder := void; q( c A- C8 A4 D* m' U2 l
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
v0 Y" {) O( b" `6 F @,root.eventcontroller.simTime);. J D( F4 [4 l$ w; H+ K
@.HasOrder := false;6 p: X! G! y7 f* |) A: c2 L: u
@.DrivingHome := true;! [7 M. r6 }& K; t# M
rgManager.tryToStartTransOrder;
. ?8 f. l4 h' @8 D if @.Destination = void
8 \1 i1 y( D) D2 o& P then -- no transport order for vehicle @* j, H7 S1 W2 Q6 q5 P% F
@.Destination :=
- _* t# I# Y- J( [) H rgManager.nearestFreeStation(@,track.~);5 t7 e0 M) T3 }5 }
newDirection(@); + {& L2 Q$ i( S$ K. Z3 Z* P
if @.Destination /= void then& Z( ]6 ?: C! s1 u/ K
@.Destination.NumReservation :=- X( W( j% _& O4 V( J* P
@.Destination.NumReservation + 1;6 w6 n+ Y9 j, G: S. X, n
end;$ I8 m9 M0 E/ M
@.CurrIcon := "drivingHome";8 J( h7 b. A: p" F. x) C
@.DrivingHome := true;
. }( [0 {2 c+ v- \5 w end;' i8 F* [5 U C8 h8 o
else -- the vehicle @ is empty, both vehicle and part are in the same dock station/ Z2 K r. N ?0 A( @! @
part := @.transpOrder;: N$ ^ Z) ^6 O
part.move(@);-- load part; h8 K2 `+ t6 F
@.CurrIcon := "load";
! B1 p& C4 S: W GlobalDistObj := part.globDestination;
. K: T. {+ l! s; r$ p- A assignLObj := rgmanager.rgAssignL;) T0 ? A4 ?$ w
row := assignLObj.getRowNo(GlobalDistObj);
6 V4 _2 [* a1 d5 s if Row = -1 then -- since 70
" T+ {6 c* _( { if lan=1 then
5 p$ o( K$ _ e3 L promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),& H: D. y: a( \; R
to_str("in der Andockstation: \"",?.~.name,"\""));5 g4 \2 S" z8 p
else* w9 F+ S- D k, V! u
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
) k' p- f' j4 i" ^ to_str("in docking station: \"",?.~.name,"\""));
! {% S B8 }) S; Y: R end;, H h- x: t$ F$ f
else
; J- C* _# P" w1 W5 d @.Destination := assignLObj[1,row];
( W. G& ?" ?; p. ?! I; E end;
: J2 \4 j* e) n( [! s newDirection(@);
w+ ?0 j% c4 z; x2 l( K @.HasOrder := true;
1 D$ F; C5 N2 |- Z$ [4 @& }8 \ end;
% L/ a9 [2 g4 j# O6 _0 p' P end;. O: i' F% z2 i. T1 v! Y n0 j
end; -- of the method0 d% ]# v1 W+ Z% g- O6 }3 b! o* w
|