/* called by: entrance ctrl of the object 'track'
. h4 S+ ?/ u% b% K& q* s*/
. z$ t1 \4 X! q, x) a) c# Ois. e( i/ y# ~2 `6 L' l' H" u
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
8 O$ a# C6 i4 U: z& ^$ ^# pdo
( ~, @! P/ k& h Lan := rootfolder.Internal.Tools.AOLlanguage;5 x* |4 I$ [6 K8 [) n, G- o* f; ^5 M
if current = @.Destination -- else return
$ c+ {% @3 e: k: o then" L# X: X8 b# S) K9 m1 [+ u
@.Destination := void;. I( i: w) E# v3 c, ]) A' R
if @.occupied then
' F2 x0 t$ @1 M2 \, n) { part := @.cont;9 b, Z# e: s4 w+ Y2 H
@.transpOrder := void;6 @0 ]9 U% I* [! M
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
0 h, `+ @! g$ l @,root.eventcontroller.simTime);
+ h/ s& s, a$ I+ K% F @.HasOrder := false;
, q: [ w% H3 \3 w+ \$ b; b, E @.DrivingHome := true;
$ a* i& F) p! e1 Q' N rgManager.tryToStartTransOrder;
# m' W$ j5 w2 t4 S2 |9 ] if @.Destination = void R! _. F8 Q5 K# T2 Y: f
then -- no transport order for vehicle @0 n3 C, u) l# J
@.Destination :=6 U$ A# C5 l7 \0 L8 y7 j p
rgManager.nearestFreeStation(@,track.~);5 n+ ?! ~: C- W: F6 A
newDirection(@);
2 b# Y2 [9 f8 n7 o. ~ if @.Destination /= void then6 W% q3 S6 f, Y
@.Destination.NumReservation :=
/ S9 r) a$ S0 A: K8 v! r1 ` @.Destination.NumReservation + 1;
3 ?1 p# j+ V! e end;
3 p- |1 g' m6 x e& ]4 N @.CurrIcon := "drivingHome";
& Q; j( B m- {9 Y3 L8 _0 e @.DrivingHome := true;' D1 F% |2 X8 r& y8 w
end;- z/ k0 Q+ t0 s/ F+ n% }
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
) A( j1 f: d& H) z: O part := @.transpOrder;
) u" Y( o1 ]( U% {2 J" U part.move(@);-- load part/ Z$ `1 s) T1 l8 h
@.CurrIcon := "load";
# |) Y( n, {7 g' T GlobalDistObj := part.globDestination;6 K5 x* x0 c" E, x
assignLObj := rgmanager.rgAssignL;
+ S" d4 @/ n( x& X) `3 V5 T row := assignLObj.getRowNo(GlobalDistObj);
) r& t; O# q% a if Row = -1 then -- since 70+ c5 L2 D3 G0 h* k. W& M1 v
if lan=1 then
- X/ b& f& Y9 m- k3 I6 q- D promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),4 o: @" l' q6 o% e1 t }4 g' J5 L
to_str("in der Andockstation: \"",?.~.name,"\""));5 P% `! t2 Y$ i& ]
else
' W d4 n6 \: T. {2 y# [ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),; E. B' \! w, l8 M, z8 s
to_str("in docking station: \"",?.~.name,"\"")); % S' e# ^% d1 n w3 {8 [1 x
end;: _! D# c! j" o( {
else
7 Y b' o# x0 g8 `' R5 h, L @.Destination := assignLObj[1,row];3 c& g$ Q* b) y" q
end;
- Q- e } l" D! I; q; |: ] newDirection(@);/ P7 _2 b6 Y8 O- `$ x, c
@.HasOrder := true;
# L( h. o- z" J: S- E- K end;$ s7 X9 O& F% g* \; }
end;& G: z" R8 J/ F7 h* U2 H3 e% d2 D
end; -- of the method$ D9 ~2 a/ U: ?, q& m3 e& P
|