/* called by: entrance ctrl of the object 'track'3 b! Y2 M; N" T+ U+ X2 q
*/5 m7 |; k7 T& H# n1 P% ]0 |
is6 r Q; F/ ^; W5 ?
part, GlobalDistObj, assignLObj:object;row,Lan:integer;) Z' S. }$ A" i& H
do: w/ Z/ a0 [( T# s2 g9 U
Lan := rootfolder.Internal.Tools.AOLlanguage;" U# x w! t" a; s
if current = @.Destination -- else return* Z) v0 r& s8 N. a
then" U' E( D" m8 e3 \6 _
@.Destination := void;4 ?: A7 p2 H6 A- @# b8 N
if @.occupied then
o! g, `: D Q8 A2 S part := @.cont;
3 W1 u, W4 H! |6 l @.transpOrder := void;% }5 u+ j% W+ G8 M
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,4 b; b' T- W- V G% L0 [: n- x
@,root.eventcontroller.simTime);
: [# G6 {' V2 T @.HasOrder := false;3 h( x' n; f/ i& Y# A! R
@.DrivingHome := true;9 L9 \3 b. N# b e, @
rgManager.tryToStartTransOrder;
1 B' R* b/ J( x* G0 F* H if @.Destination = void
; g0 p2 T. O3 @4 |" e- M' N then -- no transport order for vehicle @; [' n7 I$ k- F: k$ w( }0 p
@.Destination := w+ k2 R7 r! A: N* u3 Z3 I$ x9 ^- A) b6 X
rgManager.nearestFreeStation(@,track.~);
8 y% b, U& v4 n' y newDirection(@);
9 I7 v, Q& f$ c6 Q( @9 H+ s if @.Destination /= void then
: |4 f @- D' A7 e- | @.Destination.NumReservation :=
: I" v' j/ L0 n5 Z @.Destination.NumReservation + 1;
: [8 J( A0 t% y end;
$ X6 l, t( F+ b; u0 j @.CurrIcon := "drivingHome";: M9 Y- W& s- M; Z$ ]+ P% i
@.DrivingHome := true;! T8 f! a4 K) N. t
end;) {& T; Z; I1 X8 L" k; x
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
6 {( ^/ l* H1 s: y part := @.transpOrder;
; Y. }" Q) @8 J7 T part.move(@);-- load part
# c! o; R! ^' V+ K. H @.CurrIcon := "load";; s$ a3 U: F; U0 w2 ~5 W
GlobalDistObj := part.globDestination;" h& ~4 v$ b5 ?0 w, h1 V A
assignLObj := rgmanager.rgAssignL;% D- H* u& ] G. ?7 K
row := assignLObj.getRowNo(GlobalDistObj);
8 F1 `' y5 r3 L' b% _9 p$ L if Row = -1 then -- since 70
* M) B6 E: d6 }! m; Z if lan=1 then
" V- K" q+ r9 K; K2 I7 M promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),6 _- T9 y8 U6 a9 \; G
to_str("in der Andockstation: \"",?.~.name,"\""));0 A3 x4 E( P+ l" e- f3 ^2 m& {
else/ R, @& h# F# y6 P
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
0 B' n' w2 G: z2 m: Y to_str("in docking station: \"",?.~.name,"\""));
4 m, ~3 z" V' Z7 S: o$ }- K8 @ end;/ t' @/ ]2 O$ D9 W7 T
else) h6 Y S* s j) S( B F9 `
@.Destination := assignLObj[1,row];
+ e$ P# B* H6 f$ k Y7 P end;
2 B7 a* t4 U/ X/ d) C6 |3 U newDirection(@);7 _' L$ Q* }3 ~ l& f
@.HasOrder := true;
9 w& C/ l! {. f6 n) @ end;- F. ~9 z5 u' K+ ]
end;
% p/ U8 }+ e5 i9 Nend; -- of the method
" [5 J' z- G5 _8 ` |