/* called by: entrance ctrl of the object 'track'
. C5 _0 I1 P/ w, ^% W*/
b, z5 `- @6 [( \is
" u1 e& o, |: A' f' |& b$ h3 l part, GlobalDistObj, assignLObj:object;row,Lan:integer;
! q0 l( K: o% \do
, I( f) h! m' B+ l5 W! i: [ Lan := rootfolder.Internal.Tools.AOLlanguage;& \; c1 s- G7 t% r
if current = @.Destination -- else return
& Q4 Q# V7 c& b2 _$ N then R2 N" I2 f2 B2 ^1 i% R: ~$ [
@.Destination := void;
9 A4 X% E/ j; Z6 i- [5 U if @.occupied then
) X- t3 t. s- `0 H. H part := @.cont;
9 b& {3 I' d" u0 h7 \% E2 {( v! G @.transpOrder := void;# S5 P2 [9 d; O7 X
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
0 B' ^" Z- d" { t( n ~ @,root.eventcontroller.simTime);: H$ l, w9 m4 x1 K; z0 j
@.HasOrder := false;3 c9 W: x$ l* X
@.DrivingHome := true;
( r: n+ S, y. ], o! y2 _! t rgManager.tryToStartTransOrder;7 S }3 R) i* o- _+ V
if @.Destination = void0 G6 V. X9 d+ x$ Q* E9 T
then -- no transport order for vehicle @1 b9 ]' U( W" {4 f2 D7 Y, r
@.Destination :=
i/ S) x& n" Z" I2 F rgManager.nearestFreeStation(@,track.~);
+ d6 ?6 l% B& N0 C$ h' E8 A T3 m newDirection(@);
$ `! O8 S# O, E- Z if @.Destination /= void then
# C0 Z* V; B Z0 o# h @.Destination.NumReservation :=
8 E: k& |' L5 d! n, u0 o @.Destination.NumReservation + 1;$ Y) A: n/ s: m) I. @
end;1 G# }" P2 |% Y$ q. S2 F
@.CurrIcon := "drivingHome";( o' ^, U: I1 g0 c
@.DrivingHome := true;
% H1 p7 [: r% `: w. q end;
% ` W2 _4 [; F- r0 K/ B( ? else -- the vehicle @ is empty, both vehicle and part are in the same dock station
9 G( T9 w- B! H$ Y% r' Q part := @.transpOrder;
% y, A" [, a+ I y* V' @' x" W% Y0 n part.move(@);-- load part
, i3 x" V8 O# z# x. ?6 ^" Z" X# M# q! | @.CurrIcon := "load";) H/ ^$ o# W9 p) z
GlobalDistObj := part.globDestination;
4 H5 P O4 ^4 t' ?+ | assignLObj := rgmanager.rgAssignL;
. E: s8 ~- J* ?) f4 x3 t row := assignLObj.getRowNo(GlobalDistObj);: Q5 {/ s/ r3 w4 P
if Row = -1 then -- since 70, b& }1 j$ K4 Q2 F6 v8 U
if lan=1 then
7 K' m- [5 r8 n+ t: y promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
" ^0 i- f0 E) r2 g9 P* U1 e! O to_str("in der Andockstation: \"",?.~.name,"\""));" B' \$ C/ l7 R/ M7 ?) n8 v
else, a" s0 z' k$ l9 Q- h1 @
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
6 Q, \& m) P& {2 Z% Z3 r to_str("in docking station: \"",?.~.name,"\"")); / U8 @% ]/ X5 J
end;
# r6 ]: S& x. [4 o: R/ N else
, v6 U$ D: ]/ Z0 D3 W+ a/ y/ h3 J6 j2 f @.Destination := assignLObj[1,row];3 D: E! Y0 b( j+ W
end; ) ^% H# S1 |/ c; L/ c
newDirection(@);
6 w3 ~! [. b6 a- K: ` E+ O @.HasOrder := true;9 y g; _( ~1 Z
end;4 }3 a; m# K- K6 b t' K) y2 Y
end;+ b. A$ G1 ^) f0 @& [: y. Y- n: B
end; -- of the method4 u7 Z4 ^9 w5 D3 G8 u+ V5 a3 e
|