/* called by: entrance ctrl of the object 'track'3 g" S6 N! j. k2 x6 ]
*/ \5 f# t! s% t7 |" T R
is2 {, Q- c: H' T5 w6 k) \( z! z
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
. @( d, p+ j. L$ N8 g8 Qdo" P6 z6 Z; \2 C8 W" T3 S: ~
Lan := rootfolder.Internal.Tools.AOLlanguage;( q) i# T$ ` f! X/ X( U8 C. |
if current = @.Destination -- else return
$ g( m* z7 N! H then2 _3 g3 k- l% c4 v, H& ]' |
@.Destination := void;
% q: n6 k. {& V9 }" U if @.occupied then: u6 n) G' F- X9 G9 F
part := @.cont;; u# T7 L+ p* F$ g
@.transpOrder := void;3 ?5 }+ g. K) x
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
8 u$ n$ x" e0 F! S" z @,root.eventcontroller.simTime);
' T8 a2 K# K# f, u% ^ @.HasOrder := false;
4 o& F+ u6 [3 q) d7 h0 B @.DrivingHome := true;
* p* b$ \9 `" \/ O rgManager.tryToStartTransOrder;
. k0 }0 S3 V$ e- ] if @.Destination = void
# t$ m$ { ]3 A9 f9 b# Z1 S then -- no transport order for vehicle @
; u; K! ^+ _6 g8 p$ |$ B- E @.Destination :=
. ]2 ~5 @2 m* m& s" b3 {* l l! } rgManager.nearestFreeStation(@,track.~);- f7 c" I) v5 J, e( F* D
newDirection(@);
8 Y( s8 X3 G( v0 J# w if @.Destination /= void then
' @0 _% g y3 ]& X. ^7 c @.Destination.NumReservation :=$ Z! {( f4 q7 p$ j1 e7 J* s
@.Destination.NumReservation + 1;
3 K& |' C$ h' y/ k end;
! h% J, j' V* S& d5 W @.CurrIcon := "drivingHome";! g* v4 U/ P# J( y# Y) h- _+ `
@.DrivingHome := true;% K5 a: {! f9 d8 O
end;$ d" G7 {7 n- e
else -- the vehicle @ is empty, both vehicle and part are in the same dock station1 [( l! `6 {7 @0 J* g: }
part := @.transpOrder;; P4 D: u" n V3 M& Y0 _. r0 W
part.move(@);-- load part, Z b' F+ J/ v D3 D7 [! h1 I8 ^
@.CurrIcon := "load";/ Y; C: T" [, {- {1 I
GlobalDistObj := part.globDestination;1 }" Q6 W8 i; z% W1 S, X, _+ P% o
assignLObj := rgmanager.rgAssignL;
! N- ?/ V9 ~6 j' { K: X" d row := assignLObj.getRowNo(GlobalDistObj);+ @' T+ }2 N8 d' s% {
if Row = -1 then -- since 70
1 H) c6 f( U C% Z8 Y if lan=1 then
# E2 p) O6 p) C, }, X7 A- w: z promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
V1 b3 s5 u' v to_str("in der Andockstation: \"",?.~.name,"\""));
- D3 u( C: n4 W9 d else
5 [: v* _% n4 q' a+ @, z# b promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
# D1 g" k2 c+ \8 \$ H4 k to_str("in docking station: \"",?.~.name,"\"")); 3 o5 ?( C. m6 p* y/ q% b9 G
end;6 [* T8 Q! J! _6 }5 K
else
) f7 }9 _5 {' ]6 y) s# ^ @.Destination := assignLObj[1,row];
) z- H1 z" J. U6 x8 R) W9 [ end; ' W& o9 Q7 ?1 ^
newDirection(@);
$ R7 |4 z9 v- F1 b @.HasOrder := true;7 s( w& D; a% \' a, n+ [
end;
# `& k- m/ V- ~" x& C end;
1 N Q/ I' y8 V* uend; -- of the method5 c# O; I& j3 K) z7 \/ `
|