/* called by: entrance ctrl of the object 'track'5 O6 S* R& o H Y }2 [) t
*/( o' `: w$ a! c+ C+ Q9 C" E
is0 r6 p; d5 w* {! {* c
part, GlobalDistObj, assignLObj:object;row,Lan:integer;. |( @2 i; a. ? i7 T
do
+ I! F* Q2 e+ ]# T: l4 o Lan := rootfolder.Internal.Tools.AOLlanguage;
5 t* G) d2 G0 z; { if current = @.Destination -- else return
1 x% X2 Z1 r0 R9 O U% S; I then
4 F' q/ m9 ]8 t: n& A4 g @.Destination := void;4 Z: f& [: P$ C* E6 p
if @.occupied then
6 s1 @+ L$ n" a9 T0 T part := @.cont;
3 _2 ^7 Z8 L$ W! x9 Y# M @.transpOrder := void;2 V r6 D+ P2 C1 D& U
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
& n$ \+ r |$ ~. \2 `2 ?- S @,root.eventcontroller.simTime);
[: p, a g, [5 f6 V @.HasOrder := false;
, p8 L" M6 s- [8 u% Q& X6 F @.DrivingHome := true;) R m5 q' l" v1 ^! Q
rgManager.tryToStartTransOrder;
5 q1 e9 V0 y8 I& s if @.Destination = void7 c. \/ ? {5 [5 q. ^& U$ f2 ~
then -- no transport order for vehicle @( v( n8 S% S" b0 W0 |6 _
@.Destination :=
! Y) H( @* u5 K0 P% C rgManager.nearestFreeStation(@,track.~);7 o6 b; B0 N$ C. v2 z' m
newDirection(@);
$ X& w. s+ E* i if @.Destination /= void then! A& U& q% @' g: W7 h& N& q
@.Destination.NumReservation :=
7 \, W" R; u ?2 u, R @.Destination.NumReservation + 1;3 F/ `9 n7 I; V6 f+ W% j. D
end;
1 D* P8 M7 g" \5 r5 k7 T6 H/ F7 s @.CurrIcon := "drivingHome";" u- n1 a3 d8 p; F- P1 y
@.DrivingHome := true;
: D6 H$ [& \6 z" \: u5 E end;" i3 A, t2 w* `" w2 y# u
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
' \2 N7 \3 b) ^) h3 j: H! ` part := @.transpOrder;# o& v" X! r; J7 q6 R
part.move(@);-- load part6 E" c- I' j0 u7 p
@.CurrIcon := "load";
! A d- x5 Z& V/ G. E& f5 j GlobalDistObj := part.globDestination;
2 |1 N# H/ o+ K3 D assignLObj := rgmanager.rgAssignL;
9 M& c4 b6 Q6 d# o! Q row := assignLObj.getRowNo(GlobalDistObj);7 a0 x( M# f- n+ R. v7 e4 s' |
if Row = -1 then -- since 70
- K- N7 e3 N2 u" v/ J& O9 C if lan=1 then
$ q1 C4 I! ~/ D4 B1 _( a promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
8 H' ^. k2 V' {0 l8 { to_str("in der Andockstation: \"",?.~.name,"\""));
% A! z7 \1 K+ R4 A+ e else* S7 f# B& M: f2 d" h. o# r8 X$ ? |
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),. M6 r9 j( E- D
to_str("in docking station: \"",?.~.name,"\""));
! s3 S$ H1 x; o! R% V. L" Q% b9 b9 u, c end;
0 N8 V; c% c$ m) y0 Q' P4 a' R else2 T1 J/ j; }: X# S# J& o. ]
@.Destination := assignLObj[1,row];
/ T4 J7 g8 P) l& A$ z c end; ' T" N& E& T' l# f4 ^! T" S
newDirection(@);+ `2 D* G J% ]$ @, p; o$ n9 u
@.HasOrder := true;
/ y3 ^. F' n T Y2 z end;/ k# W h: z% y7 W. K) \! X+ A3 h9 p
end;
/ ]: L Z0 r9 f! }9 k4 iend; -- of the method! r9 P$ O( y- c6 ~- o
|