mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/PCK-Studio.git
synced 2026-05-23 18:44:32 +00:00
SkinBOX - Move IsBasePart and IsOverlyPart from extension to main class
This commit is contained in:
@@ -67,14 +67,12 @@ namespace PckStudio.Extensions
|
||||
return SkinBOX.BaseTypes.IndexInRange(index) ? SkinBOX.BaseTypes[index] : "";
|
||||
}
|
||||
|
||||
public static bool IsBasePart(this SkinBOX skinBox)
|
||||
public static string GetBaseType(string type)
|
||||
{
|
||||
return SkinBOX.BaseTypes.Contains(skinBox.Type);
|
||||
}
|
||||
|
||||
public static bool IsOverlayPart(this SkinBOX skinBox)
|
||||
{
|
||||
return SkinBOX.OverlayTypes.Contains(skinBox.Type);
|
||||
if (!SkinBOX.IsValidType(type))
|
||||
return "";
|
||||
int index = Array.IndexOf(SkinBOX.OverlayTypes, type);
|
||||
return SkinBOX.BaseTypes.IndexInRange(index) ? SkinBOX.BaseTypes[index] : "";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -93,6 +93,14 @@ namespace PckStudio.Internal
|
||||
|
||||
public static bool IsValidType(string type) => ValidBoxTypes.Contains(type);
|
||||
|
||||
public bool IsBasePart() => IsBasePart(Type);
|
||||
|
||||
public static bool IsBasePart(string type) => BaseTypes.Contains(type);
|
||||
|
||||
public bool IsOverlayPart() => IsOverlayPart(Type);
|
||||
|
||||
public static bool IsOverlayPart(string type) => OverlayTypes.Contains(type);
|
||||
|
||||
public KeyValuePair<string, string> ToProperty()
|
||||
{
|
||||
return new KeyValuePair<string, string>("BOX", ToString());
|
||||
|
||||
Reference in New Issue
Block a user