/* called by: entrance ctrl of the object 'track'
& p9 o) Q8 d \ W) I*/
9 M0 U. P4 B5 u/ F( j$ ^* ~5 I* [! I$ Kis
* b5 Y) n. W: J0 Z0 d8 h part, GlobalDistObj, assignLObj:object;row,Lan:integer;
# s3 W( a, _& O" W: ado4 x# C8 A: ~) \6 }. {
Lan := rootfolder.Internal.Tools.AOLlanguage;
3 y" M( g- a8 l, t8 ? if current = @.Destination -- else return
2 H j) o0 V3 i$ h* W then* g6 U% l, K5 |( n! j: @
@.Destination := void;, k+ [9 c; M4 B4 g# P8 _
if @.occupied then
0 i2 c- k' B2 U/ ]. c' O2 q% q part := @.cont;
) b& |; K$ v2 {( y d+ l @.transpOrder := void;0 ?# O: S1 F) _; W7 }# E5 ?4 z8 f
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,4 A) I n) F" m) Z
@,root.eventcontroller.simTime);1 O3 |1 a' @, ~8 H& _+ h1 T# ?
@.HasOrder := false;
& K9 S: r- k. @. ?) n8 Y @.DrivingHome := true;% l e. g! n0 C8 h
rgManager.tryToStartTransOrder;- d" h& X3 l; B4 ?0 w# i! T
if @.Destination = void
5 p" k# j, r5 Z then -- no transport order for vehicle @. j" x. w9 C% P4 W/ N
@.Destination :=) Q ?# l6 K( Y1 |- W! Y, L) a0 |
rgManager.nearestFreeStation(@,track.~);
/ @5 Z' g3 R9 Z! b newDirection(@); ) J7 J7 x1 m: p7 }
if @.Destination /= void then
: E& S* @1 ~( v5 O @.Destination.NumReservation :=
. C* d. w2 c# _1 O7 a' L4 y* a" x( h p @.Destination.NumReservation + 1;
7 L) d* f; B) I6 @0 ~' w end;2 t2 q+ C2 S R$ v, Y- P# }' `
@.CurrIcon := "drivingHome";
& D3 K) \; z9 z: u+ B8 D( ?' ^ @.DrivingHome := true;
& h0 z) z" P- q4 Z9 l7 A end;2 B( k2 {" Q% M+ [8 W$ A3 B3 R
else -- the vehicle @ is empty, both vehicle and part are in the same dock station3 e6 r* ~# I# w/ _$ X. l
part := @.transpOrder;
7 I% p( R, Q7 I& x$ _4 i part.move(@);-- load part6 _- i' i- j7 V: r! x
@.CurrIcon := "load";
- S% A3 H" X# t( ]; m9 x2 H( ? GlobalDistObj := part.globDestination;6 r9 _! t7 G, c9 B0 @
assignLObj := rgmanager.rgAssignL;
) x1 n5 y3 @: ] y% U6 H; M; x row := assignLObj.getRowNo(GlobalDistObj);
, a: C) u, D: `& L! r& O: v/ @- n$ g if Row = -1 then -- since 70
. X' e8 d! s7 e! `2 n+ D( ]* V6 B% |" o if lan=1 then) D( e9 R# I! T5 Q
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
5 G2 f3 L9 t2 V) E: Z: X to_str("in der Andockstation: \"",?.~.name,"\""));, G; Y2 M% H$ c. E
else
8 I" w' g5 X5 }* V promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),( y. D3 `9 K( E ^; s+ t
to_str("in docking station: \"",?.~.name,"\"")); # I# Q! O/ i. O, s, \
end;
2 e* u7 E8 [. y" ^+ i% N else5 \4 F; q! w {9 i, F' E3 Q
@.Destination := assignLObj[1,row];0 M' B5 T/ P* i- B, B. G# O
end; , l+ n' V2 A6 F1 ^' u
newDirection(@);& P- l" u2 y/ p5 A8 k& J* y d
@.HasOrder := true;
+ s' c% A1 T+ `& f# s, @' `# r end;
4 e: P4 E2 {- z5 `$ e! S end;- a4 H5 l8 ~% c z7 Q/ J8 l
end; -- of the method* ~" z( K3 }! T) l/ y7 e
|