/* called by: entrance ctrl of the object 'track'
% L" E3 f1 {2 l# a, a8 d*/- [2 k& K. Y/ y; @; r8 `0 k
is
2 ~, `+ I& [0 n7 j: T: k& v4 | part, GlobalDistObj, assignLObj:object;row,Lan:integer;
# K- \* J$ @0 edo( o8 D. T# v- B
Lan := rootfolder.Internal.Tools.AOLlanguage;
( n1 e0 i) D1 |" R5 w# @6 M if current = @.Destination -- else return
7 O$ R2 E$ x. x- y- M; j then2 E# @& J! J( k r
@.Destination := void;
$ Y- v. `8 V; s) B if @.occupied then
; c5 p7 O/ P! E3 G+ Z- Z- | part := @.cont;+ R$ i$ G2 z+ u" w- p& ?' j
@.transpOrder := void;6 j3 e4 E" S7 n
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
# R( g: Z. o$ }& I @,root.eventcontroller.simTime);
$ U: h2 n7 ?2 l# E. z @.HasOrder := false;
- y! C$ c6 d3 Y! x8 } @.DrivingHome := true;( j' V5 S) j2 K6 r& p
rgManager.tryToStartTransOrder;
4 C/ E/ B) z7 L" R; K8 ~& T if @.Destination = void. h2 G% J9 S7 D: d
then -- no transport order for vehicle @0 h, Q! a% ]7 k: l& i( ~9 [
@.Destination :=
2 u9 W) w. e8 Z6 y$ r P E rgManager.nearestFreeStation(@,track.~);
0 F. d N1 ?% W newDirection(@);
4 b4 D' ^8 W# y( u( w* Y6 y if @.Destination /= void then
: k# Y8 _' w# k' A4 e @.Destination.NumReservation :=
9 B! b1 e5 s0 }7 _# n' V2 f0 @ @.Destination.NumReservation + 1;
& P. f7 c+ `* w end;
) I! ~3 W3 i/ ]. T3 U& K @.CurrIcon := "drivingHome";
9 [1 ^( d' u- {7 K/ Z @.DrivingHome := true;' N3 L2 o/ ^' b
end;4 L1 }- i# o b; }( t
else -- the vehicle @ is empty, both vehicle and part are in the same dock station. W8 Z5 i% d6 p8 X1 k* e! }
part := @.transpOrder;
/ I: _) @& w+ S* _+ Q part.move(@);-- load part
2 ?' P7 n4 O- @9 }- ] @.CurrIcon := "load";
- [ A6 Z% \9 H. {+ G GlobalDistObj := part.globDestination;
4 K( b( s5 [' i0 s% ?7 i; w assignLObj := rgmanager.rgAssignL; t Z5 a9 u) L% m0 i! b, h0 s+ U
row := assignLObj.getRowNo(GlobalDistObj);
" v3 f% k# x' h, U* _+ X5 w: a if Row = -1 then -- since 70& C5 d# V( A2 j0 F. V
if lan=1 then2 J( o1 H6 ~+ B
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
, r& M0 A# y( ^' L0 ]7 g to_str("in der Andockstation: \"",?.~.name,"\""));
- |8 H `! D0 G8 |+ V else* G3 p, j7 m* m, A
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),7 g4 k& P$ l% W& \
to_str("in docking station: \"",?.~.name,"\"")); - T1 a% B5 m; ]
end;& f1 p! s6 k0 L2 w( _
else/ }/ e: o4 ~$ Z# U
@.Destination := assignLObj[1,row];" s7 Q- G7 d! z% w: u+ O; f
end;
/ i) V' {# w* q S2 e newDirection(@);) N# Y! k0 y- P1 r, D
@.HasOrder := true;
+ {: x5 _) P. J& V! b end;
$ x3 u) a1 I. }; ~ end;
6 _8 B) t" G2 r2 dend; -- of the method, J* T9 r4 w3 M. @0 z1 ^
|