/* called by: entrance ctrl of the object 'track'
: e' l. c, _& q*/0 B% H0 \# Y7 c$ r
is
" B- o( Y B9 E" ]$ Q part, GlobalDistObj, assignLObj:object;row,Lan:integer;& c: E3 I4 m1 C# Y
do
. O# R& } I `& [: x- o Lan := rootfolder.Internal.Tools.AOLlanguage;
; J, G2 h8 |! q4 ^ if current = @.Destination -- else return
+ v8 f# E6 T0 y( g T$ f2 H then
' e v4 q) Y( G1 S6 _( D3 y @.Destination := void;
$ G7 i& X. T* }- [) ?9 P! q4 I if @.occupied then' S) |0 \ `0 M
part := @.cont;
# R$ t! V. f2 \0 _$ z! p" b @.transpOrder := void;% W* v- z" I$ F8 T. v
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,$ h+ }! x* X9 F% K: f
@,root.eventcontroller.simTime);' V2 f l% Y. N& O3 w2 m# }9 D! Q
@.HasOrder := false;/ ]* x6 f7 s1 S! b) W( I: H3 v
@.DrivingHome := true;
9 ]6 r4 {$ g9 p rgManager.tryToStartTransOrder;" m8 K3 y: l) t
if @.Destination = void
' ~5 Q! x! }/ y6 x% N% S/ J2 H" i then -- no transport order for vehicle @
) e% d0 i# ]/ C8 `( J' [, n @.Destination :=
9 w1 w$ s1 q) {, P, K2 L rgManager.nearestFreeStation(@,track.~);1 @: ?" S) ?5 Q. p: J0 t* o
newDirection(@); * }5 {. m; G$ _
if @.Destination /= void then
/ k/ J: Q0 X$ R7 ^! Z @.Destination.NumReservation :=
- Z. @1 L4 _; U7 s' r' p @.Destination.NumReservation + 1;
" `) x5 w" O: H& x+ V end;' d, x5 T2 j- U0 U% X @
@.CurrIcon := "drivingHome";
; Y* W) h A1 M( w) x @.DrivingHome := true;+ l+ s* o! r: D0 R+ t
end;
% p# W! B' u% m5 Y: w else -- the vehicle @ is empty, both vehicle and part are in the same dock station
/ @1 o/ ^ Z l3 ^ _- T0 o! D part := @.transpOrder;
3 @# t! x8 @" } part.move(@);-- load part
) t4 v5 V) ^5 {* j g- D% { @.CurrIcon := "load";
& O; S# M7 U* @8 a Y) z* ~ GlobalDistObj := part.globDestination;
C0 q$ z+ h# B3 f assignLObj := rgmanager.rgAssignL;
( ?* A, Q5 J$ r& h/ M6 ? row := assignLObj.getRowNo(GlobalDistObj);: p2 u# H) f, D* s& g
if Row = -1 then -- since 70
& k) w' r% f |- C6 B: I. f3 N! ~/ T if lan=1 then
# E8 d; [' _# Q: _, w: o' O+ A p7 w promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
2 A! }6 S! O# x/ W3 o' K4 Q9 R to_str("in der Andockstation: \"",?.~.name,"\""));
+ G; u6 F& _' u0 c" O5 Q else
, [9 z9 M9 m" Z3 M$ L* a- j promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),, Z+ l4 \+ M, i* }
to_str("in docking station: \"",?.~.name,"\"")); 1 Z3 x% L: m2 F0 S6 O( N( S6 d0 m; y
end;
4 }4 q1 Z% ?1 X else5 ]$ ?; d5 @3 Z* t0 v
@.Destination := assignLObj[1,row];
; A# n: v/ c( k4 x" v8 t, g3 C end; 8 F! x8 Y: m4 E) K6 x
newDirection(@);9 z H8 J9 t% \- j* x6 f5 \ M
@.HasOrder := true;" E) O- @3 f" Q; Y& f
end;
+ O0 R3 r# x* F. A' P; @ end;! S+ `% j" X: h4 h9 a1 Z
end; -- of the method6 p/ Z. z' Z% o7 D; J
|