/* called by: entrance ctrl of the object 'track'7 y2 o7 C d( [( ]2 S1 ?
*/9 t+ t; S! o6 ]/ q& D! K- a
is w; l( x4 s! H2 N9 [9 T$ n' c9 Y
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
6 k; h/ [! D0 o1 s- f8 p) A! @do2 A( ^9 F, v) X2 a! C# l3 F
Lan := rootfolder.Internal.Tools.AOLlanguage;0 z1 } M- Y! z9 N2 C
if current = @.Destination -- else return
* T% X8 Y1 A8 \* b1 X then
/ x0 _' X9 p; g9 [ @.Destination := void;$ s/ k6 q' j7 s% s8 w
if @.occupied then- E, t/ {. o+ i, Y3 c5 F$ d0 ?4 f! r
part := @.cont;
9 j+ m+ ]) D$ w8 z! |; K @.transpOrder := void;
3 _ b( x# b# {( h- K( @) n part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1, z4 W9 t% g5 q2 G. A* `$ |% z
@,root.eventcontroller.simTime);, `* P3 o/ x7 w6 S+ n/ H) G
@.HasOrder := false;/ J$ u4 G6 R6 y# Y b
@.DrivingHome := true;; B1 K8 }' L7 N- D# s. e# i2 P% C( x. d
rgManager.tryToStartTransOrder;+ J9 p [. `4 {0 Z
if @.Destination = void/ H5 P3 W2 H4 H0 X Z$ S
then -- no transport order for vehicle @6 D! d" U4 O+ }( a9 G1 q1 Z
@.Destination :=
# M( ]# T) t# k/ I1 i3 j5 q; \% w rgManager.nearestFreeStation(@,track.~);
" u$ v$ s; K( h0 u1 W newDirection(@);
' U) g% \ B- P( ]" B, b) } if @.Destination /= void then/ d& ^+ _& p% D2 G
@.Destination.NumReservation :=
: A- l) p/ G+ X7 k4 J n @.Destination.NumReservation + 1;/ Y) ]/ _/ u5 h0 f2 ~ S5 I
end;
; x" i% }$ \9 O. T @.CurrIcon := "drivingHome";3 p7 U& S6 [) Y+ K W( D; [
@.DrivingHome := true;
& ~* v0 L' o+ l% c end;. c4 F9 H! u0 |' G, ~4 X5 b6 x5 R% {
else -- the vehicle @ is empty, both vehicle and part are in the same dock station8 o( l$ i6 l1 f! p S; Z {! N
part := @.transpOrder;
5 ]5 N) D" ~: |7 }6 A l part.move(@);-- load part# U1 l0 g* ]# P r$ P
@.CurrIcon := "load";0 R+ O8 g2 h7 u" H/ ^* V+ D- `) h8 t
GlobalDistObj := part.globDestination;) s( T& g8 {# h* j3 h9 _5 m
assignLObj := rgmanager.rgAssignL;
" d2 z: U) N- F, }9 F row := assignLObj.getRowNo(GlobalDistObj);; m* O' e- O! E) u4 E
if Row = -1 then -- since 70* B; b ~4 y% R- v8 e
if lan=1 then
$ Z3 @1 w3 G, k2 c- c! k, K7 z promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
# N. n3 ]- D* h* d$ {& y- D8 A9 N2 V to_str("in der Andockstation: \"",?.~.name,"\""));) E2 M# e8 C" I1 V( l# D H( {
else
% y7 I. F; L C/ Z6 ]" K# f* l promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
`) V4 t. R/ h2 k- o2 e; I) h to_str("in docking station: \"",?.~.name,"\"")); 5 R' R. M d& P
end;
3 A; {* r+ S5 {# r: _* H else
! ?8 {; t$ P" C @.Destination := assignLObj[1,row];
# q+ K2 N+ Z2 R/ i$ Z6 W end;
+ X# F* V5 K T4 f, l2 E- o' M: r m C newDirection(@);2 E2 ~+ s! r5 i$ G4 x7 V' Z: g5 e3 O
@.HasOrder := true;
) r. f; K/ o% B; e1 \ end;2 f! v0 ]8 K* V- B" a3 {& f
end;
+ ]7 D* L" l! ^end; -- of the method
+ f7 f, o# |: r$ l* S% H! a. V |