/* called by: entrance ctrl of the object 'track'! o$ |! U0 g, l* A* v' D4 S3 j# g
*/
7 R0 Y$ I: o# `' ais
/ L3 w* f4 N8 Y* _' s' y/ o part, GlobalDistObj, assignLObj:object;row,Lan:integer;
: Q6 @$ v7 U8 N* t4 qdo
" `: c- g6 Q, l- W) ] Lan := rootfolder.Internal.Tools.AOLlanguage;
, C0 \5 |9 f& S) S; V* Z5 R5 \! e- \ if current = @.Destination -- else return9 J) Q4 K( X, c) u" [$ e; M) F
then
8 G- a5 b# k; B @.Destination := void;
7 E4 Y' r* I4 E" ^5 s if @.occupied then
% Y* y# U0 F% \ part := @.cont;/ X' \2 F) ]* C! ?! L/ J& {6 g; l
@.transpOrder := void;3 B3 j) _. a' E* F! D7 Z
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,& E- X: X! o5 M: X% g- L8 S7 I
@,root.eventcontroller.simTime);
, Z7 _8 f0 U! V2 _8 f3 j, p @.HasOrder := false; E' _3 P7 h, Y# i. b+ `
@.DrivingHome := true;) G, [" d. ` G8 P( f
rgManager.tryToStartTransOrder;
" F ]' Z0 q6 m9 {/ C2 n% X if @.Destination = void8 ^1 N9 _8 b2 Q7 }2 {5 p
then -- no transport order for vehicle @
; f6 ?: L$ d, k4 [$ c) S @.Destination :=2 R0 z( s: C* O( k* a/ c
rgManager.nearestFreeStation(@,track.~);
& f5 A# x; B& s5 L; H: p* m1 w" B# h d newDirection(@); ! t9 A6 ]1 s/ t1 x5 g2 k
if @.Destination /= void then- v+ y" Y5 s; o1 w! O7 m) k
@.Destination.NumReservation :=
1 @- o- u* f0 g+ Q+ @1 |) x @.Destination.NumReservation + 1;- e4 j* h* y( B
end;3 x" }6 M3 V( j% a! L
@.CurrIcon := "drivingHome";
9 {7 d" {+ r& D @.DrivingHome := true;
. h0 Y ]2 J( @ t end;0 k6 O1 l6 _( G3 j v/ N7 M; I/ |
else -- the vehicle @ is empty, both vehicle and part are in the same dock station& e& ?- `+ `+ A4 O: e9 k
part := @.transpOrder;( Q. }- K! V" a: k4 s
part.move(@);-- load part0 F7 T s+ u6 G! b7 `. [, {; d0 P
@.CurrIcon := "load";4 A) `( p V U- l1 b8 H; V
GlobalDistObj := part.globDestination;7 Q v: z5 D7 E
assignLObj := rgmanager.rgAssignL;
- ^8 }! r7 F$ M; H row := assignLObj.getRowNo(GlobalDistObj);
1 s% f- z& s! U if Row = -1 then -- since 709 h; S' S6 o8 T H
if lan=1 then
% d) W; ?! n3 |1 }' E& f1 f promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),- ]6 r0 a2 g @& p% G' h$ x
to_str("in der Andockstation: \"",?.~.name,"\""));
3 W$ y5 V i' u9 E9 h else
3 f z% N. C9 v1 S* k promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
, O9 g6 d# I1 J- V- H to_str("in docking station: \"",?.~.name,"\"")); # e* i2 p) L& a# Y) |
end;3 n% G7 K; }+ O8 b1 T$ v9 A, j
else. C9 I2 T9 S; o5 L* r) T
@.Destination := assignLObj[1,row];, `8 H6 q/ q( G: \) g2 h
end; 7 @$ s7 y- n7 S8 x' x" N$ T4 K
newDirection(@);2 p3 ?/ e$ e! Y0 t+ Q5 g8 q7 E
@.HasOrder := true;: p+ S) U7 _, o N# Q
end;% L8 t% g( {) e' J, c/ ^
end;7 ^8 q% s0 u8 W! O
end; -- of the method( E) f( ^, g6 g, J9 Y" K, i! q
|