/* called by: entrance ctrl of the object 'track'3 i( Z' @1 V3 z3 d9 E/ x9 W
*/
0 U3 D r) h4 h1 n5 \is
$ n4 ~6 }+ u% n" a& h part, GlobalDistObj, assignLObj:object;row,Lan:integer;
& G# Z, c: D3 G- {do5 s7 F$ k( o2 W# y
Lan := rootfolder.Internal.Tools.AOLlanguage;
# _: n# Q# V ?* R x+ i) |0 r/ y if current = @.Destination -- else return
1 ~2 k) Z1 P8 C then
6 H# ]/ l" ?4 A @.Destination := void;
?) M. W( p) _" ^" h9 r if @.occupied then
5 h# ]% l4 x5 w2 C% |, F part := @.cont;
j# N. R& a5 i. P; n0 q) ? @.transpOrder := void;
- r) n* |$ Q5 m+ k- }, ~ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,, I$ {& ?, N& N& y! l$ A& ]4 Q" H
@,root.eventcontroller.simTime);
. i& D* U6 F8 V" n5 F2 W8 Z2 Q @.HasOrder := false;! k& C8 ^) e( m% c
@.DrivingHome := true;1 I; F- e, \4 |( q- K- f
rgManager.tryToStartTransOrder;# ?* ^3 G, C8 |: l m) V, t3 g
if @.Destination = void
# [- E5 G# M) _, @5 k then -- no transport order for vehicle @
$ x, k n. t3 ~' j: ? @.Destination :=: }1 C2 x8 Y7 g$ q# g
rgManager.nearestFreeStation(@,track.~);
5 |/ a1 }7 d! n) E newDirection(@); 6 o1 \- M. e7 n% l1 F
if @.Destination /= void then6 @7 j' _+ n& d9 ]& f7 Q3 x
@.Destination.NumReservation :=
' t& @! |9 [2 k @.Destination.NumReservation + 1;
3 F p6 q; f9 H* J+ H end;
- h2 `. X' N, {, u5 n- _3 _$ N @.CurrIcon := "drivingHome";, p/ A7 g# A) k, V
@.DrivingHome := true;& v0 p" }( g1 Q+ e
end;
{, n' q H- f else -- the vehicle @ is empty, both vehicle and part are in the same dock station5 D* a% R! }$ [. _7 ^, \8 ~
part := @.transpOrder;
. g/ D- Z. Z$ W& G; x. U part.move(@);-- load part
9 R$ o7 o, @. g6 v9 O$ F* b @.CurrIcon := "load";& H) ^1 L4 V& x* r( [1 X
GlobalDistObj := part.globDestination;
1 B- w' y# t2 f, O$ q assignLObj := rgmanager.rgAssignL;
6 a; d; u" M& g# n" Z: \ row := assignLObj.getRowNo(GlobalDistObj);
4 Z5 G. S& [$ P, z- t if Row = -1 then -- since 70
2 t$ S7 h) P# B+ ~ if lan=1 then
, }/ x: X8 m3 J' y1 \, g" B7 J- u, ] promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),- q+ b# o: N1 \7 r0 a2 a: G" q$ H
to_str("in der Andockstation: \"",?.~.name,"\""));
& C% {8 Q* [' }7 l( j- q else- T- O6 y$ I+ J8 I, S* M
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
7 Y( Q9 K3 \# |& P to_str("in docking station: \"",?.~.name,"\""));
y6 R4 @2 v; I$ N- ^ end;- D* M/ T4 N- m* [
else
6 g% A- p5 B' z3 @ @.Destination := assignLObj[1,row];
7 B# h" B" d7 U% G end;
* G8 }) f7 z% S H4 \* G+ c newDirection(@);2 f; H% a5 T6 S* b
@.HasOrder := true;( T4 L" f: P) r6 Y* Q
end;% U+ G# X8 `$ r
end;5 d0 ?' t- A' b' i. @+ {: B7 Y
end; -- of the method2 h4 @% z$ N( Z2 h- t; Y# _
|