/* called by: entrance ctrl of the object 'track'
3 x: {; [/ `) R1 ~4 P*/
0 f9 o! _0 b* s( J( {- sis3 }3 e$ T1 ?1 B3 z) K9 X
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
/ M$ X3 v4 a/ Ldo
9 i: ?8 t! L7 T2 I; f! W Lan := rootfolder.Internal.Tools.AOLlanguage;4 c) W! V$ O- R
if current = @.Destination -- else return
* Y6 [6 X7 `, [0 x then
. o& f, |1 U0 r% b: i% x) L @.Destination := void;
+ k2 i2 W8 G: q- Q if @.occupied then
8 o% w& u2 W! B) B4 E* c part := @.cont;4 k0 B- Z! i6 l) K
@.transpOrder := void;
3 N( `9 F2 I0 p2 F part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,) k0 m& x6 J+ H- d+ a5 O
@,root.eventcontroller.simTime);
, ]9 m5 m: J9 J @.HasOrder := false;1 g& f7 Q q" f
@.DrivingHome := true;- V ]( p+ G/ E' c: O& O Q
rgManager.tryToStartTransOrder;
3 C) \+ t$ Y/ D( s& g if @.Destination = void
+ A& V+ }) Y. ]9 f" w4 o0 T& E/ S then -- no transport order for vehicle @! H: ~8 c4 b0 W2 Q
@.Destination :=
$ _0 A2 R7 @8 f+ @6 u- a; V rgManager.nearestFreeStation(@,track.~);
9 s9 e! T2 P7 j$ Z, \" r0 ]! R newDirection(@); , Q# s; E2 [+ K2 G' ~
if @.Destination /= void then
0 R. u2 @! h5 o! v, o# X2 [7 j @.Destination.NumReservation :=" e; i4 T8 l1 Y% R- W- z) i- s
@.Destination.NumReservation + 1;: p( O8 V3 m5 e: y P* A- c' B( G" A
end;* \5 k8 W" M1 E* Z* t
@.CurrIcon := "drivingHome";
) w' j# k% v# D @.DrivingHome := true;: S0 K/ ?% u# U
end;
0 z8 q6 u# x8 E3 u) }, @4 e) z) p$ v else -- the vehicle @ is empty, both vehicle and part are in the same dock station/ m e( q$ Z& `1 i
part := @.transpOrder;1 V( G5 y% C% d$ S
part.move(@);-- load part
0 z" ^# d( R8 s0 `# b- B @.CurrIcon := "load";- h9 T6 j: a. c2 f n
GlobalDistObj := part.globDestination;
2 z. }, j4 o3 U- Z assignLObj := rgmanager.rgAssignL;9 c- A& x, Q1 j. C& @9 `( n
row := assignLObj.getRowNo(GlobalDistObj);
* Z) ?3 }4 B2 n: i7 u1 Z0 S if Row = -1 then -- since 70+ [9 y# J$ E9 H$ L7 k
if lan=1 then5 L' J- X9 V: X. V
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
+ z- M! C8 D+ G7 M1 T8 T to_str("in der Andockstation: \"",?.~.name,"\""));! {" h' n2 E& w
else
2 T5 N. w7 y4 n% a% M2 n+ g9 Q promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),+ `4 s5 m& I( c- {; K( R
to_str("in docking station: \"",?.~.name,"\"")); % @6 o1 l4 B- I! \1 w
end;
- |$ S& Z+ K2 V8 \. h- g5 ? else+ D- I# q9 Q' B' v5 E6 i0 [
@.Destination := assignLObj[1,row];
8 r5 N2 h0 n+ p# i end;
) F+ \( J; X% H2 i8 R& U newDirection(@);& M; r4 s* e) |
@.HasOrder := true;& c4 R9 F3 f2 C) c
end;
$ Q0 r9 t1 `& n! c3 e' h. p3 ]# g end;
+ f1 _7 E& d4 z1 Q' F9 kend; -- of the method! \2 I' P' _& N1 D' r$ \
|