/* called by: entrance ctrl of the object 'track'5 K0 q U$ k; P# ]4 r
*/
% c( y0 U4 L$ r% w& Ais3 P M9 j" Z/ y I% z% ?
part, GlobalDistObj, assignLObj:object;row,Lan:integer;) Q+ G# F2 k* V, m- U6 N
do
# T8 f! d7 [- U' d* r" b Lan := rootfolder.Internal.Tools.AOLlanguage;& d) k3 s6 L: E. e
if current = @.Destination -- else return
1 O* W1 g8 j( l1 f# M6 b/ y, R i then/ u! n9 i& p; W% h, F$ [
@.Destination := void;: H+ N$ H2 u- C) p+ S# E
if @.occupied then
/ F! |8 B; C7 x. X! A5 r part := @.cont;7 p+ l& G2 b* Y' w4 R* {
@.transpOrder := void;5 u5 G& s% u; l9 z
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,! W w- ~: W5 s& H
@,root.eventcontroller.simTime);' S8 u! q: B+ D
@.HasOrder := false;
& M& f; c+ s2 F4 ] @.DrivingHome := true;& ]6 \/ @( c; e9 ~& G! h2 |# [
rgManager.tryToStartTransOrder;/ N! @3 N6 E" v2 U
if @.Destination = void
, Y; b3 S- j; j$ _ then -- no transport order for vehicle @
7 y7 A! ~- k) F6 J @.Destination :=, \! ^: X' M6 K+ D* s
rgManager.nearestFreeStation(@,track.~);
+ m9 o' X8 i8 l! v- \: N- f Q newDirection(@);
( u3 L: O+ Q- L1 f if @.Destination /= void then9 h, s8 x* c6 A
@.Destination.NumReservation :=* x2 B! s& J$ {: N5 V! l& G0 D) ]
@.Destination.NumReservation + 1;, U' j9 r; ]6 z/ z% c8 l' W' l' a
end;* j7 N# g4 l2 ]$ j' |
@.CurrIcon := "drivingHome";/ @8 U7 S/ g9 p+ {
@.DrivingHome := true;7 T! t9 |& M) i: H
end;& F3 a0 L8 K# A# N
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
/ o1 y5 h4 C! ]* m$ W part := @.transpOrder;
$ D* X# Y4 d: l! ` part.move(@);-- load part% e, {1 E6 R. p3 d
@.CurrIcon := "load";$ a- M# P; ?/ z0 }6 p& ^# R
GlobalDistObj := part.globDestination;; N' V0 w0 ]" u( K: l6 K
assignLObj := rgmanager.rgAssignL;2 |" [: c& n+ ]) L) d: H+ F* T
row := assignLObj.getRowNo(GlobalDistObj);
$ ^) K) B: Y7 j7 u! Y" m7 n2 C if Row = -1 then -- since 70
5 E* B" d5 W7 d2 d) U if lan=1 then. h( Y' |9 Y) I# s c3 Z
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),; f7 i4 `2 u; y. j% d
to_str("in der Andockstation: \"",?.~.name,"\""));
: T& d) }* X7 D! y; L. [6 } c$ R3 [) b else
. {; {* w8 D7 I0 I9 {+ Z, Q8 Y; f) Z promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
; A% c1 _1 I1 i8 b+ A to_str("in docking station: \"",?.~.name,"\""));
& _5 s. M3 D& K: Y/ D( o end;6 F' \, ~/ q: ^0 P, a7 G
else
9 E' p4 P' ?+ f0 P% W @.Destination := assignLObj[1,row];
: t5 u5 a4 o- Q/ a, s3 \: m3 M end; 2 l8 [3 i$ w' e$ P! T
newDirection(@);
_! J, v/ O) i0 M! e2 M8 s @.HasOrder := true;
7 W# T/ D r) O6 H' d# } end;
8 p- M0 l& [2 Q5 V end;
# C; o2 d7 V# T/ ^end; -- of the method4 W% y0 J5 y4 K6 A1 A# D: y. i4 n9 n
|