/* called by: entrance ctrl of the object 'track'
+ z& K& i; R! c" G3 T( d4 Z*/
& K7 U( V! M+ m$ W% K0 Wis
$ v+ e+ d2 A" Z' c- G part, GlobalDistObj, assignLObj:object;row,Lan:integer;( y( i/ h8 s0 Z
do
1 H# i" V6 [" j6 ^' z2 x0 L Lan := rootfolder.Internal.Tools.AOLlanguage;) I W! F3 C% h
if current = @.Destination -- else return0 O& ]1 b" \; t3 v" I
then5 L: f% ?' B& i Y$ @: o" V
@.Destination := void;
3 L, `: [% a5 B l+ k if @.occupied then) f' R0 v( u/ r: ?
part := @.cont;
6 D5 z& Q/ V7 N2 Z r @.transpOrder := void;/ Q) o% i8 G" V6 @# Q" \; n" V9 |# @
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
, E6 G+ `4 R) C }7 ^4 E @,root.eventcontroller.simTime);0 _% N$ ?6 e5 {1 s7 j* M4 w) H
@.HasOrder := false;
; [9 n x, @) \1 v3 q3 d) r$ E) j& } @.DrivingHome := true;9 t. u/ J | `- ^% O% K
rgManager.tryToStartTransOrder;
: T w# t* s3 A2 [" K if @.Destination = void: {2 h1 g, S% S6 y; a/ B! ~
then -- no transport order for vehicle @
/ A9 z- o/ K/ i4 w6 `2 N6 E/ i @.Destination :=( q0 Y" s4 @; z7 m, H6 o- f: k
rgManager.nearestFreeStation(@,track.~);$ M" R- B/ o& S5 c+ m$ A
newDirection(@); 4 n: x, E+ x% N! t# f
if @.Destination /= void then
" e. u) N" Y# G, M0 Z0 n3 v @.Destination.NumReservation :=
% h4 s* r# L3 y8 h& X0 c, ` @.Destination.NumReservation + 1;" A# s, Y# K! ]: G$ G
end;
+ |: \7 Q- [! G) t @.CurrIcon := "drivingHome"; j: v3 j. N2 }! j
@.DrivingHome := true;- Z# e0 U, |/ k2 S
end;
% X" J$ @. x( o8 }- J! {7 B4 I else -- the vehicle @ is empty, both vehicle and part are in the same dock station
7 T7 ^( M$ N% v3 O& W; Y8 Q7 S8 [' N part := @.transpOrder;- [# v- d; w. X2 Q2 y
part.move(@);-- load part
* t X: V5 S% l9 v; }; U( Q @.CurrIcon := "load";& b/ r7 K" V$ ?' Y, y$ Y' X
GlobalDistObj := part.globDestination;9 u( k6 f# f* U' V9 I6 \$ t
assignLObj := rgmanager.rgAssignL;
( x! \+ z0 ]# X, b3 V2 {, X row := assignLObj.getRowNo(GlobalDistObj);/ n( M8 A) U( Q2 K X
if Row = -1 then -- since 703 F6 }, r4 K+ G3 e" |; @
if lan=1 then
( [! d O: `6 U; c7 w promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
. p/ U6 u4 D3 p& Z, ]% q) V to_str("in der Andockstation: \"",?.~.name,"\""));
V4 c. W& C$ q' a else8 Z4 u: J) s/ y1 P" A
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
+ R/ y4 j* } A. E to_str("in docking station: \"",?.~.name,"\""));
/ ]) D( ^/ R+ E end;$ C! l8 g# \- M7 v( i" _) l) s9 t- e' a
else; w" M& U, U% B% l$ D
@.Destination := assignLObj[1,row];6 r$ m8 I, u- \& I* t; K4 x7 I& R
end; : B9 K( h0 J& b w/ D9 ^% T
newDirection(@);% ^. s! h4 b0 L* L" S: m
@.HasOrder := true;
3 ?6 C! K& o1 b! Z0 T+ n( s% n! I end;
: N( R& u6 N9 ~8 u# m end;9 D- I f U/ |9 K3 l
end; -- of the method
2 ]9 K& c) x' n3 R- D |