/* called by: entrance ctrl of the object 'track'4 n: z4 g* y. G) J
*/ D# Q( x8 ?0 G
is; B, [" R* Z m) X: ^( e. ?
part, GlobalDistObj, assignLObj:object;row,Lan:integer; r* ^9 K' w; q+ Q! q0 O
do7 @) _1 Z% U/ z4 B9 o) a8 t
Lan := rootfolder.Internal.Tools.AOLlanguage;9 c" k0 ]$ f9 _: y9 U5 b) [+ ]- k1 P
if current = @.Destination -- else return
7 K3 O% @* O0 U3 _ then) Q- g# a, M, d7 L6 B
@.Destination := void;
( t" m5 _$ N6 ^0 d# C if @.occupied then8 K8 N, \1 ?3 Z& S
part := @.cont;
+ J9 |9 f$ b( A+ v+ T @.transpOrder := void;
/ q; R4 K6 k. D% I part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
! k* f: x3 G8 I" X% j @,root.eventcontroller.simTime);
# t' y" w! E- q$ O @.HasOrder := false;" V' \( r9 D5 u3 {8 }
@.DrivingHome := true; R d+ f2 h# `
rgManager.tryToStartTransOrder;
- o; ^$ E3 k5 _ if @.Destination = void/ N) E2 @, S8 N8 o7 z) D
then -- no transport order for vehicle @, K/ y( [" ^- V6 D- d8 e
@.Destination :=
0 J* m1 O& ?: k: Z, H rgManager.nearestFreeStation(@,track.~);6 f5 F+ G* u* n+ H7 b, X
newDirection(@);
4 L! @# y! F4 b; I if @.Destination /= void then- o& a; x/ A8 C8 d2 y
@.Destination.NumReservation :=
% o8 N9 C" X$ `- x# H0 \( j @.Destination.NumReservation + 1;
9 L" M7 }( L/ q: \ end;
4 {6 v$ n7 `' e8 p @.CurrIcon := "drivingHome";
( E# F: g! [) `* u @.DrivingHome := true;/ S8 `- C4 S# M7 e
end;
" L+ ]- x0 z8 B$ C+ _0 B" L else -- the vehicle @ is empty, both vehicle and part are in the same dock station
4 T# F: K+ g' j part := @.transpOrder;
: n5 p& ?" p! ]$ I% ` part.move(@);-- load part
7 q! ^( @0 u/ N0 i( b9 X1 g @.CurrIcon := "load";
# E0 ^, C4 e0 J: f7 c; a6 r GlobalDistObj := part.globDestination;
! M; h3 \: ^$ }3 [/ i1 Z$ ` assignLObj := rgmanager.rgAssignL;7 Q. r4 q6 c. }( E7 c& e
row := assignLObj.getRowNo(GlobalDistObj);. ]' R$ I8 ]0 S: @
if Row = -1 then -- since 70
* |8 f' V* s* X$ @. K2 \. A if lan=1 then! l# w6 ^1 c1 b6 ~1 n) }/ ^
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),* J4 [; B3 a! d3 \; Y6 Q# Y4 ]
to_str("in der Andockstation: \"",?.~.name,"\""));
7 |6 i7 x8 N2 i# J$ b9 y; o else
9 C2 S9 N+ r; J ` promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),1 |' M* w, A4 K! ^
to_str("in docking station: \"",?.~.name,"\"")); ' E" X a, L4 v7 c) N x) I
end;1 }) s! J0 W3 x) ]6 a# p5 Q. W
else3 ~" Z( y' I% m8 j
@.Destination := assignLObj[1,row];
5 h' M. E) y/ V end;
% m9 X% E* e- | newDirection(@);
6 B! b6 \; A) q: @5 f' R9 D; j @.HasOrder := true;) H H; I9 \2 P3 [
end;7 W4 e7 w2 X" \( h7 R5 z
end;
( A& _& B& F7 a3 L* `end; -- of the method
; Y6 s% l2 g( M' r |