/* called by: entrance ctrl of the object 'track' `7 G# `2 {4 ]
*/6 u" w. r s4 `1 k6 y! M0 h( ]. s
is
3 {" {# a7 d+ x part, GlobalDistObj, assignLObj:object;row,Lan:integer;; x) Q( v/ C! u! z
do' u* |" }* o+ f# e
Lan := rootfolder.Internal.Tools.AOLlanguage;
0 Y7 I$ } ]3 A9 h' z1 ]: o0 g7 c if current = @.Destination -- else return% M: u1 e+ l! J: m, j
then' H( B+ Z9 q! b$ h7 ?
@.Destination := void;! e- {+ l; r7 o
if @.occupied then0 r* m9 L- ~' Z
part := @.cont;
; p+ r5 Y3 a; ~( Z @.transpOrder := void;' `& F1 b2 _+ \+ j
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
7 E9 ?# O' H! k K% f' @( h @,root.eventcontroller.simTime);( F1 T$ n& z& {! I) I; k
@.HasOrder := false;
9 u4 v# T; g5 X& s @.DrivingHome := true;
* }9 q" P1 ~4 U4 V$ C0 M7 g rgManager.tryToStartTransOrder;
& S/ k3 o8 N9 W5 b% R: z if @.Destination = void
5 x4 E5 Z! M% j* v w2 w' Q then -- no transport order for vehicle @
! ~! G6 a. W4 N% S @.Destination :=4 o6 U) b# V# U7 S
rgManager.nearestFreeStation(@,track.~);; j4 J/ P, R7 v$ x# A; I6 ]( j) y
newDirection(@); 5 e# N/ n: ]: Z d- r% A. |4 [
if @.Destination /= void then
, x+ D( k& \! s/ K* g8 E. o @.Destination.NumReservation :=7 c( y `* p( q( y; ]
@.Destination.NumReservation + 1;; R' z% l. U) u5 v
end;4 t3 K0 n! |. O# l
@.CurrIcon := "drivingHome";
& h! F1 R- u0 I1 } @.DrivingHome := true;
- z3 }2 T; a2 ^& t2 A+ f( x end;8 T1 _$ e2 z5 O5 X2 i
else -- the vehicle @ is empty, both vehicle and part are in the same dock station+ ?' O! s% r( Q! u5 M
part := @.transpOrder;
/ e4 X- b$ A& O$ `6 _$ l, {4 i& x part.move(@);-- load part! N% c8 ^2 U# o! r8 t
@.CurrIcon := "load";$ n- N5 K- v V! T
GlobalDistObj := part.globDestination;9 Y ] ?/ k1 b7 D
assignLObj := rgmanager.rgAssignL;
: J; L' }& ]0 ] i: D( i- ?9 V, z row := assignLObj.getRowNo(GlobalDistObj);
. S( t$ ~3 W5 i) v: ~/ [% h# D6 ^ if Row = -1 then -- since 70
5 `& p) ^1 z" g$ M! x! [ if lan=1 then
# e! K- [% M @2 o6 t6 x% K promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
: A1 \& v. }; C' {& e6 ~& | to_str("in der Andockstation: \"",?.~.name,"\""));
1 v: |9 M& d; M7 s% Y' k& c else" v+ {2 u1 \+ M1 W9 B% G, f6 T# p3 A. p
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
: x A; g( x8 R L to_str("in docking station: \"",?.~.name,"\"")); 8 s2 ?& E4 D! T
end;
- o2 o+ k% q+ b else
3 C! q0 ?" `1 x, M3 H- W8 p @.Destination := assignLObj[1,row];
" d! g1 H2 E, F' p4 t9 W end;
( k& u# X1 P2 N3 S newDirection(@);
0 l, y" ^ f. i% x2 J4 p& F @.HasOrder := true;
% P) M% P# s% J+ K5 r. Z end;: R$ Y z4 A4 z2 ^0 {, b( b
end;9 Z7 @) u$ Q! Y- p! f2 m
end; -- of the method/ z, d" |$ m: ]3 p* f
|