rename ToolAttributes
This commit is contained in:
parent
5d855ef60b
commit
6e06947a33
|
@ -4,9 +4,9 @@ using System.Collections.Generic;
|
|||
namespace BizHawk.Client.EmuHawk
|
||||
{
|
||||
[AttributeUsage(AttributeTargets.Class)]
|
||||
public class ToolAttributes : Attribute
|
||||
public class ToolAttribute : Attribute
|
||||
{
|
||||
public ToolAttributes(bool released, string[] supportedSystems)
|
||||
public ToolAttribute(bool released, string[] supportedSystems)
|
||||
{
|
||||
Released = released;
|
||||
SupportedSystems = supportedSystems;
|
||||
|
|
|
@ -11,7 +11,7 @@ using BizHawk.Emulation.Common;
|
|||
|
||||
namespace BizHawk.Client.EmuHawk
|
||||
{
|
||||
[ToolAttributes(released: false, supportedSystems: null)]
|
||||
[Tool(released: false, supportedSystems: null)]
|
||||
public partial class AutoHawk : Form, IToolFormAutoConfig
|
||||
{
|
||||
public AutoHawk()
|
||||
|
|
|
@ -9,7 +9,7 @@ using BizHawk.Client.Common;
|
|||
|
||||
namespace BizHawk.Client.EmuHawk
|
||||
{
|
||||
[ToolAttributes(false, null)]
|
||||
[Tool(false, null)]
|
||||
public partial class GBGameGenie : Form, IToolFormAutoConfig
|
||||
{
|
||||
// TODO: fix the use of Global.Game.System and Emulator.SystemId
|
||||
|
|
|
@ -20,7 +20,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
//Verify all wording in the error reports
|
||||
|
||||
|
||||
[ToolAttributes(released: true, supportedSystems: new[] { "GB", "GBA", "GEN", "N64", "NES", "PSX", "SAT", "SMS", "SNES" })]
|
||||
[Tool(released: true, supportedSystems: new[] { "GB", "GBA", "GEN", "N64", "NES", "PSX", "SAT", "SMS", "SNES" })]
|
||||
public partial class GameShark : Form, IToolForm, IToolFormAutoConfig
|
||||
{
|
||||
#region " Game Genie Dictionary "
|
||||
|
|
|
@ -12,7 +12,7 @@ using BizHawk.Emulation.Cores.Consoles.Sega.gpgx;
|
|||
|
||||
namespace BizHawk.Client.EmuHawk
|
||||
{
|
||||
[ToolAttributes(false, null)]
|
||||
[Tool(false, null)]
|
||||
public partial class GenGameGenie : Form, IToolFormAutoConfig
|
||||
{
|
||||
#pragma warning disable 675
|
||||
|
|
|
@ -10,7 +10,7 @@ using BizHawk.Client.EmuHawk.ToolExtensions;
|
|||
|
||||
namespace BizHawk.Client.EmuHawk
|
||||
{
|
||||
[ToolAttributes(false, null)]
|
||||
[Tool(false, null)]
|
||||
public partial class MacroInputTool : Form, IToolFormAutoConfig
|
||||
{
|
||||
[RequiredService]
|
||||
|
|
|
@ -8,7 +8,7 @@ using BizHawk.Client.Common;
|
|||
|
||||
namespace BizHawk.Client.EmuHawk
|
||||
{
|
||||
[ToolAttributes(false, null)]
|
||||
[Tool(false, null)]
|
||||
public partial class NESGameGenie : Form, IToolFormAutoConfig
|
||||
{
|
||||
[RequiredService]
|
||||
|
|
|
@ -10,7 +10,7 @@ using BizHawk.Client.Common;
|
|||
|
||||
namespace BizHawk.Client.EmuHawk
|
||||
{
|
||||
[ToolAttributes(false, null)]
|
||||
[Tool(false, null)]
|
||||
public partial class SNESGameGenie : Form, IToolFormAutoConfig
|
||||
{
|
||||
[RequiredService]
|
||||
|
|
|
@ -60,7 +60,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
continue;
|
||||
if (typeof(ToolBox).IsAssignableFrom(t)) //yo dawg i head you like toolboxes
|
||||
continue;
|
||||
if (VersionInfo.DeveloperBuild && t.GetCustomAttributes(false).OfType<ToolAttributes>().Any(a => !a.Released))
|
||||
if (VersionInfo.DeveloperBuild && t.GetCustomAttributes(false).OfType<ToolAttribute>().Any(a => !a.Released))
|
||||
continue;
|
||||
if (t == typeof(GBGameGenie)) // Hack, this tool is specific to a system id and a sub-system (gb and gg) we have no reasonable way to declare a dependency like that
|
||||
continue;
|
||||
|
|
|
@ -740,7 +740,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
}
|
||||
|
||||
var attr = tool.GetCustomAttributes(false)
|
||||
.OfType<ToolAttributes>()
|
||||
.OfType<ToolAttribute>()
|
||||
.FirstOrDefault();
|
||||
|
||||
// If no supported systems mentioned assume all
|
||||
|
|
Loading…
Reference in New Issue