/* called by: entrance ctrl of the object 'track'
1 z6 J) Z8 W+ A2 Z' m) P*/
( \# N' s/ H# mis
2 E+ {. s, h( x! a+ p. S3 T2 W3 e part, GlobalDistObj, assignLObj:object;row,Lan:integer;2 o6 o- D6 F1 E2 z8 j6 I4 S
do1 H2 u/ i7 t/ C g8 l9 ?; _
Lan := rootfolder.Internal.Tools.AOLlanguage;1 k/ ~% N9 E9 V) t& C) a8 u: j
if current = @.Destination -- else return
; E2 l, B; U6 z& C9 s' I/ ` then" `* w, C+ c- |, A8 i
@.Destination := void;' I0 D8 Y9 J+ Q q2 [1 o2 R
if @.occupied then1 x$ \" Z6 v+ e1 l6 H# L
part := @.cont;
% G( I3 W! [3 i x @.transpOrder := void;
0 w/ L; c" g! X# e _. c part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
w/ g0 g. O, l5 S1 W) @) Y1 \ @,root.eventcontroller.simTime);
& ^+ x" k- [2 C- J3 N3 j @.HasOrder := false; G+ o0 O; ^6 c+ `+ z. `6 B, q1 e2 Q9 C
@.DrivingHome := true;
' {* c! A7 Q/ k$ ` rgManager.tryToStartTransOrder;
2 ` s! M9 d: U" g2 ^ if @.Destination = void
, L. Q1 ^/ v @ then -- no transport order for vehicle @
2 }- p* P' V0 W3 E8 F @.Destination := K. D# }+ k0 _" n$ s8 t* Z
rgManager.nearestFreeStation(@,track.~);
3 W! y) Z0 n0 g! Z newDirection(@);
7 K) N# A! r, O# p1 B7 S2 I$ E if @.Destination /= void then
+ f( v0 o& M6 r/ t0 z: x @.Destination.NumReservation :=
, ^5 @+ t: L5 K, k2 G0 I @.Destination.NumReservation + 1;
- O7 M. \0 ]* b/ G. _; \6 V end;
! ?' G* Y# B8 ~1 f/ M# h4 V0 B @.CurrIcon := "drivingHome";
1 \$ \2 o7 `+ c: [ @.DrivingHome := true;' W! e% o `8 L- X& \/ j3 u
end;7 n& F7 O6 u9 C( F2 m
else -- the vehicle @ is empty, both vehicle and part are in the same dock station) m$ s/ |5 x D8 x
part := @.transpOrder;/ C! f& x' `8 [, g/ K% r! Q
part.move(@);-- load part
. V3 I0 T: i/ T& {$ ~* G4 P @.CurrIcon := "load";/ h: ~" ~/ E/ ?, L4 S8 r' \
GlobalDistObj := part.globDestination;
- s Q( {* f4 c& Y' j assignLObj := rgmanager.rgAssignL;
3 t1 f Z$ f, @! l( w$ E) W row := assignLObj.getRowNo(GlobalDistObj);" H+ U4 Q; R5 b: Q( i2 x, y8 |
if Row = -1 then -- since 70$ @0 M: v9 ]1 I, J/ S+ j) K8 G
if lan=1 then7 E/ b' D; S. W* F# V
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),) f) L% z1 L5 L d* G4 S
to_str("in der Andockstation: \"",?.~.name,"\""));5 z/ [, C% }1 S2 k$ c% O
else
( ]5 e; V2 K" t3 M# O1 @ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),9 Z# d d2 @0 b) O8 K$ n7 w
to_str("in docking station: \"",?.~.name,"\"")); 8 K$ W: | l. C1 b
end;4 J( a& X! G+ z+ v: D" C" u
else- z; W+ p1 A6 }; N, A) j
@.Destination := assignLObj[1,row];
+ s+ W* u& `$ B1 a end;
4 q* L1 y+ L. {! M" M newDirection(@);9 c3 d: c) G+ d7 i# t0 J+ u- l, b
@.HasOrder := true;+ {" U4 N+ V7 b+ t9 `
end;
+ Q* S3 W1 w. N% V% P& ~ end;
# j" F8 L3 A, ] X, fend; -- of the method
8 m0 x6 o% Q& m7 [6 D2 z- y |