Skip to content

Commit f0b74e1

Browse files
committed
pirate cleanup fix.
1 parent 0d9b2bc commit f0b74e1

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

‎Essentials/Commands/CleanupModule.cs‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
using Torch.Commands;
1212
using Torch.Mod;
1313
using Torch.Mod.Messages;
14+
using VRage.Game;
1415
using Vector3D = VRageMath.Vector3D;
1516

1617
namespace Essentials.Commands
@@ -366,6 +367,13 @@ public bool OwnedBy(MyCubeGrid grid, string str)
366367
if (string.Compare(str, "pirates", StringComparison.InvariantCultureIgnoreCase) == 0)
367368
{
368369
identityId = MyPirateAntennas.GetPiratesId();
370+
var pirateFaction = MySession.Static.Factions.GetPlayerFaction(identityId);
371+
if (pirateFaction != null && pirateFaction.Members.Count > 1)
372+
{
373+
return grid.BigOwners.Count > 0 &&
374+
pirateFaction.Members.ContainsKey(grid.BigOwners.FirstOrDefault());
375+
}
376+
369377
}
370378
else
371379
{

0 commit comments

Comments
 (0)