/* called by: entrance ctrl of the object 'track'9 ~3 i/ {6 N8 r5 e
*/5 y1 C% X+ U& j; `9 s8 A- M
is
7 N8 j/ }4 v6 T! y* g$ Z' G part, GlobalDistObj, assignLObj:object;row,Lan:integer;
" S! a: h/ ~* {- S* M. T3 _, e8 Edo f: ?9 A, T( K9 d8 e$ F8 P
Lan := rootfolder.Internal.Tools.AOLlanguage;- f$ m2 `( q+ o
if current = @.Destination -- else return: [ Z; b6 x+ Y+ t, F5 e" {5 @
then
1 H% x, L! i3 E4 f6 f @.Destination := void;
# b/ J3 ~* x. Y0 K; D+ O if @.occupied then
# ?" S! v0 I7 U, B( y4 [0 ^: L part := @.cont;# ~8 N/ e, d# r$ W% f6 B
@.transpOrder := void;
& q7 M' Q* H8 m s B) M8 D part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
) F+ w) a+ ]' d$ u; @ @,root.eventcontroller.simTime);
8 G. x7 N$ h# R: B- ^' z @.HasOrder := false;
! X' R! o4 _7 \0 L3 q0 q- D4 | @.DrivingHome := true;
8 Z" A7 K+ Y A- M- D rgManager.tryToStartTransOrder;
- n0 a, ^! e* T if @.Destination = void0 P, W% s S. v; D
then -- no transport order for vehicle @/ U1 l1 }8 W( H" G
@.Destination :=
* a1 u' r |8 R rgManager.nearestFreeStation(@,track.~); b9 K, [3 ` ]
newDirection(@); 9 P: j; Q' Y& h4 O8 e( W
if @.Destination /= void then) S4 _- r* Q5 u" q
@.Destination.NumReservation :=( \* D8 b. r1 ]4 v- c
@.Destination.NumReservation + 1;
+ O1 p% d8 P& ]. y" i+ n end;; G! k" |% W# ^1 I6 `: d
@.CurrIcon := "drivingHome";9 i3 I% |8 Q) P ^
@.DrivingHome := true;( H3 D! |! L6 O9 G4 ~2 M
end;
8 W+ H5 u0 w+ \# V6 c4 B g. L. E else -- the vehicle @ is empty, both vehicle and part are in the same dock station
E& M0 `; I3 `- r. F part := @.transpOrder;
: ]& C) ?$ z& C; o part.move(@);-- load part9 l! f( l' M3 L5 r+ U
@.CurrIcon := "load";4 x2 A# z* R$ }# v* K' e* f# u
GlobalDistObj := part.globDestination;, R$ q- W$ Q8 u3 A( ]2 Z
assignLObj := rgmanager.rgAssignL;: x* ?' F! X; Y6 R) X7 N
row := assignLObj.getRowNo(GlobalDistObj);4 t/ `# `1 P4 |: y+ J
if Row = -1 then -- since 70
! J! M1 s+ O, S) B3 w if lan=1 then3 G" B/ I# [( t- l/ Q! t( F
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),2 ]# E$ y4 [2 U) S
to_str("in der Andockstation: \"",?.~.name,"\""));
* {* S6 X1 q# G- J4 K6 X% I; y else- _2 ^0 N* W# F7 P
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),# ? X" R K+ X/ f& i
to_str("in docking station: \"",?.~.name,"\""));
8 \. H& ?* b5 I0 I end;! A1 y7 ]8 a# i
else; E+ r4 a( o3 l% i9 m
@.Destination := assignLObj[1,row];" ` Z- n q/ a
end; * O( k8 Y3 m% i% g& i
newDirection(@);3 R( C$ A) Q# k- L
@.HasOrder := true;
! W6 z& n# R+ G' f end;' x' t! B1 q: s, H0 @
end;
( ]9 f r( A4 b/ l6 Oend; -- of the method
' q! T5 P, R& w# e: ? |