From 0302363417cf430e110341da3c773bbbef31c79e Mon Sep 17 00:00:00 2001 From: joker-119 Date: Tue, 12 Apr 2022 16:00:50 -0700 Subject: [PATCH 1/2] SOme smol updoots --- CustomItems/Configs/Items.cs | 96 ++++++------------------------------ CustomItems/CustomItems.cs | 35 +------------ 2 files changed, 17 insertions(+), 114 deletions(-) diff --git a/CustomItems/Configs/Items.cs b/CustomItems/Configs/Items.cs index 9843c0f..710aac5 100644 --- a/CustomItems/Configs/Items.cs +++ b/CustomItems/Configs/Items.cs @@ -22,145 +22,81 @@ public class Items /// /// Gets the list of emp greanades. /// - [Description("The list of EMP grenades.")] - public List EmpGrenades { get; private set; } = new List - { - new EmpGrenade { Type = ItemType.GrenadeFlash }, - }; + public EmpGrenade EmpGrenade { get; set; } /// /// Gets the list of grenade launchers. /// - [Description("The list of grenade launchers.")] - public List GrenadeLaunchers { get; private set; } = new List - { - new GrenadeLauncher { Type = ItemType.GunLogicer }, - }; + public GrenadeLauncher GrenadeLauncher { get; set; } /// /// Gets the list of implosion grenades. /// - [Description("The list of implosion grenades.")] - public List ImplosionGrenades { get; private set; } = new List - { - new ImplosionGrenade { Type = ItemType.GrenadeHE }, - }; + public ImplosionGrenade ImplosionGrenade { get; set; } /// /// Gets the list of lethal injections. /// - [Description("The list of lethal injections.")] - public List LethalInjections { get; private set; } = new List - { - new LethalInjection { Type = ItemType.Adrenaline }, - }; + public LethalInjection LethalInjection { get; set; } /// /// Gets the list of lucky coins. /// - [Description("The list of lucky coins.")] - public List LuckyCoins { get; private set; } = new List - { - new LuckyCoin { Type = ItemType.Coin }, - }; + public LuckyCoin LuckyCoin { get; set; } /// /// Gets the list of mediGuns. /// - [Description("The list of mediGuns.")] - public List MediGuns { get; private set; } = new List - { - new MediGun { Type = ItemType.GunFSP9 }, - }; + public MediGun MediGun { get; set; } /// /// Gets the list of Scp127s. /// - [Description("The list of Scp127s.")] - public List Scp127s { get; private set; } = new List - { - new Scp127 { Type = ItemType.GunCOM18 }, - }; + public Scp127 Scp127 { get; set; } /// /// Gets the list of Scp1499s. /// - [Description("The list of Scp1499s.")] - public List Scp1499s { get; private set; } = new List - { - new Scp1499 { Type = ItemType.SCP268 }, - }; + public Scp1499 Scp1499 { get; set; } /// /// Gets the list of sniper rifles. /// - [Description("The list of sniper rifles.")] - public List SniperRifle { get; private set; } = new List - { - new SniperRifle { Type = ItemType.GunE11SR }, - }; + public SniperRifle SniperRifle { get; set; } /// /// Gets the list of tranquilizer guns. /// - [Description("The list of tranquilizer guns.")] - public List TranquilizerGun { get; private set; } = new List - { - new TranquilizerGun { Type = ItemType.GunCOM18 }, - }; + public TranquilizerGun TranquilizerGun { get; set; } /// /// Gets the list of Scp714s. /// - [Description("The list of Scp714s.")] - public List Scp714s { get; private set; } = new List - { - new Scp714 { Type = ItemType.Coin }, - }; + public Scp714 Scp714 { get; set; } /// /// Gets the list of Anti-Memetic Pills. /// - [Description("The list of Anti-Memetic Pills.")] - public List AntiMemeticPills { get; private set; } = new List - { - new AntiMemeticPills { Type = ItemType.SCP500 }, - }; + public AntiMemeticPills AntiMemeticPills { get; set; } /// /// Gets the list of DeflectorSheilds. /// - [Description("The list of DeflectorSheilds.")] - public List DeflectorSheilds { get; private set; } = new List - { - new DeflectorShield(), - }; + public DeflectorShield DeflectorShield { get; set; } /// /// Gets the list of s. /// - [Description("The list of SCP-2818s.")] - public List Scp2818s { get; private set; } = new List - { - new Scp2818 { Type = ItemType.GunE11SR, }, - }; + public Scp2818 Scp2818 { get; set; } /// /// Gets the list of C4Charges. /// - [Description("The list of C4Charges.")] - public List C4Charges { get; private set; } = new List - { - new C4Charge { Type = ItemType.GrenadeHE }, - }; + public C4Charge C4Charge { get; set; } /// /// Gets the list of AutoGuns. /// - [Description("The list of AutoGuns.")] - public List AutoGuns { get; private set; } = new List - { - new AutoGun { Type = ItemType.GunCOM15 }, - }; + public AutoGun AutoGun { get; set; } } } diff --git a/CustomItems/CustomItems.cs b/CustomItems/CustomItems.cs index d0b7527..d615275 100644 --- a/CustomItems/CustomItems.cs +++ b/CustomItems/CustomItems.cs @@ -46,24 +46,6 @@ public override void OnEnabled() harmonyInstance.PatchAll(); Config.LoadItems(); - /* - Config.ItemConfigs.Scp127s.Register(); - Config.ItemConfigs.Scp714s.Register(); - Config.ItemConfigs.Scp1499s.Register(); - Config.ItemConfigs.Scp2818s.Register(); - Config.ItemConfigs.AutoGuns.Register(); - Config.ItemConfigs.C4Charges.Register(); - Config.ItemConfigs.DeflectorSheilds.Register(); - Config.ItemConfigs.EmpGrenades.Register(); - Config.ItemConfigs.GrenadeLaunchers.Register(); - Config.ItemConfigs.ImplosionGrenades.Register(); - Config.ItemConfigs.LethalInjections.Register(); - Config.ItemConfigs.LuckyCoins.Register(); - Config.ItemConfigs.MediGuns.Register(); - Config.ItemConfigs.SniperRifle.Register(); - Config.ItemConfigs.TranquilizerGun.Register(); - Config.ItemConfigs.AntiMemeticPills.Register(); - */ Log.Debug("Registering items..", Config.IsDebugEnabled); CustomItem.RegisterItems(overrideClass: Config.ItemConfigs); @@ -75,22 +57,7 @@ public override void OnEnabled() /// public override void OnDisabled() { - Config.ItemConfigs.Scp127s.Unregister(); - Config.ItemConfigs.Scp714s.Unregister(); - Config.ItemConfigs.Scp1499s.Unregister(); - Config.ItemConfigs.Scp2818s.Unregister(); - Config.ItemConfigs.AutoGuns.Unregister(); - Config.ItemConfigs.C4Charges.Unregister(); - Config.ItemConfigs.DeflectorSheilds.Unregister(); - Config.ItemConfigs.EmpGrenades.Unregister(); - Config.ItemConfigs.GrenadeLaunchers.Unregister(); - Config.ItemConfigs.ImplosionGrenades.Unregister(); - Config.ItemConfigs.LethalInjections.Unregister(); - Config.ItemConfigs.LuckyCoins.Unregister(); - Config.ItemConfigs.MediGuns.Unregister(); - Config.ItemConfigs.SniperRifle.Unregister(); - Config.ItemConfigs.TranquilizerGun.Unregister(); - Config.ItemConfigs.AntiMemeticPills.Unregister(); + CustomItem.UnregisterItems(); Server.ReloadedConfigs -= serverHandler.OnReloadingConfigs; From 47cc5db916a9f0557237f714fe83215d0ad923bd Mon Sep 17 00:00:00 2001 From: joker-119 Date: Tue, 12 Apr 2022 16:34:49 -0700 Subject: [PATCH 2/2] derp --- CustomItems/Configs/Items.cs | 32 +++++++++++++------------- CustomItems/Properties/AssemblyInfo.cs | 4 ++-- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/CustomItems/Configs/Items.cs b/CustomItems/Configs/Items.cs index 710aac5..3ee8e59 100644 --- a/CustomItems/Configs/Items.cs +++ b/CustomItems/Configs/Items.cs @@ -22,81 +22,81 @@ public class Items /// /// Gets the list of emp greanades. /// - public EmpGrenade EmpGrenade { get; set; } + public EmpGrenade EmpGrenade { get; set; } = new EmpGrenade(); /// /// Gets the list of grenade launchers. /// - public GrenadeLauncher GrenadeLauncher { get; set; } + public GrenadeLauncher GrenadeLauncher { get; set; } = new GrenadeLauncher(); /// /// Gets the list of implosion grenades. /// - public ImplosionGrenade ImplosionGrenade { get; set; } + public ImplosionGrenade ImplosionGrenade { get; set; } = new ImplosionGrenade(); /// /// Gets the list of lethal injections. /// - public LethalInjection LethalInjection { get; set; } + public LethalInjection LethalInjection { get; set; } = new LethalInjection(); /// /// Gets the list of lucky coins. /// - public LuckyCoin LuckyCoin { get; set; } + public LuckyCoin LuckyCoin { get; set; } = new LuckyCoin(); /// /// Gets the list of mediGuns. /// - public MediGun MediGun { get; set; } + public MediGun MediGun { get; set; } = new MediGun(); /// /// Gets the list of Scp127s. /// - public Scp127 Scp127 { get; set; } + public Scp127 Scp127 { get; set; } = new Scp127(); /// /// Gets the list of Scp1499s. /// - public Scp1499 Scp1499 { get; set; } + public Scp1499 Scp1499 { get; set; } = new Scp1499(); /// /// Gets the list of sniper rifles. /// - public SniperRifle SniperRifle { get; set; } + public SniperRifle SniperRifle { get; set; } = new SniperRifle(); /// /// Gets the list of tranquilizer guns. /// - public TranquilizerGun TranquilizerGun { get; set; } + public TranquilizerGun TranquilizerGun { get; set; } = new TranquilizerGun(); /// /// Gets the list of Scp714s. /// - public Scp714 Scp714 { get; set; } + public Scp714 Scp714 { get; set; } = new Scp714(); /// /// Gets the list of Anti-Memetic Pills. /// - public AntiMemeticPills AntiMemeticPills { get; set; } + public AntiMemeticPills AntiMemeticPills { get; set; } = new AntiMemeticPills(); /// /// Gets the list of DeflectorSheilds. /// - public DeflectorShield DeflectorShield { get; set; } + public DeflectorShield DeflectorShield { get; set; } = new DeflectorShield(); /// /// Gets the list of s. /// - public Scp2818 Scp2818 { get; set; } + public Scp2818 Scp2818 { get; set; } = new Scp2818(); /// /// Gets the list of C4Charges. /// - public C4Charge C4Charge { get; set; } + public C4Charge C4Charge { get; set; } = new C4Charge(); /// /// Gets the list of AutoGuns. /// - public AutoGun AutoGun { get; set; } + public AutoGun AutoGun { get; set; } = new AutoGun(); } } diff --git a/CustomItems/Properties/AssemblyInfo.cs b/CustomItems/Properties/AssemblyInfo.cs index d6e4411..aa3dab7 100644 --- a/CustomItems/Properties/AssemblyInfo.cs +++ b/CustomItems/Properties/AssemblyInfo.cs @@ -38,5 +38,5 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("6.1.0.0")] -[assembly: AssemblyFileVersion("6.1.0.0")] \ No newline at end of file +[assembly: AssemblyVersion("6.1.1.0")] +[assembly: AssemblyFileVersion("6.1.1.0")] \ No newline at end of file