/* called by: entrance ctrl of the object 'track': V8 D; E* N9 D% d: M
*/
% M3 `; D. U; L; V& W- n7 Pis* N9 @# n* g2 O
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
& I4 c1 G, m" M; F1 b: K% bdo+ ^ q3 i( V7 _! L
Lan := rootfolder.Internal.Tools.AOLlanguage;; T/ k, _, Y& u+ {
if current = @.Destination -- else return2 l% T; {$ X+ [9 i* m+ J
then
2 V; ?& ]8 `6 x2 e- } @.Destination := void;3 v9 w) M& g% Q+ c1 j. H" Z
if @.occupied then/ k5 w4 e8 }, E. d; q
part := @.cont;
' g/ A, A- C& U t6 |* ? @.transpOrder := void;
7 A$ I i5 j9 P7 T part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
! F- G' [% S9 f% g9 W @,root.eventcontroller.simTime);2 W& D: ^! u3 P2 R# P' z' {
@.HasOrder := false;6 N/ x7 r# J. y' J
@.DrivingHome := true;
1 N4 q* r& T% s f/ }1 r rgManager.tryToStartTransOrder;
! [! \5 S2 ~6 b$ ] if @.Destination = void1 M3 v% m8 J- d# e" I5 d: M
then -- no transport order for vehicle @+ H0 u# h% s8 `7 n
@.Destination :=7 I8 r2 o/ A6 L3 b! h
rgManager.nearestFreeStation(@,track.~);. U4 P2 S, E! k; W1 e
newDirection(@); 8 L, `+ E; U" v1 P; w" D
if @.Destination /= void then6 N# f: ~% h6 r: o8 h
@.Destination.NumReservation :=
# O) i" _3 }# u0 X: x3 q0 y @.Destination.NumReservation + 1;
& X5 G9 b: x4 u: ]+ u end;/ }' V6 R. F1 T1 T( E
@.CurrIcon := "drivingHome";
" d4 ?* ~9 }# L2 @ @.DrivingHome := true;
6 q7 g4 h! L% T" p1 \% h/ |3 v end;' w$ a* a6 A% V% r; M
else -- the vehicle @ is empty, both vehicle and part are in the same dock station. p- _0 p$ ]$ K) ?6 k+ D% ]
part := @.transpOrder;
; e: P# G1 l! E9 U part.move(@);-- load part J& A5 _. u/ `4 K& B7 z/ C" o1 Y
@.CurrIcon := "load";# ^6 o G# l& y" M4 R
GlobalDistObj := part.globDestination;
8 B- |2 r+ M5 x; b6 c, x' W2 H; W assignLObj := rgmanager.rgAssignL;
! c* }* z) ~( r2 o& T3 v row := assignLObj.getRowNo(GlobalDistObj);
; ]* M( ^& O3 H- Q if Row = -1 then -- since 70
# R8 I2 o; H+ S3 G( Z& G if lan=1 then1 b0 o* l- f5 k7 N3 w) n
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),3 Y! @/ g# h$ G$ @) u- ~
to_str("in der Andockstation: \"",?.~.name,"\""));
) F- e4 ~7 @9 n3 j, y else) |5 e) I9 c6 H5 v
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),! j+ a+ G, n# n" C. O: t p; F) V B
to_str("in docking station: \"",?.~.name,"\"")); 6 E0 _- X" {: y4 S! G+ b1 }% Z
end;. K2 ?7 T s, B$ D9 |. z
else
# P; y7 T( n8 [- b( e) c @.Destination := assignLObj[1,row];+ T3 v: q) j3 m, a0 N: A2 ]
end;
# o1 i: \8 N8 S) H6 ?8 u newDirection(@);) k2 @" X9 X9 x! }$ l7 t* m
@.HasOrder := true;
) ^4 |) i( \8 d- M% y @/ `3 I( q end;3 R8 Q+ }- R& k$ l7 [, ^! ^: p
end;4 p/ N. d4 G9 b! i5 U
end; -- of the method! ~' X7 X) R4 H* `# u/ w
|