/* called by: entrance ctrl of the object 'track'
2 Z4 O- N1 l$ q" A. G9 _*/
; h2 Q) h9 |; p" e. Q$ T* Bis8 P3 H/ ^5 b/ ~2 Z5 Y. m
part, GlobalDistObj, assignLObj:object;row,Lan:integer;- K; C- H. Q t3 s# I2 K
do
/ t# L, K# _( X- i Lan := rootfolder.Internal.Tools.AOLlanguage;
& ]% [8 |. N3 w0 ~8 T) A" ^ if current = @.Destination -- else return. C$ B5 O. Z0 M5 \2 \! o: m
then% W2 C9 Y4 d: |6 ?' {
@.Destination := void;
1 x( o+ x% d: B& |1 F- k if @.occupied then
5 [ K" r" ]! \" s6 h part := @.cont;2 n3 m* V2 [# i1 s" g/ L8 |7 r
@.transpOrder := void;
/ L; V) D3 ~6 d# P) C* }! ~6 i part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,# U# @$ E& e4 v1 Y. a$ I6 n8 F
@,root.eventcontroller.simTime);3 ^* a. F# o" b5 D- G
@.HasOrder := false;
' D$ W2 P% ~4 { @.DrivingHome := true;
$ g1 D8 v6 |+ z. X8 F5 @' f rgManager.tryToStartTransOrder;0 \' `# p$ O+ m8 E/ k
if @.Destination = void6 j3 x8 M8 d ^
then -- no transport order for vehicle @. c- N% D1 y9 R
@.Destination :=" G+ j9 i9 R8 e' Q' E
rgManager.nearestFreeStation(@,track.~);
) e- ~+ `" A4 |' {3 p4 E1 n" a newDirection(@); 6 {& G) f8 Z, c" |
if @.Destination /= void then
* A; o! l1 h5 o' k) o8 l. G) o* |7 C. n @.Destination.NumReservation :=
( M9 i \& r3 j }" `) l; B* w5 Y4 ^$ P @.Destination.NumReservation + 1;
; G- X6 q* H7 C1 g& J$ s; s, [# y end;
% C; u, F# q: J' J0 E0 ?7 ` @.CurrIcon := "drivingHome";
+ B' Q2 N3 l1 l) D. C+ ^ @.DrivingHome := true;' X) `7 j& i, z3 \- f- r. z5 Z
end;
6 g" v1 F& o1 ~. G: |$ u6 H, _ else -- the vehicle @ is empty, both vehicle and part are in the same dock station
. p1 T3 g; M; @ part := @.transpOrder;
h5 V- b" K$ y4 N# u: d7 F8 B part.move(@);-- load part
+ b8 y7 G1 `) ]4 E @.CurrIcon := "load";# |' ]) l) X' l6 t1 C7 i7 M( u
GlobalDistObj := part.globDestination;' V7 d3 a0 k; ~# Z% Y* X( J
assignLObj := rgmanager.rgAssignL;
; P7 c) \. _) P: m' @ row := assignLObj.getRowNo(GlobalDistObj);
5 C# }* J" u0 | ?7 R if Row = -1 then -- since 70, O1 Z8 q# n: u T) `7 V* d& r
if lan=1 then8 V* [; h" _' a* _& i% Y
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),. j; N' F! q5 a3 }5 u7 Q8 {
to_str("in der Andockstation: \"",?.~.name,"\""));
|5 o4 d$ b( } else
% S w7 K5 J% J, \% V- \ O promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
2 B9 a/ ^. x, M to_str("in docking station: \"",?.~.name,"\"")); 8 E2 P/ s$ n6 ^; W' D7 t
end;. D2 `- w P+ c Q3 S: m9 J
else
: Z) h" ~! }$ S @.Destination := assignLObj[1,row];0 q0 f! S# G- I' h; D( |- y. l, J
end;
* F7 R4 O6 @8 @$ c; D newDirection(@);
, |( Y p! ?" X9 U! o( U; ? @.HasOrder := true;8 K- `' @& Z& x9 U3 ], Z- A9 ?% v9 @
end;7 o3 S; O+ s* K2 u
end;
) @) D2 `3 ^5 B6 h3 q: J; X% b% @end; -- of the method
6 g$ m7 A7 \1 N0 e Z7 P5 w- ~ |