/* called by: entrance ctrl of the object 'track'
" ?4 p y% n B*/
9 d q! F1 f; Zis
f( t0 g2 N7 o' @- T5 M part, GlobalDistObj, assignLObj:object;row,Lan:integer;
4 P5 V/ x6 K F' E' kdo+ C6 z5 L6 [3 O C; Y7 N
Lan := rootfolder.Internal.Tools.AOLlanguage;( }) V+ e- y; L: u* Y
if current = @.Destination -- else return
$ T7 @% U d, S3 H$ r5 ] then3 D8 C2 q1 J' q' {4 a3 Y) D
@.Destination := void;
$ X1 O! R. d3 A% i if @.occupied then- A/ e# r+ F; Y: F! j
part := @.cont;
7 _% ]" b7 H- e @.transpOrder := void;
6 z0 R; H9 G; f- V4 m: ]" x part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
/ N9 y1 i! h# a* A! D' g% h4 Q& X @,root.eventcontroller.simTime);. }$ r% J. e! i+ f2 k; s7 e
@.HasOrder := false;( H- u/ F( V9 ] U
@.DrivingHome := true;
5 I0 |1 D2 i! B2 c3 s( L; ? rgManager.tryToStartTransOrder;
+ j$ ^$ O$ y: s( W. k if @.Destination = void) T' B3 g2 y3 m6 f
then -- no transport order for vehicle @9 l( v1 v. p9 a# F! R
@.Destination :=8 ~% X4 Q r- A
rgManager.nearestFreeStation(@,track.~);
) X1 {2 c& Z- p# a. e newDirection(@);
% {2 |8 t* l k if @.Destination /= void then# z* r: X& t4 {4 x9 d" K
@.Destination.NumReservation :=3 _/ [0 ^& h: y% N
@.Destination.NumReservation + 1;/ W2 z. q9 K9 r( c# \
end;
9 a3 m7 J, R8 \5 s: B. q @.CurrIcon := "drivingHome";
+ V4 q0 |3 [6 W# K @.DrivingHome := true;
9 {" x2 P& h2 P; k" P end;% n2 _4 j/ B1 D$ L+ v$ |9 h9 T
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
: E$ u# i2 W" t part := @.transpOrder;
) C3 e. V, f# Q9 E part.move(@);-- load part
) h4 E2 F1 `" x, b1 n- _1 h7 | @.CurrIcon := "load";
$ ~( A t+ {6 ?: n GlobalDistObj := part.globDestination;! F0 a2 \# A" d8 P
assignLObj := rgmanager.rgAssignL;! z# w+ a( P" X Q
row := assignLObj.getRowNo(GlobalDistObj);3 w9 \3 z5 b# P+ @1 T7 [
if Row = -1 then -- since 70
% ~- W+ H! @, X0 t! Z if lan=1 then
( D& G7 O) ~( q+ N- U/ w promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),+ |3 m, Q% }. {
to_str("in der Andockstation: \"",?.~.name,"\""));
* C5 Y! U& K3 a' C. m P; i else
4 M& [% i2 O* B: j7 D7 j1 ] promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),6 I$ M$ `9 w- Q5 w! A
to_str("in docking station: \"",?.~.name,"\"")); : R. g9 s, M9 _! y. ~$ u
end;: P! ?+ U2 H5 W3 z7 v2 y& N$ P
else
* o! M# O9 w7 Z ]. B1 a u @.Destination := assignLObj[1,row];6 b! J* s+ _) m3 V: F
end; ~2 z0 T" y2 s+ m H
newDirection(@);
( u4 x+ \0 S; ] z @.HasOrder := true;
% X) i2 Z1 W# _+ N1 L4 q end;# E7 k4 [8 n) D1 F) a
end;/ P6 F& x+ ~4 q$ y
end; -- of the method- @3 ~2 I; @/ F8 T* v" s
|