/* called by: entrance ctrl of the object 'track') E! n; ?. _# U' v+ k- C& m
*/
& W$ @2 v' m( a9 }: m3 nis/ C" [! Q3 m8 k T; ]* K
part, GlobalDistObj, assignLObj:object;row,Lan:integer;5 t1 q0 m8 n/ [: J: W# }6 [
do
+ ~; P: N" u+ `; q9 A1 X Lan := rootfolder.Internal.Tools.AOLlanguage;# s6 x3 Z; C' M. H
if current = @.Destination -- else return
3 m& B ?3 J! _! C7 ~3 ~- o then$ c. y( G5 z. e7 r7 M% j
@.Destination := void;
! K% o; o" _" k% h6 V if @.occupied then( F y1 z4 g& c# ^/ E1 T
part := @.cont;
6 A% j' I( W9 d/ X" Q @.transpOrder := void;1 `/ G1 [+ i. C# J$ i8 w- s6 Y2 \
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
( a) e5 n2 V: [ @,root.eventcontroller.simTime);
% Y/ h* T% @# E6 D6 G @.HasOrder := false;& F9 Q1 D1 S1 i. B+ k" V3 `
@.DrivingHome := true;6 R# @& a g0 M' E, X
rgManager.tryToStartTransOrder;: D" N9 U+ I9 M& Q
if @.Destination = void' n1 {8 L: D: G2 I' L+ [5 q+ r9 k. Y: G
then -- no transport order for vehicle @
6 f s' F& X8 K3 G: Z: n* S5 H7 k @.Destination :=
. X8 c; p+ b/ W; c2 d1 B rgManager.nearestFreeStation(@,track.~);3 y* w! a' v7 Y
newDirection(@); # |' R2 W: b5 P) F/ i
if @.Destination /= void then$ e( o) d4 V: a
@.Destination.NumReservation :=* a2 z9 z. f$ A% A. x, d$ o8 g
@.Destination.NumReservation + 1;' B* U& K; r0 p1 R' C& x
end;$ n Q) i' [2 _* U8 O3 ?/ }, f* @
@.CurrIcon := "drivingHome";9 n* e* ~/ W2 d) ^3 \! e, G$ Q4 g
@.DrivingHome := true; O1 q; s: ?3 G8 G/ f
end;
. V/ D! j7 Z" T, {2 t; Z2 O else -- the vehicle @ is empty, both vehicle and part are in the same dock station
- k. e# |" N% r B/ `1 ^9 m part := @.transpOrder;) h; k) X q( `" C
part.move(@);-- load part
/ e: W" I' x$ L f { t) N @.CurrIcon := "load";6 r/ D2 `% s: b' z) T
GlobalDistObj := part.globDestination;
: _" H- U5 h( U assignLObj := rgmanager.rgAssignL; S+ k4 U4 R8 N
row := assignLObj.getRowNo(GlobalDistObj);9 n4 C! ?2 d. v* ?
if Row = -1 then -- since 70
$ n: P) j; J9 o if lan=1 then7 Q3 b# s2 I% t! _ X0 z( C
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),) N6 X7 K' c9 d7 v
to_str("in der Andockstation: \"",?.~.name,"\""));
% U2 X+ B8 f0 h/ x! f, y' ] d/ B else5 t0 Y2 Q( G7 |3 S C/ M1 T
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),8 f0 N2 p" H. i; q7 s' [
to_str("in docking station: \"",?.~.name,"\""));
% n7 n! ^9 k/ m. K h end;+ }" g" x; d3 u8 Z: ^& H
else
$ q/ j9 ~1 r F8 {7 e1 O% B @.Destination := assignLObj[1,row];
* f8 h' H# R+ ^- ^! }7 t end;
, a# c5 {4 c& g& d1 Q& h newDirection(@);. z& d3 m8 g# F9 N1 Y& G q& z
@.HasOrder := true;
- c2 _$ Q6 D. w3 X7 a. y0 R) c2 z end;
# v! B/ z2 q k M/ r- k* U end;
( j( p z7 X+ S. zend; -- of the method
( w p2 U0 X( @ |