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

Commit 573d5b5

Browse files
committed
blocktype and blocksubtype commands didn't properly handle commands with uppercase letters
1 parent 5ba205e commit 573d5b5

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
//140
1+
//142
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.140")]
10-
[assembly: AssemblyVersion("1.13.6.140")]
9+
[assembly: AssemblyFileVersion("1.13.6.142")]
10+
[assembly: AssemblyVersion("1.13.6.142")]

EssentialsPlugin/Utility/CubeGrid.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1045,10 +1045,10 @@ public static bool IsGroupGridSize( GridGroup group, MyCubeSize size, bool isSta
10451045
public static bool DoesGroupHaveBlockSubtype( GridGroup group, string subtype, int count )
10461046
{
10471047
int result = 0;
1048-
1048+
10491049
foreach (MyCubeBlock block in group.GetFatBlocks())
10501050
{
1051-
if (block.BlockDefinition.Id.SubtypeName.ToLower().Contains(subtype))
1051+
if (block.BlockDefinition.Id.SubtypeName.ToLower().Contains(subtype, StringComparison.CurrentCultureIgnoreCase))
10521052
result++;
10531053

10541054
if (result >= count)
@@ -1063,7 +1063,7 @@ public static bool DoesGroupHaveBlockType(GridGroup group, string type, int coun
10631063

10641064
foreach (MyCubeBlock block in group.GetFatBlocks())
10651065
{
1066-
if (block.BlockDefinition.Id.TypeId.ToString( ).ToLower().Contains( type ))
1066+
if (block.BlockDefinition.Id.TypeId.ToString( ).ToLower().Contains( type, StringComparison.CurrentCultureIgnoreCase ))
10671067
result++;
10681068

10691069
if (result >= count)

0 commit comments

Comments
 (0)