/* called by: entrance ctrl of the object 'track': |7 ?3 \3 J6 S8 a9 ~
*/
9 _6 E" O3 M o0 c9 Xis
% `4 C7 l2 I" E1 P2 t+ v; B part, GlobalDistObj, assignLObj:object;row,Lan:integer;
; C1 g0 y. |( {) Y! @2 ^( pdo
9 @% t9 f0 ~; O7 v# A Lan := rootfolder.Internal.Tools.AOLlanguage;
7 s1 y2 ~) L$ F _& | if current = @.Destination -- else return, o$ \1 ~3 C$ q. y7 u
then
2 e# C( H7 M, x @.Destination := void;5 [" ?, o4 [( D5 i% \
if @.occupied then& [7 [9 M( Y2 G/ K
part := @.cont;1 r5 s9 `1 k7 s/ J) b! y5 J, Q
@.transpOrder := void;
8 w3 `9 W9 @4 r2 Y' r1 L* p$ _ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,: i; |$ E' B8 Y$ x" z: I9 Z
@,root.eventcontroller.simTime);7 s, q0 J0 j$ T3 i2 D1 J, S
@.HasOrder := false;
& ~# D+ C' k& ?: d" g @.DrivingHome := true;) s; s# |3 `. Q+ @& y5 n
rgManager.tryToStartTransOrder;% A$ X9 L h m! u: V3 w# R
if @.Destination = void
5 b' j# |. ^$ j- V& o' X+ L then -- no transport order for vehicle @7 ]9 l( E Q4 N) I
@.Destination :=
2 C `1 S3 t6 ?' L6 v: Q rgManager.nearestFreeStation(@,track.~);
; J7 L2 U' Q/ E# P newDirection(@); , {/ _! y0 a2 y8 Q& Y
if @.Destination /= void then# m3 J4 c$ z9 U8 Z
@.Destination.NumReservation :=
- V2 [' j/ }) c$ y& _/ M @.Destination.NumReservation + 1;+ |% r; K( S' ^* |, F/ w$ B
end;
q, M$ W% K4 i3 \0 f @.CurrIcon := "drivingHome";& O$ i! E5 o7 r' V |+ f2 F
@.DrivingHome := true;% F* T! f# X0 R. H! ?- N# J
end;
( L) q1 Q v( X5 ^7 \/ q: c. o+ B else -- the vehicle @ is empty, both vehicle and part are in the same dock station2 i7 S6 F0 ~; x" g- a
part := @.transpOrder;1 U+ [" T7 C4 x# |; E( G% p) h& P
part.move(@);-- load part
3 E3 o; h3 g7 B/ x5 u% [ @.CurrIcon := "load";6 p9 d9 o( `7 \
GlobalDistObj := part.globDestination;
+ C- k; e) c+ d+ p( d9 i0 C: z+ e assignLObj := rgmanager.rgAssignL;# }) @: `# W% u2 D8 n6 ^& P
row := assignLObj.getRowNo(GlobalDistObj);$ b2 t& |0 X# F* f
if Row = -1 then -- since 70/ {$ ?& i' j1 S6 j* P. X
if lan=1 then d* x4 a1 A' }+ j
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
- h. v+ C, g9 f. V1 ]' | to_str("in der Andockstation: \"",?.~.name,"\""));) ~0 E5 y4 E N3 e W
else- f' o, \* g2 v$ V* l* w
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
& \+ {( }# V' v& _; b to_str("in docking station: \"",?.~.name,"\""));
0 a* L1 Q3 T2 V- M4 F7 t+ @% f5 U$ T end;" V, A# A% \3 p3 K
else0 u1 O, \0 Y" X3 B/ V. w& M
@.Destination := assignLObj[1,row];
; h% T4 P8 k) W. v! D end; % i( X5 b, r# W7 m
newDirection(@);
; [$ S, t' I. z, w n- S @.HasOrder := true;1 I. Y4 ^: h8 j r% h$ R! P, j3 B
end; K$ T% @- j- M& s8 N k" {4 c; o) t
end;: l, ~9 r. U/ s) ?$ {* l$ s
end; -- of the method
7 T: H" N+ ` H0 H d |