/* called by: entrance ctrl of the object 'track'/ Z: v9 h) f- p2 p& t! e
*/6 G2 Y' H6 w3 r, @" F. n, k
is1 P1 b: g& F3 ?7 f& o) m% e- X4 X
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
8 J6 {, w* }8 L# G7 ]+ M' G) gdo# |1 ~5 a. E; w, u
Lan := rootfolder.Internal.Tools.AOLlanguage;
l' w3 q0 D, R9 w if current = @.Destination -- else return
/ ^: a& a6 C& q then
, h% m* {; Y, | @.Destination := void;
4 W6 \0 K2 E! P o" g: j if @.occupied then F, C+ s# O5 `( U! u
part := @.cont;
! i/ C- ]1 [) I ?$ j, D @.transpOrder := void;& o! s6 T& V' l5 M. R& k3 B
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
( q$ d4 s( W# o0 B; r# W: _8 @4 ] @,root.eventcontroller.simTime);. [# q& W- ^; |* I
@.HasOrder := false;
4 h; ]* Z- O. }7 i0 ^5 q @.DrivingHome := true;
# c6 x# z' ?& \% \. O, g$ C rgManager.tryToStartTransOrder;
4 B4 t! X+ Y- s' R/ t if @.Destination = void- W6 d8 z. `/ u, O! S" H
then -- no transport order for vehicle @$ N5 Y5 C; b9 Y8 Z
@.Destination :=
) r, R3 m, s& H. _& b+ ~ rgManager.nearestFreeStation(@,track.~);* L M$ t/ g2 F, S
newDirection(@);
3 E; T: u, g( O if @.Destination /= void then
# Z5 r- w: V) @& R& w f1 X8 v @.Destination.NumReservation :=
J* l) ~8 G3 L @.Destination.NumReservation + 1;
5 `7 n3 y- Y4 S3 C end;
, }# S) L9 w5 _( W, L @.CurrIcon := "drivingHome";
. Y0 A+ v) s9 @% Z8 x @.DrivingHome := true;
: a: e" v. ~9 n- [+ m/ g end;2 ^# P$ F1 U' }+ I1 P' B
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
0 I; z( b0 g# i* _ C part := @.transpOrder;
) n. r9 O, Q; K! R/ z6 h part.move(@);-- load part
# B2 z6 T/ D0 C" s! x @.CurrIcon := "load";2 }8 [" O% I9 j
GlobalDistObj := part.globDestination;
3 p% C0 i5 Q5 ^' Q assignLObj := rgmanager.rgAssignL;
( M9 N+ o, w0 l4 ?. [ row := assignLObj.getRowNo(GlobalDistObj);/ |% ]! L, g1 W% e" Y
if Row = -1 then -- since 70
- I: _+ B! x8 V7 B y( \- h if lan=1 then
4 m9 c* T+ X( N b2 ^ promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),! ]: u. [. w) O' J2 I2 S$ p/ \
to_str("in der Andockstation: \"",?.~.name,"\""));& j" M- m0 ~6 [
else
o. _. M, r% u. |2 f9 ]" \ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),# V k2 H5 W3 A7 _8 ]: s
to_str("in docking station: \"",?.~.name,"\"")); 0 i& Z" C% L) Z" ^6 N! I
end;
r( X* J1 }8 E+ B6 | else
3 S- U% j# N" M" o0 B @.Destination := assignLObj[1,row];6 Q$ i3 H# `- Q: k# Q$ l: `
end;
- z! I( v' K7 S newDirection(@);
/ v. l% X& e( l4 d" J @.HasOrder := true;- \; Y+ F4 s, d" h; x
end;
4 [1 ?; v E' `: |; C c end;
: ^6 \5 O( n9 ]+ a9 w- A% ^; Dend; -- of the method
0 Z5 X9 m1 s- n |