Officially deprecate this function.
This commit is contained in:
committed by
Gustas
parent
02e4bfba95
commit
b30285e38d
@@ -9,6 +9,7 @@
|
|||||||
*/
|
*/
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
using System;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using Eluant;
|
using Eluant;
|
||||||
using OpenRA.Mods.Common.Traits;
|
using OpenRA.Mods.Common.Traits;
|
||||||
@@ -49,13 +50,15 @@ namespace OpenRA.Mods.Common.Scripting
|
|||||||
return FilteredObjects(actors, filter).ToArray();
|
return FilteredObjects(actors, filter).ToArray();
|
||||||
}
|
}
|
||||||
|
|
||||||
// HACK: This api method abuses the coordinate system, and should be removed
|
// HACK: This API method abuses the coordinate system, and should be removed
|
||||||
// in favour of proper actor queries. See #8549.
|
// in favour of proper actor queries. See #8549.
|
||||||
|
[Obsolete("This function will be removed in future versions. Use Map.ActorsInWorld instead.")]
|
||||||
[Desc("Returns the location of the top-left corner of the map (assuming zero terrain height).")]
|
[Desc("Returns the location of the top-left corner of the map (assuming zero terrain height).")]
|
||||||
public WPos TopLeft => Context.World.Map.ProjectedTopLeft;
|
public WPos TopLeft => Context.World.Map.ProjectedTopLeft;
|
||||||
|
|
||||||
// HACK: This api method abuses the coordinate system, and should be removed
|
// HACK: This API method abuses the coordinate system, and should be removed
|
||||||
// in favour of proper actor queries. See #8549.
|
// in favour of proper actor queries. See #8549.
|
||||||
|
[Obsolete("This function will be removed in future versions. Use Map.ActorsInWorld instead.")]
|
||||||
[Desc("Returns the location of the bottom-right corner of the map (assuming zero terrain height).")]
|
[Desc("Returns the location of the bottom-right corner of the map (assuming zero terrain height).")]
|
||||||
public WPos BottomRight => Context.World.Map.ProjectedBottomRight;
|
public WPos BottomRight => Context.World.Map.ProjectedBottomRight;
|
||||||
|
|
||||||
|
|||||||
@@ -558,9 +558,12 @@ Actors:
|
|||||||
USSRlstPoint: waypoint
|
USSRlstPoint: waypoint
|
||||||
Location: 48,83
|
Location: 48,83
|
||||||
Owner: Neutral
|
Owner: Neutral
|
||||||
CFBPoint: waypoint
|
BaseRectBR: waypoint
|
||||||
Location: 42,90
|
Location: 42,90
|
||||||
Owner: Neutral
|
Owner: Neutral
|
||||||
|
BaseRectTL: waypoint
|
||||||
|
Location: 20,42
|
||||||
|
Owner: Neutral
|
||||||
GreeceBasePoint: waypoint
|
GreeceBasePoint: waypoint
|
||||||
Location: 69,46
|
Location: 69,46
|
||||||
Owner: Neutral
|
Owner: Neutral
|
||||||
|
|||||||
@@ -8,8 +8,8 @@
|
|||||||
]]
|
]]
|
||||||
|
|
||||||
CheckForBase = function()
|
CheckForBase = function()
|
||||||
local baseBuildings = Map.ActorsInBox(Map.TopLeft, CFBPoint.CenterPosition, function(actor)
|
local baseBuildings = Map.ActorsInBox(BaseRectTL.CenterPosition, BaseRectBR.CenterPosition, function(actor)
|
||||||
return actor.Type == "fact" or actor.Type == "powr"
|
return (actor.Type == "fact" or actor.Type == "powr") and actor.Owner == player
|
||||||
end)
|
end)
|
||||||
|
|
||||||
return #baseBuildings >= 2
|
return #baseBuildings >= 2
|
||||||
|
|||||||
Reference in New Issue
Block a user