/* called by: entrance ctrl of the object 'track'
* [& s$ P& o9 C; R*/ k% V, X' F! G# p1 i5 w- x
is
# ^" ~; B( l* a' t$ d5 w# i part, GlobalDistObj, assignLObj:object;row,Lan:integer;
1 e3 i9 w) Q! m* Ado
# |+ i2 F4 j* x. \7 D Lan := rootfolder.Internal.Tools.AOLlanguage;
. D) u1 l' Q0 B if current = @.Destination -- else return# l) T3 N! H# W: m7 p& w
then6 p: i# I4 ]( x
@.Destination := void;
( D0 Y9 e) D. p) Z$ F if @.occupied then4 z! e* {! {8 h7 q
part := @.cont;; k- h! g9 t! p: N' T
@.transpOrder := void;
( k% h0 c9 s& p& T! j part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
$ i, z' R1 F, V2 F+ O @,root.eventcontroller.simTime);
' B2 @6 c" l# Z& e2 E. o0 a( j @.HasOrder := false;
- O* F: X, f+ f/ C0 q6 H. M @.DrivingHome := true;0 F0 Q" z1 Q; C% {; d/ W9 b: |
rgManager.tryToStartTransOrder;5 v% F" {$ D/ B6 G
if @.Destination = void. T3 \; | G7 a7 u* N
then -- no transport order for vehicle @- Z- F1 U/ }) |0 g& U* D; o4 O* s$ W
@.Destination :=3 P" H: }" ~1 {/ C+ N
rgManager.nearestFreeStation(@,track.~);
* u+ U3 z2 A2 G3 C3 `3 A newDirection(@);
( `) ?( t/ l8 G, X1 S if @.Destination /= void then
# A ]" Z! L5 M! I! x; |$ { @.Destination.NumReservation :=6 D4 L; C# h) h/ Q6 O
@.Destination.NumReservation + 1;
( ~, y4 N8 @- B9 ~* [+ u; P N: h# R end;
$ g* T/ O0 a& {, x @.CurrIcon := "drivingHome";5 R" N8 l0 R8 Z; Y5 t+ E5 d
@.DrivingHome := true;8 B$ D7 n! t, k, y
end;
- g/ \. H" `! F5 O3 W/ v* K! a' [5 I else -- the vehicle @ is empty, both vehicle and part are in the same dock station
( |. d# j2 C- A( x part := @.transpOrder;. N1 Z* P3 W' r/ U0 w$ |. C2 O
part.move(@);-- load part
0 M& i1 v# C: h4 m# J' e @.CurrIcon := "load";
y# |" M/ {9 n; y" o GlobalDistObj := part.globDestination;4 [! D& E5 M0 D4 p5 r R
assignLObj := rgmanager.rgAssignL;
1 R( {% J+ k n. V row := assignLObj.getRowNo(GlobalDistObj);/ c* X n2 Q2 o' m+ @ u, e7 p
if Row = -1 then -- since 70
9 f# O' o, {: m0 u! J2 [ if lan=1 then) a T4 I- t4 Y8 v% K" v+ s
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),, k& i1 b+ U, i% s z# G2 K. W
to_str("in der Andockstation: \"",?.~.name,"\""));
. Q( W3 M; ?: N/ O1 G! ? else
" U/ @4 d: Y: j# T promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
$ U( e+ Z3 M' B: E* r/ {. C" z2 \1 L to_str("in docking station: \"",?.~.name,"\"")); 7 L3 e. @( T1 f# T8 A' W/ {
end;6 P; J) G$ z5 m) @+ u+ T
else: \, h* u( |1 t6 _7 i
@.Destination := assignLObj[1,row];1 b u- {: I5 x0 W1 o
end;
6 S. W1 Y% |9 v0 u, _* r$ T( D newDirection(@);
6 i- P0 X8 e" N( v. Q" N- e @.HasOrder := true;
2 @3 K$ S6 F. @! ^ J end;. J- {0 q) ^2 h
end;4 h: W% v* I, {2 H6 [; i3 f: ^
end; -- of the method2 S @0 ?; \4 j% z! z l6 L
|