1 parent eaa76d3 commit 2c778d7Copy full SHA for 2c778d7
1 file changed
Essentials/Commands/CleanupModule.cs
@@ -311,6 +311,13 @@ public bool OwnedBy(MyCubeGrid grid, string str)
311
return grid.BigOwners.Contains(identityId);
312
}
313
314
+ [Condition("faction", helpText: "Finds grids owned by the given faction. Specify by faction tag.")]
315
+ public bool Faction(MyCubeGrid grid, string factionTag)
316
+ {
317
+ var target = MySession.Static.Factions.TryGetFactionByTag(factionTag);
318
+ return factionTag != null && target.Members.Keys.Select(member => grid.BigOwners.Contains(member)).FirstOrDefault();
319
+ }
320
+
321
[Condition("hastype", "notype", "Finds grids containing blocks of the given type.")]
322
public bool BlockType(MyCubeGrid grid, string str)
323
{
0 commit comments