/* called by: entrance ctrl of the object 'track'! z: X4 `7 w1 {& m1 Y2 y
*/
. m+ @* Y# ?: m8 J% L# f9 c1 e xis" ^, Q2 M# k* Y7 v$ }) N1 ^+ E8 E! w* w
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
2 k: x5 q) r3 ~; fdo8 J9 Q' [: S( n4 C/ C) u2 f
Lan := rootfolder.Internal.Tools.AOLlanguage;0 u: p$ X, P4 U. l8 l' T# B
if current = @.Destination -- else return, G6 i. H' c- M! a- H
then
$ V( F) J4 J7 A8 j" U @.Destination := void;
4 U* {1 O- m. X, N/ u4 {2 W! S5 k if @.occupied then/ z3 n5 v% Y" B/ C9 b$ V" Q
part := @.cont;$ u* c* C% }. I+ ~& g
@.transpOrder := void;
/ ^; H! Z' Z; F+ ] part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,9 E+ A3 q+ ~2 v, e1 ]/ W
@,root.eventcontroller.simTime);
2 Q$ s( r1 P8 ?; x0 b8 m3 K% w: [7 t @.HasOrder := false;* P0 ^& e+ d' r
@.DrivingHome := true;
4 w5 T: g, X; X6 L rgManager.tryToStartTransOrder;" J f2 H. u1 u! X! V; d( [7 O, P
if @.Destination = void
; Z3 {8 \9 p) t8 d then -- no transport order for vehicle @
% p' R: {9 s$ _( L) J' @& h @.Destination :=8 G; P$ y J% h9 K: @
rgManager.nearestFreeStation(@,track.~);7 c9 i) X0 p. V1 k0 M+ K0 X1 ]
newDirection(@); ) F/ u7 \5 \- K3 m& r
if @.Destination /= void then
) V4 R7 n x2 F* V9 N9 e& G! [5 W4 I @.Destination.NumReservation :=
9 K O& s- r v/ { @.Destination.NumReservation + 1;
$ x( a/ k5 f! X end;2 {: Y( V, J# s# }! G* U9 J
@.CurrIcon := "drivingHome";. H$ q# k; s. e+ m
@.DrivingHome := true;& I O1 @* ?$ i# [+ u/ q' v
end;
2 w$ t! m9 T7 p o else -- the vehicle @ is empty, both vehicle and part are in the same dock station
3 n! T& T' i, G part := @.transpOrder;' I4 G3 m! f" {9 J& u; V$ q6 W
part.move(@);-- load part
5 [/ z7 {$ a6 p2 I3 X @.CurrIcon := "load";% P0 ]8 t# @& G$ }. i- m2 B" @
GlobalDistObj := part.globDestination;
) A7 W6 {3 v {! h6 T assignLObj := rgmanager.rgAssignL;- E* {: v b1 Q8 H$ E
row := assignLObj.getRowNo(GlobalDistObj);
) p& P q3 \9 E: O if Row = -1 then -- since 70
0 B& t0 r& E& D5 }# V if lan=1 then
* s( r$ x/ O! M, s5 G, P+ I& P- g promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
9 X- I, V% C9 a" D" G2 c1 k" ` to_str("in der Andockstation: \"",?.~.name,"\""));5 c6 ^4 ~; G8 J9 S6 c
else
) H2 F$ t9 [" L9 Q promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\"")," m- f& Z e! D/ p. _( ]2 V* I
to_str("in docking station: \"",?.~.name,"\""));
/ D. ~ s) A+ j end;/ G- |2 I+ U% V: `$ n, k! }) d3 o- V
else* Y) i1 R# j+ R! S$ J! ~( P; r1 Z- @
@.Destination := assignLObj[1,row];
! x, Z) m: k+ Y3 A* a5 [ end; * ]/ n5 y4 f* K) u. z
newDirection(@);% G4 O$ H6 z# J
@.HasOrder := true;
0 I- e5 I# X0 r2 ^5 i end;* U% B$ @; \) `8 M H3 J& D
end;- q2 d8 S6 m. w9 ~
end; -- of the method
* @& C5 D9 T$ g! ?$ O# t: p |