/* called by: entrance ctrl of the object 'track'
: \) ^# } U' h5 L, |7 c" |, k*/. B# n7 l7 D. O& _/ K. P
is
% q6 N8 b$ N( x7 K8 ?& g. D part, GlobalDistObj, assignLObj:object;row,Lan:integer;3 j, Q$ e) v4 g
do
K) s- S: P. n! i- q Lan := rootfolder.Internal.Tools.AOLlanguage;" @2 i7 z7 h! |
if current = @.Destination -- else return# G( B1 K6 Y- ~* o* n2 c
then
, R2 t1 t) x. @" }4 E @.Destination := void;8 y2 R( z& A y J( \1 C, [) J8 E
if @.occupied then
9 q5 q. _+ I1 @: B part := @.cont;0 O/ u3 \1 C$ J( ]; L* r8 \& g
@.transpOrder := void;6 {! ~8 Y4 ~9 y6 s- {6 U( D8 `
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,, y7 `% l9 s! C, G+ Z! k
@,root.eventcontroller.simTime);3 p0 X- [2 A4 x- F1 u5 c
@.HasOrder := false;
# K4 t# A" Q2 ]! O @.DrivingHome := true;# ?, o0 X. _" |/ V; V+ o1 R- d d
rgManager.tryToStartTransOrder;
( N1 j [% a" Q% O- b if @.Destination = void
; i8 t9 B$ m d$ Q# {7 g" t0 H then -- no transport order for vehicle @9 ~5 I1 o% }2 U5 M- Q% I6 C! ^
@.Destination :=
. ^7 m- Y$ R O$ l rgManager.nearestFreeStation(@,track.~);! k$ }- d+ v; v7 s
newDirection(@); - U4 l9 D/ J( |5 a. G Z, O* d m
if @.Destination /= void then+ G4 t2 E1 N' f/ V2 M
@.Destination.NumReservation :=( ]4 ? z* p' s; {
@.Destination.NumReservation + 1;, I, k5 z& H8 i. s) e" Z$ v
end;! `5 b( V5 U3 s
@.CurrIcon := "drivingHome";
- ?8 D" K r4 x; K @.DrivingHome := true;
5 N0 V$ X) i8 Z2 a end;
) Q* M9 w. X1 T3 |6 E7 x else -- the vehicle @ is empty, both vehicle and part are in the same dock station! T4 {8 n6 k0 \" F% \
part := @.transpOrder;
4 s$ o( R/ n2 x6 s1 e# y part.move(@);-- load part7 i7 Y5 s, Q5 M7 n) m6 H$ Q0 l
@.CurrIcon := "load";
# `' {$ {4 Q3 E* M- Y4 K: S GlobalDistObj := part.globDestination;: M7 G5 \6 w [# J( b3 f1 y
assignLObj := rgmanager.rgAssignL;* j7 g3 q' B* F
row := assignLObj.getRowNo(GlobalDistObj);" X1 U8 }* y9 M% n# I7 @& ]6 B
if Row = -1 then -- since 70) m9 c- g: q0 ]) s* x' @. }
if lan=1 then
/ f X" E4 D4 M, u9 \6 A- S( _ promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),8 Z% [& v* g. G$ o$ G1 a8 }
to_str("in der Andockstation: \"",?.~.name,"\""));1 P- \2 P5 B# P- A0 [* e
else9 s% J# w. C3 `& c _
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),( x! u$ {% H# z: p7 p; @) n/ y. W
to_str("in docking station: \"",?.~.name,"\"")); # w" g4 k3 A8 W7 Y# e! U
end;
$ p0 Q& ^% i6 h( f' B7 y else
$ M* r3 _3 Q9 T @.Destination := assignLObj[1,row];
% h2 o, h2 r. U1 i# c2 S end; + s5 E1 Z$ ^: u% H) O$ F
newDirection(@);
6 g% Q7 s$ M, ?8 u% F6 b( [ @.HasOrder := true;$ X$ m" P& n8 s3 _5 t
end;1 o$ h" P; H) ?) f1 S) h: e# H# M
end;* @3 }3 q9 ?* T8 q4 I6 |
end; -- of the method4 z$ V- c& }% C' {; t$ y1 F0 {3 @
|