Skip to content
This repository was archived by the owner on Jun 23, 2023. It is now read-only.

Commit e2e75a8

Browse files
committed
Fixed an error where multiple arguments in grid scans weren't being respected properly.
1 parent 010b4f7 commit e2e75a8

File tree

2 files changed

+18
-13
lines changed

2 files changed

+18
-13
lines changed
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
//49
1+
//53
22
//
33
// This code was generated by a tool. Any changes made manually will be lost
44
// the next time this code is regenerated.
55
//
66

77
using System.Reflection;
88

9-
[assembly: AssemblyFileVersion("1.13.6.49")]
10-
[assembly: AssemblyVersion("1.13.6.49")]
9+
[assembly: AssemblyFileVersion("1.13.6.53")]
10+
[assembly: AssemblyVersion("1.13.6.53")]

EssentialsPlugin/Utility/CubeGrid.cs

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -784,9 +784,9 @@ public static HashSet<GridGroup> ScanGrids( ulong userId, string[] words )
784784
if ( power == 2 && DoesGroupHavePowerSupply( group ) )
785785
found = true;
786786

787-
if ( owner == 1 && group.BigOwners.Count == 0 || ( group.BigOwners.Count == 1 && group.BigOwners[0] == 0 ) )
787+
if (owner == 1 && group.SmallOwners.Count == 0 || (group.SmallOwners.Count == 1 && group.SmallOwners[0] == 0 ) )
788788
found = true;
789-
if ( owner == 2 && group.BigOwners.Count > 0 )
789+
if ( owner == 2 && group.SmallOwners.Count > 0 )
790790
found = true;
791791

792792
if ( functional == 1 && !IsGroupFunctional( group ) )
@@ -854,21 +854,26 @@ public static HashSet<GridGroup> ScanGrids( ulong userId, string[] words )
854854
subTypeDict.Clear( );
855855
typeDict.Clear( );
856856
checkList.Clear( );
857+
858+
bool found = true;
857859

858860
if ( online == 1 ) // notonline
859861
{
860862
if ( AreOwnersOnline( group ) )
861-
continue;
863+
found=false;
862864
}
863865
else if ( online == 2 ) // online
864866
{
865867
if ( !AreOwnersOnline( group ) )
866-
continue;
868+
found=false;
867869
}
868870

869-
bool found = true;
871+
if (owner == 1 && group.SmallOwners.Count == 0 || (group.SmallOwners.Count == 1 && group.SmallOwners[0] == 0))
872+
continue;
873+
if ( owner == 2 && group.SmallOwners.Count > 0 )
874+
continue;
870875

871-
if ( functional != 0 )
876+
if ( functional != 0 )
872877
{
873878
if ( IsGroupFunctional( group ) )
874879
{
@@ -972,22 +977,22 @@ public static HashSet<GridGroup> ScanGrids( ulong userId, string[] words )
972977
if ( excludesBlockType && found )
973978
found = ApplyBlockExclusionFilter( userId, typeDict, blockTypes, quiet, debug, group );
974979

975-
if ( requireBlockCount && found && group.CubeBlocks.Count < blockCount )
980+
if ( requireBlockCount && group.CubeBlocks.Count < blockCount )
976981
{
977982
found = false;
978983
}
979984

980-
if ( requireBlockCountLess && found && group.CubeBlocks.Count >= blockCountLess )
985+
if ( requireBlockCountLess && group.CubeBlocks.Count >= blockCountLess )
981986
{
982987
found = false;
983988
}
984989

985-
if ( isBlockSize && found && blockSize == MyCubeSize.Small && !IsGroupGridSize( group, MyCubeSize.Small ) )
990+
if ( isBlockSize && blockSize == MyCubeSize.Small && !IsGroupGridSize( group, MyCubeSize.Small ) )
986991
{
987992
found = false;
988993
}
989994

990-
if ( isBlockSize && found && blockSize == MyCubeSize.Large &&
995+
if ( isBlockSize && blockSize == MyCubeSize.Large &&
991996
!IsGroupGridSize( group, MyCubeSize.Large, testStatic ) )
992997
{
993998
found = false;

0 commit comments

Comments
 (0)