/* called by: entrance ctrl of the object 'track'
4 b/ T0 f* h( G5 A*/! n3 a* |7 x7 _6 X# C
is
6 l5 I3 s$ w3 k' M2 K$ ` part, GlobalDistObj, assignLObj:object;row,Lan:integer;4 w: o) o/ L( I; Q& L; t" O3 C, N
do- O% V$ R$ b9 Z2 f# u1 B0 R1 C
Lan := rootfolder.Internal.Tools.AOLlanguage;
# W, e7 S! r, A9 b- t if current = @.Destination -- else return
5 E+ ~, W! F- t. V9 ^ ]; b6 D, O then
& Q/ _/ d K, C# Q7 g+ x @.Destination := void;
5 f7 h h+ @' r if @.occupied then M3 h8 @2 \, ^" U$ L. X8 g8 E
part := @.cont;
! x5 e, l4 P9 ]5 o @.transpOrder := void;
* W$ J2 a" G a/ }0 @- ~ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
9 z+ q/ |0 W0 @' a @,root.eventcontroller.simTime);
7 K3 u* K/ Q9 m, g) Y) o @.HasOrder := false;) I0 O( X7 W( c" H% t; t( x' E* R* h
@.DrivingHome := true;& x- P( |% E- f+ @$ _- ~3 ^8 o& Z
rgManager.tryToStartTransOrder;
2 H) u" ~, _/ _. Q) y if @.Destination = void
: ~6 \5 H' m4 Z; g+ ~5 t+ O then -- no transport order for vehicle @
: z# q! y- q- }; J W' B4 \ @.Destination :=/ F+ {- \/ f1 l8 L' F. n
rgManager.nearestFreeStation(@,track.~); W1 P/ A/ d6 {
newDirection(@);
9 n5 C6 N* Y. t4 o if @.Destination /= void then
) F$ W5 s$ S D& X T( P$ B @.Destination.NumReservation :=, c. d# Z6 |2 w0 s
@.Destination.NumReservation + 1;' x& [* e( @5 B6 q, w
end;& {4 X" N0 q9 u+ k+ ~& T+ r7 y
@.CurrIcon := "drivingHome";
7 ]' q# R6 I3 Z' M4 b8 L7 ?7 d5 H @.DrivingHome := true;
0 u7 L- q# f3 }1 V' j( e end;7 b2 Z' t( z" Q. y
else -- the vehicle @ is empty, both vehicle and part are in the same dock station; Q4 n' h9 D6 ? }7 h B/ R* |7 y ?
part := @.transpOrder;
) N# ?" J/ }) U z7 V part.move(@);-- load part
( d+ R& d5 O9 o6 b# K8 P5 f, _ @.CurrIcon := "load";
( d, y# v8 ^6 D( A/ ]9 F GlobalDistObj := part.globDestination;
4 S1 d/ e4 K; G; x1 V; ^6 O assignLObj := rgmanager.rgAssignL;
! E( q2 Q3 J1 O$ Z) h- s row := assignLObj.getRowNo(GlobalDistObj);% L) r9 J& ~' w5 W7 D! b$ |! s
if Row = -1 then -- since 70+ [) p/ F2 ?" V' g5 i2 [
if lan=1 then# V8 r4 }$ B) ?: L% Q7 h
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
; r, \% }- M/ b to_str("in der Andockstation: \"",?.~.name,"\""));- s: h% Y0 }) \4 U, {
else
9 `9 X0 n* m1 c; Z& d promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),- e9 L. h* v, `5 o
to_str("in docking station: \"",?.~.name,"\""));
9 P+ C r$ ^5 O0 K9 o2 A end;
- E6 H" y1 `, ?4 \9 ~. n2 D/ Q# ~ else
- B% Z; e7 o/ m" \6 v @.Destination := assignLObj[1,row];4 z: @ ]! G( n- O3 C* x* d
end; - X- e# k$ K1 O* Q4 w4 V& a
newDirection(@);" y6 [$ _* M4 A; ?- I( E; n
@.HasOrder := true;
' S! I+ @% j' W! Q9 _! { end;
0 }6 s" j/ Z0 [9 ~ end;. r& a6 u$ ]3 R7 [5 v: B0 I
end; -- of the method3 J8 Y4 l& `& f$ B; r) {6 f
|