/* called by: entrance ctrl of the object 'track'8 b( B; h! K* ]6 _9 @! q- Y+ C
*/
: S9 t; q. d' v& X# C$ Ais9 u4 k+ }3 _$ I3 I( I
part, GlobalDistObj, assignLObj:object;row,Lan:integer;- t3 Q1 d7 e# ^) ^
do
- v: B4 l( y: q* i8 D$ o Lan := rootfolder.Internal.Tools.AOLlanguage; A5 o I0 X9 J, \- N2 F0 [
if current = @.Destination -- else return/ d& V# k! [4 B1 b# W
then3 `! P2 h7 c4 r) i8 g
@.Destination := void;* Q& ~+ ~! @8 f" I
if @.occupied then
6 J) o8 n' |3 j; u' [ part := @.cont;. n0 W* B* \ ?" n
@.transpOrder := void;
1 O! j' z+ X" R$ N% g part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
/ r% j+ S6 O: l! V1 s @,root.eventcontroller.simTime);6 ~8 R6 Z- `+ [
@.HasOrder := false;8 p; \4 c+ u9 m: ?6 P8 b
@.DrivingHome := true;
3 D" p8 ]7 @8 W; \: a rgManager.tryToStartTransOrder;4 X) Q, f- I& ~0 F/ J3 h8 q
if @.Destination = void) p% W( Y$ J' ?* ?. B
then -- no transport order for vehicle @, O! L8 ~5 d: t% c4 V8 Q; P" c
@.Destination :=% A/ i# K$ t' ]; M g* m7 m" ^
rgManager.nearestFreeStation(@,track.~);
4 {; x/ b+ R0 I8 y/ {- H" Y newDirection(@);
$ N0 t; r9 |6 @& |2 q if @.Destination /= void then
' S# O' |& Z2 [5 w* L+ N @.Destination.NumReservation :=
/ p1 o5 F6 I& k& R; T( v2 Z: a @.Destination.NumReservation + 1;, E# c: _& w7 i I9 ~: f- J2 b
end;
. w) Z( e: V) q$ p% d. f) R, f @.CurrIcon := "drivingHome";- y' c' j9 O: a8 z% h5 q8 k" V
@.DrivingHome := true;; s8 f! J" l/ ?/ F
end;: x! {6 t" E0 u5 [) p
else -- the vehicle @ is empty, both vehicle and part are in the same dock station; r6 X3 }1 z+ s3 ]5 g# [
part := @.transpOrder;% M* m; |. q! i; I& v3 k
part.move(@);-- load part
' \, q. O8 ~' ^5 m+ @% P @.CurrIcon := "load";
( o6 [- _" d: |4 g* w& L: R: ]8 S GlobalDistObj := part.globDestination;
# q% w! p# ]5 u' ]9 n. |1 ~) M assignLObj := rgmanager.rgAssignL;
! ~/ G+ Q7 q( Q( [. s/ w4 L row := assignLObj.getRowNo(GlobalDistObj);
. o8 h. G0 s5 q% C! d if Row = -1 then -- since 70/ W& Z; y$ V; c6 ~/ N
if lan=1 then2 s. V% i7 `1 t/ ?9 W
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
- V4 G8 B: w, A, i; n to_str("in der Andockstation: \"",?.~.name,"\""));' W p; a6 D% x0 D( o7 X
else
7 ~! o2 ^" o9 k- u9 }8 h promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
" W* L$ Z. b% x6 C! a' v4 k to_str("in docking station: \"",?.~.name,"\"")); ) n0 C# M! L% E5 \! i, K) T
end;( T h4 \( B5 \+ @/ Z
else
* Y5 M4 R C8 H @.Destination := assignLObj[1,row];
, u5 `8 L6 O m! S4 f @$ \2 y end; - D D6 {$ @9 e$ n- }/ U; Y
newDirection(@);
. Q5 r& S* A4 t6 M" e- l @.HasOrder := true;
* t R2 G( s$ z6 w& J end;
" t( j9 Y* N t end;
. y# o/ d! K7 R$ D4 r" [end; -- of the method! f" e6 {, ^2 C- a* e( U4 Y
|