/* called by: entrance ctrl of the object 'track'& H' e& |" l# T/ M* A: }% \3 W
*// i) G8 ~$ k7 g6 _9 i
is
7 x3 u& d3 x) Y part, GlobalDistObj, assignLObj:object;row,Lan:integer;% A% m* o8 x6 l- U, [9 Y+ l
do, [6 b! Q+ G N. V8 a6 {
Lan := rootfolder.Internal.Tools.AOLlanguage;
# g0 t2 G- Y3 p7 W7 d7 j2 j9 n: W# t+ G if current = @.Destination -- else return
- K. Q" X6 z) }# k6 N/ b% C then
, i0 O/ C6 Z. J3 \# Y @.Destination := void;( ]/ ^0 n+ b O2 a a4 t
if @.occupied then
5 {# N4 g$ L: {" G part := @.cont;" ~' n9 T) X0 {) Q) o
@.transpOrder := void;/ x+ S* E, [3 }! R2 H0 Z
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,0 Q8 e/ A- k5 {$ d' [9 E, B/ A8 Q+ {
@,root.eventcontroller.simTime);
9 G; G3 i m2 G% j& g, z2 }) \ @.HasOrder := false;
% P+ H+ O: N$ ~/ U' q @.DrivingHome := true;2 c4 c* z; f. K( X# }
rgManager.tryToStartTransOrder;
4 [0 K: [( X9 v5 c5 {( ]; k0 | if @.Destination = void4 `- j7 S# V: S" M8 r. e0 s |. ^
then -- no transport order for vehicle @6 [% G) ^7 p5 l5 |" u; h
@.Destination :=2 N: Q$ T5 Y! v
rgManager.nearestFreeStation(@,track.~);0 J/ k+ z7 e" Y. B. q" ~6 _
newDirection(@);
0 o+ Z7 C9 y: u, ?* D4 a if @.Destination /= void then
/ b0 x% R# k# F" z' v& f @.Destination.NumReservation :=* ?# U+ M; _! N% |0 P+ }. n; P6 Q
@.Destination.NumReservation + 1;
6 b' q1 u4 l( F) t8 G: }/ T end;" [2 v3 {/ c" Z
@.CurrIcon := "drivingHome";
- [9 I5 ] m7 J4 B( s @.DrivingHome := true;' w2 }) S& o& }( M" h9 ?' S; l) n
end;
8 a3 B3 ?+ k( N2 G else -- the vehicle @ is empty, both vehicle and part are in the same dock station
" d* v; H, j' n5 B1 Y$ S part := @.transpOrder;
1 U9 s* y; n: A- B, B part.move(@);-- load part
8 J* i& T2 s3 C+ }" w @.CurrIcon := "load";- c+ [! ?' v' H" m/ F
GlobalDistObj := part.globDestination;$ i4 B4 m/ \4 i" ^/ g
assignLObj := rgmanager.rgAssignL;
! p% g& e/ X( M row := assignLObj.getRowNo(GlobalDistObj);
6 e+ r8 |0 N% B& {* O$ M) l if Row = -1 then -- since 70
+ C5 _- W: J8 D s' X* h, ~+ Y if lan=1 then$ S; c1 }/ b+ }% f1 Q2 p
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),8 Z5 G2 F1 [( H. f% q9 K
to_str("in der Andockstation: \"",?.~.name,"\""));
4 K4 p# ]3 I- P" [ else
6 d* N9 B3 G$ \. m promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
1 S7 M. V- B) Y# B5 n to_str("in docking station: \"",?.~.name,"\"")); h7 N0 c, K9 p: q
end;% f) ?* Z, q* G4 L0 e" O0 i {
else
5 ]2 w- l% ]+ T) c @.Destination := assignLObj[1,row];7 q' H0 S% p* G3 a- M9 d0 N
end; ; [1 y" h; ]8 N8 t& c
newDirection(@);
! R/ D# C) n. Z5 l$ b @.HasOrder := true;
+ _) r: @+ ]* I& l+ Z9 d8 [& ~ end;. U3 h& f+ D5 r% i
end;
6 p2 g* O0 |* Y3 d' i$ n7 ?4 oend; -- of the method5 j2 e5 O, v' {% U$ P: K6 m
|