/* called by: entrance ctrl of the object 'track'! K! G9 Y8 @. G& C/ V
*/ ^# I1 j7 t" `; G( t- O
is& V. C: p3 G8 W/ a
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
. C# w( b' _7 S" R: ^ q" B% edo8 u& R$ q: A, x3 Q0 H/ F& D
Lan := rootfolder.Internal.Tools.AOLlanguage;& k# {. X2 _+ W0 J! `' H
if current = @.Destination -- else return7 \, h$ U* l- F( y
then" \; `+ J' m- l# u& s& L# p- s' y
@.Destination := void;
8 C) Q D5 \3 t if @.occupied then' M. x4 i2 Q% ]" Z
part := @.cont;1 ]% K- a7 Y# S+ _- O; Y
@.transpOrder := void;
/ _1 [- U7 Z5 y9 ?1 r part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,; t/ ^9 i- y+ s# d' H8 s- \
@,root.eventcontroller.simTime);
( L+ h \+ F5 D& y+ m @.HasOrder := false;6 M8 Z) d- b! j! @ @
@.DrivingHome := true;
% @, `% h5 C$ y5 V: r rgManager.tryToStartTransOrder;
# d. i% Q& ]% ^5 d if @.Destination = void3 g* R* M* B4 Y" ~9 j
then -- no transport order for vehicle @4 l% E% Z5 s T8 V. ?" m
@.Destination :=
; L) a+ h7 | } rgManager.nearestFreeStation(@,track.~);5 O. \3 N3 a% n! l
newDirection(@);
. F* O9 S- ~. s0 [- I if @.Destination /= void then
! m: l2 t+ K) y @.Destination.NumReservation :=
! a7 Z% A Q! ^$ X' | @.Destination.NumReservation + 1; O, j9 x; D9 n6 d0 `7 r
end;+ @" R3 h7 D1 {5 K9 Z" s( h
@.CurrIcon := "drivingHome";
3 V+ ?% B5 u" m# I6 [: p5 W. {" r; s @.DrivingHome := true;
8 N/ B! G. q2 t4 B' l end;
* X, x5 c% d; j- T$ c else -- the vehicle @ is empty, both vehicle and part are in the same dock station; h0 n9 w. s5 ]* X& ^
part := @.transpOrder;
7 l+ N% V% z5 _ c part.move(@);-- load part
3 V+ _8 r' V7 X6 {7 ~$ q: R R @.CurrIcon := "load";, I7 }. b: B4 L6 A8 [4 p' t' L
GlobalDistObj := part.globDestination;
; O$ a$ b/ N7 [6 h# Y assignLObj := rgmanager.rgAssignL; s/ ]4 t! @$ Z) v' X9 L3 z
row := assignLObj.getRowNo(GlobalDistObj);
. @1 U' f. m \ `! V if Row = -1 then -- since 70
& \2 d9 ^# X" K if lan=1 then
3 @+ b& R& p7 x* p promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),$ W- E/ n2 A8 g" V6 d* h5 S
to_str("in der Andockstation: \"",?.~.name,"\""));0 d$ C% Z9 W/ v3 }2 V
else0 q0 s- D3 ^" B) E" T
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),+ m$ u+ U, R: {! [* H8 y
to_str("in docking station: \"",?.~.name,"\"")); & {2 T6 c( n. j. H2 d
end;0 }/ }: f* N* k$ H8 `
else
7 T3 a+ ?7 [0 P1 x! m5 m1 U @.Destination := assignLObj[1,row];6 S/ P2 u: g0 |
end; 0 A; A9 V7 D I2 g& F; [, ?
newDirection(@);
7 I/ j6 Q' X& S* c" m @.HasOrder := true;- U5 k1 f3 q8 B& q* v/ X
end;) r3 U* x e# z, n+ t o- }: S
end;
1 {2 D9 c6 k% n; [; lend; -- of the method2 e4 y. z1 q' W/ F% w
|