/* called by: entrance ctrl of the object 'track'% a. O E* c5 s _
*/
, t& Z% V1 C- f6 ]is
1 ?8 O1 T" Y6 E) F9 | part, GlobalDistObj, assignLObj:object;row,Lan:integer;
/ y# I# @( q5 N9 J7 f" J/ Sdo: A! u0 X. ` E) N/ Z) M
Lan := rootfolder.Internal.Tools.AOLlanguage;
# T8 Y/ ]) H3 n; M2 a if current = @.Destination -- else return! x& }4 `+ K2 O7 f* F
then$ ^! x8 {- ?0 c" n0 u- C0 h8 Q" b7 r
@.Destination := void; q! u$ Z: V7 |' U8 S1 i
if @.occupied then
2 ~$ [. m) |2 j+ Q- N# j part := @.cont;/ B) U% W: W7 N# M, h; s
@.transpOrder := void;+ x& q |- K, o2 t5 O+ \/ W
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
: P; A; z/ H5 b- x- t+ u: x0 r @,root.eventcontroller.simTime);) }4 w& }! t4 W0 o# j9 H# a
@.HasOrder := false;! W4 b9 B; _& B6 f3 U6 \ b
@.DrivingHome := true;) C' B0 U2 T9 Q2 o+ ^8 k& e
rgManager.tryToStartTransOrder;& j: A% U/ N4 x+ H( |, x
if @.Destination = void
. `6 Y' r. n0 d then -- no transport order for vehicle @" S ^- H% n8 q- n( y0 V
@.Destination :=
- u4 C( q' n6 S- C* E rgManager.nearestFreeStation(@,track.~);" P" j* R0 n$ \7 A4 b& t; ?
newDirection(@);
# X- p! ~/ @& z; S if @.Destination /= void then" q. |. p) k( o: X) e+ B
@.Destination.NumReservation :=+ l8 u& D8 `& L& q' k/ C- ]( T
@.Destination.NumReservation + 1;6 S4 j) o1 a9 V4 M
end;/ [- O* \, r# `- ^3 e
@.CurrIcon := "drivingHome";
& c7 a6 T/ G& I( Q0 i8 {$ X; L" m @.DrivingHome := true;
4 T/ _! Z1 ]' S9 }3 \4 B! Z: V9 O end;5 E! Y* k) R0 B9 z1 e. k- C
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
5 g g6 t8 j$ X3 d part := @.transpOrder;7 f" J* \7 |) b5 Y9 J9 P! K
part.move(@);-- load part
M5 i U) i9 i3 x @.CurrIcon := "load";* p, S* X& q3 W- T/ ~( W$ b
GlobalDistObj := part.globDestination;
7 D! r/ F' R. t4 ?- g9 n8 O( F2 @6 r assignLObj := rgmanager.rgAssignL;$ m/ \" D% L. O: b
row := assignLObj.getRowNo(GlobalDistObj);
6 X+ y# h9 y- ]+ Q9 Y. G if Row = -1 then -- since 70
( w+ y7 c0 D1 n3 q1 K5 q- c. Q if lan=1 then3 w6 F% z" m4 K% l, ~/ B6 Y; i
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\"")," y* }" L; O+ d7 C+ \) C! D
to_str("in der Andockstation: \"",?.~.name,"\""));
# v; t Z* r# N/ @8 e else0 \% K, v& o P1 I! k
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
& w: G/ @6 z2 E1 m to_str("in docking station: \"",?.~.name,"\"")); 5 D" \# h/ [! e+ }( E! F2 [) g$ d
end;
' Q) b& t, j' ?. Z; ?5 V else
- h+ P* _1 `5 @# P1 h+ V, _ @.Destination := assignLObj[1,row];
, L9 a W0 J- ^2 O end; 0 W$ G( `" T/ {
newDirection(@);' B+ D: b! M, o, u. M3 ]( e; W2 z5 t
@.HasOrder := true;
# l) Q: t0 N. N end;
5 X, c t% i; |: r4 Z2 K ?6 }4 B$ o end;
; p, q( _( Z5 ]% ]end; -- of the method/ _$ R0 y1 W% i+ n) a! o
|