/* called by: entrance ctrl of the object 'track'
, X, `( R* z- d* v, u$ }9 x# \- L*/# T0 w/ H w+ u" z# U) ~
is# i2 U1 S- z" }
part, GlobalDistObj, assignLObj:object;row,Lan:integer;1 ^" W$ Q6 i5 l) E9 q3 p! f
do
2 F5 r t; u" L) H6 w+ M1 W. B Lan := rootfolder.Internal.Tools.AOLlanguage;
& h' X# E4 X7 s if current = @.Destination -- else return
: c% X5 x4 Y& H. O9 H- Q& {9 C then8 U# i- a I+ ]0 A7 P1 |
@.Destination := void;
, ^' x2 S' ^: K( z/ n if @.occupied then* V" t2 }: g! k) t0 L9 U' x9 Y, ~$ n
part := @.cont;7 G& M' D2 \$ O- p0 h
@.transpOrder := void;( \+ j6 h: _, H$ T& h
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,5 N4 \: r) V$ T1 W
@,root.eventcontroller.simTime);# x- i; K% m) M$ U. h V. p
@.HasOrder := false;8 y8 d, C) c( g/ l) k
@.DrivingHome := true;* \' \' q' R; S7 M
rgManager.tryToStartTransOrder;$ k9 h. F C) R/ P* g
if @.Destination = void4 C, F( d* e/ L% G
then -- no transport order for vehicle @) U: @* d$ P. g! b2 g
@.Destination :=/ r8 P( O, Z8 A1 E- ^/ T
rgManager.nearestFreeStation(@,track.~);/ A. I2 }. t- S. y7 y
newDirection(@);
0 b! T" L4 F9 C6 d. [ if @.Destination /= void then
4 J2 x w* |; w7 d7 k2 a7 C! v @.Destination.NumReservation :=# J3 D$ @, @0 y' T. J8 u2 x6 F& W3 g
@.Destination.NumReservation + 1;' ?# }" \1 H H
end;4 K0 c4 _ q& g2 v* r8 y5 b* W; {
@.CurrIcon := "drivingHome";
" L2 Y5 y" p. s* J4 T @.DrivingHome := true;1 z3 m& \5 _ O6 I4 g5 J; ?
end;
- G4 z0 t$ x& J% ]4 v; B else -- the vehicle @ is empty, both vehicle and part are in the same dock station4 U0 B2 \+ Q' b7 j0 ?% b0 r
part := @.transpOrder;
+ I; H$ u6 I# s, K+ x part.move(@);-- load part
- F7 J( N1 Q! i u @.CurrIcon := "load";
& E6 K$ H' d4 ^6 h1 T! j5 B GlobalDistObj := part.globDestination;
4 ~/ v4 [) J. B" e& _ assignLObj := rgmanager.rgAssignL;% X3 n$ m! d* P2 J. J
row := assignLObj.getRowNo(GlobalDistObj);
# N6 t- j0 c0 e0 ]' }8 X$ ] if Row = -1 then -- since 70, \0 m' X3 ^$ p) O5 J
if lan=1 then
7 J8 j6 v: q' T1 u9 O promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
1 N& r% T0 C2 l( Z( m to_str("in der Andockstation: \"",?.~.name,"\""));; ]' k8 X; U% `6 U s" `
else
' Z7 l. }: Q* f; @/ x) a$ S. A7 K promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),# ]( n/ ]- U/ \: c0 Y; I( b
to_str("in docking station: \"",?.~.name,"\"")); & X4 G; V# W4 T+ I* \% Z A. ?
end;
- Y0 K! S" N4 u4 z* f else, j7 k* _; L9 r% a3 s/ n4 x: U
@.Destination := assignLObj[1,row];
; s/ z# F* h2 c' r5 @9 G- p+ e end;
1 X% T! C" U& d. |7 _1 G" | newDirection(@);" U6 V' h, i% B2 _" j/ z h
@.HasOrder := true;
. g! b! c) H, U9 O end;/ R E$ }! H0 n$ |/ \* t, y
end;
3 `. y& S, @9 Y, N# c1 Oend; -- of the method
9 M7 U5 I* q( k0 d( H7 C( i |