| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151 |
- using UltimateNPCWeapons.Infos;
- using GadgetCore.API;
- using GadgetCore.API.ConfigMenu;
- using GadgetCore.Util;
- using RecipeMenuCore.API;
- using UnityEngine;
- namespace UltimateNPCWeapons
- {
- [Gadget("UltimateNPCWeapons", RequiredOnClients: true, LoadAfter: new string[] { "RecipeMenuCore" }, Dependencies: new string[] { "RecipeMenuCore" })]
- public class UltimateNPCWeapons : Gadget<UltimateNPCWeapons>
- {
- public const string MOD_VERSION = "1.0"; // Set this to the version of your mod.
- public const string CONFIG_VERSION = "1.0"; // Increment this whenever you change your mod's config file.
- public static int objectCrystalOreID;
- public static int objectCrystalWormWeakID;
- public static int objecWormOreID;
- public static bool objectWormOrePlaced;
- // Disable the config menu
- public override IGadgetConfigMenu GetConfigMenu() { return null; }
- public override string GetModDescription()
- {
- return "A mod adding ultimate variants for NPC weapons.\n\nArt by Saewin, Code by Zariteis";
- }
- protected override void Initialize()
- {
- Logger.Log("Ultimate NPC Weapons v" + Info.Mod.Version);
- // --
- // Creating items
- // --
- // Galactic
- var itemGalacticDarkfire = new GalacticDarkfireItemInfo(ItemType.WEAPON, "Galactic Darkfire", "", GadgetCoreAPI.LoadTexture2D("item/inventory/galacticDarkfire.png"), 20, new EquipStats(3, 0, 3, 0, 4, 0),
- HeldTex: GadgetCoreAPI.LoadTexture2D("item/hand/galacticDarkfire.png"));
- itemGalacticDarkfire.SetWeaponInfo(new float[] { 0.25f, 0, 0.25f, 0, 1, 0 }, GadgetCoreAPI.GetAttackSound(497));
- ItemRegistry.Singleton.Register(itemGalacticDarkfire, "galacticDarkfire");
- itemGalacticDarkfire.CreateProjectile("projectile/galacticDarkfireSmall.png", "projectile/galacticDarkfire.png");
- itemGalacticDarkfire.OnAttack += itemGalacticDarkfire.Attack;
- var itemGalacticSilence = new GalacticSilenceItemInfo(ItemType.WEAPON, "Galactic Silence", "", GadgetCoreAPI.LoadTexture2D("item/inventory/galacticSilence.png"), 20, new EquipStats(0, 0, 4, 0, 0, 0),
- HeldTex: GadgetCoreAPI.LoadTexture2D("item/hand/galacticSilence.png"));
- itemGalacticSilence.SetWeaponInfo(new float[] { 0, 0, 3, 0, 0, 0 }, GadgetCoreAPI.GetAttackSound(470));
- ItemRegistry.Singleton.Register(itemGalacticSilence, "galacticSilence");
- itemGalacticSilence.CreateProjectile("projectile/galacticSilence.png", "projectile/galacticSilenceSmoke.png");
- itemGalacticSilence.OnAttack += itemGalacticSilence.Attack;
- var itemGalacticRagnarok = new GalacticRagnarokItemInfo(ItemType.WEAPON, "Galactic Ragnarok", "", GadgetCoreAPI.LoadTexture2D("item/inventory/galacticRagnarok.png"), 20, new EquipStats(0, 0, 4, 0, 0, 0),
- HeldTex: GadgetCoreAPI.LoadTexture2D("item/hand/galacticRagnarok.png"));
- itemGalacticRagnarok.SetWeaponInfo(new float[] { 0, 0, 1, 0, 0, 0 }, GadgetCoreAPI.GetAttackSound(497));
- ItemRegistry.Singleton.Register(itemGalacticRagnarok, "galacticRagnarok");
- itemGalacticRagnarok.CreateProjectile("projectile/galacticRagnarokSmall.png", "projectile/galacticRagnarok.png");
- itemGalacticRagnarok.OnAttack += itemGalacticRagnarok.Attack;
- // Ringabolt
- var itemRingaboltsFury = new RingaboltsFuryItemInfo(ItemType.WEAPON, "Ringabolt's Fury", "", GadgetCoreAPI.LoadTexture2D("item/inventory/ringaboltsFury.png"), 20, new EquipStats(4, 5, 0, 0, 0, 0),
- HeldTex: GadgetCoreAPI.LoadTexture2D("item/hand/ringaboltsFury.png"));
- itemRingaboltsFury.SetWeaponInfo(new float[] { 0.5f, 0.5f, 0, 0, 0, 0 }, (AudioClip)Resources.Load("Au/excal"));
- ItemRegistry.Singleton.Register(itemRingaboltsFury, "ringaboltsFury");
- itemRingaboltsFury.CreateProjectile("projectile/ringaboltsFury.png");
- itemRingaboltsFury.OnAttack += itemRingaboltsFury.Attack;
- var itemRingaboltsVengeance = new RingaboltsVengeanceItemInfo(ItemType.WEAPON, "Ringabolt's Vengeance", "", GadgetCoreAPI.LoadTexture2D("item/inventory/ringaboltsVengeance.png"), 20, new EquipStats(0, 4, 0, 0, 0, 0),
- HeldTex: GadgetCoreAPI.LoadTexture2D("item/hand/ringaboltsVengeance.png"));
- itemRingaboltsVengeance.SetWeaponInfo(new float[] { 0, 5, 0, 0, 0, 0 }, (AudioClip)Resources.Load("Au/excal"));
- ItemRegistry.Singleton.Register(itemRingaboltsVengeance, "ringaboltsVengeance");
- itemRingaboltsVengeance.OnAttack += itemRingaboltsVengeance.Attack;
- var itemRingaboltsOath = new RingaboltsOathItemInfo(ItemType.WEAPON, "Ringabolt's Oath", "", GadgetCoreAPI.LoadTexture2D("item/inventory/ringaboltsOath.png"), 20, new EquipStats(0, 5, 0, 0, 0, 4),
- HeldTex: GadgetCoreAPI.LoadTexture2D("item/hand/ringaboltsOath.png"));
- itemRingaboltsOath.SetWeaponInfo(new float[] { 0, 1, 0, 0, 0, 0.5f }, (AudioClip)Resources.Load("Au/excal"));
- ItemRegistry.Singleton.Register(itemRingaboltsOath, "ringaboltsOath");
- itemRingaboltsOath.CreateProjectile("projectile/ringaboltsLightninin.png", "projectile/ringaboltsLightnininSpark.png");
- itemRingaboltsOath.OnAttack += itemRingaboltsOath.Attack;
- // Perceval
- var itemPercevalsPact = new PercevalsPactItemInfo(ItemType.WEAPON, "Perceval's Pact", "", GadgetCoreAPI.LoadTexture2D("item/inventory/percevalsPact.png"), 20, new EquipStats(0, 5, 0, 0, 0, 4),
- HeldTex: GadgetCoreAPI.LoadTexture2D("item/hand/percevalsPact.png"));
- itemPercevalsPact.SetWeaponInfo(new float[] { 0, 2, 0, 0, 0, 0.25f }, (AudioClip)Resources.Load("Au/excal"));
- ItemRegistry.Singleton.Register(itemPercevalsPact, "percevalsPact");
- itemPercevalsPact.CreateProjectile("projectile/percevalsPactSword.png", "projectile/percevalsPact.png");
- itemPercevalsPact.OnAttack += itemPercevalsPact.Attack;
- var itemPercevalsDiscipline = new PercevalsDisciplineItemInfo(ItemType.WEAPON, "Perceval's Discipline", "", GadgetCoreAPI.LoadTexture2D("item/inventory/percevalsDiscipline.png"), 20, new EquipStats(0, 0, 0, 0, 4, 3),
- HeldTex: GadgetCoreAPI.LoadTexture2D("item/hand/percevalsDiscipline.png"));
- itemPercevalsDiscipline.SetWeaponInfo(new float[] { 0, 0, 0, 0, 0.5f, 0.5f }, (AudioClip)Resources.Load("Au/excal"));
- ItemRegistry.Singleton.Register(itemPercevalsDiscipline, "percevalsDiscipline");
- itemPercevalsDiscipline.CreateProjectile("projectile/percevalsDisciplineSword.png", "projectile/percevalsDiscipline.png");
- itemPercevalsDiscipline.OnAttack += itemPercevalsDiscipline.Attack;
- var itemPercevalsVolley = new PercevalsVolleyItemInfo(ItemType.WEAPON, "Perceval's Volley", "", GadgetCoreAPI.LoadTexture2D("item/inventory/percevalsVolley.png"), 20, new EquipStats(0, 0, 0, 0, 0, 4),
- HeldTex: GadgetCoreAPI.LoadTexture2D("item/hand/percevalsVolley.png"));
- itemPercevalsVolley.SetWeaponInfo(new float[] { 0, 0, 0, 0, 0, 0.5f }, (AudioClip)Resources.Load("Au/excal"));
- ItemRegistry.Singleton.Register(itemPercevalsVolley, "percevalsVolley");
- itemPercevalsVolley.CreateProjectile("projectile/percevalsVolleySword.png", "projectile/percevalsVolley.png");
- itemPercevalsVolley.OnAttack += itemPercevalsVolley.Attack;
- // Wallace
- var itemWallacesBirthright = new WallacesBirthrightItemInfo(ItemType.WEAPON, "Wallace's Birthright", "", GadgetCoreAPI.LoadTexture2D("item/inventory/wallacesBirthright.png"), 20, new EquipStats(4, 0, 0, 0, 5, 5),
- HeldTex: GadgetCoreAPI.LoadTexture2D("item/hand/wallacesBirthright.png"));
- itemWallacesBirthright.SetWeaponInfo(new float[] { 1, 0, 0, 0, 0.5f, 0.5f }, (AudioClip)Resources.Load("Au/excal"));
- ItemRegistry.Singleton.Register(itemWallacesBirthright, "wallacesBirthright");
- itemWallacesBirthright.CreateProjectile("projectile/wallacesBirthright.png", "projectile/wallacesBirthrightSmall.png");
- itemWallacesBirthright.OnAttack += itemWallacesBirthright.Attack;
- var itemWallacesFealty = new WallacesFealtyItemInfo(ItemType.WEAPON, "Wallace's Fealty", "", GadgetCoreAPI.LoadTexture2D("item/inventory/wallacesFealty.png"), 20, new EquipStats(3, 3, 0, 0, 0, 1),
- HeldTex: GadgetCoreAPI.LoadTexture2D("item/hand/wallacesFealty.png"));
- itemWallacesFealty.SetWeaponInfo(new float[] { 4, 1, 0, 0, 0, 0.5f }, (AudioClip)Resources.Load("Au/excal"));
- ItemRegistry.Singleton.Register(itemWallacesFealty, "wallacesFealty");
- itemWallacesFealty.OnAttack += itemWallacesFealty.Attack;
- var itemWallacesEndurance = new WallacesEnduranceItemInfo(ItemType.WEAPON, "Wallace's Endurance", "", GadgetCoreAPI.LoadTexture2D("item/inventory/wallacesEndurance.png"), 20, new EquipStats(5, 0, 0, 0, 0, 0),
- HeldTex: GadgetCoreAPI.LoadTexture2D("item/hand/wallacesEndurance.png"));
- itemWallacesEndurance.SetWeaponInfo(new float[] { 2, 0, 0, 0, 0, 0 }, (AudioClip)Resources.Load("Au/excal"));
- ItemRegistry.Singleton.Register(itemWallacesEndurance, "wallacesEndurance");
- itemWallacesEndurance.CreateProjectile("projectile/wallacesEndurance.png");
- itemWallacesEndurance.OnAttack += itemWallacesEndurance.Attack;
- // --
- // Other Item stuff
- // --
- GadgetCoreAPI.AddUltimateForgeRecipe(new Tuple<int, int>(497, 89), itemGalacticSilence.GetID());
- GadgetCoreAPI.AddUltimateForgeRecipe(new Tuple<int, int>(497, 90), itemGalacticDarkfire.GetID());
- GadgetCoreAPI.AddUltimateForgeRecipe(new Tuple<int, int>(497, 91), itemGalacticRagnarok.GetID());
- GadgetCoreAPI.AddUltimateForgeRecipe(new Tuple<int, int>(346, 89), itemRingaboltsOath.GetID());
- GadgetCoreAPI.AddUltimateForgeRecipe(new Tuple<int, int>(346, 90), itemRingaboltsVengeance.GetID());
- GadgetCoreAPI.AddUltimateForgeRecipe(new Tuple<int, int>(346, 91), itemRingaboltsFury.GetID());
- GadgetCoreAPI.AddUltimateForgeRecipe(new Tuple<int, int>(597, 89), itemPercevalsDiscipline.GetID());
- GadgetCoreAPI.AddUltimateForgeRecipe(new Tuple<int, int>(597, 90), itemPercevalsPact.GetID());
- GadgetCoreAPI.AddUltimateForgeRecipe(new Tuple<int, int>(597, 91), itemPercevalsVolley.GetID());
- GadgetCoreAPI.AddUltimateForgeRecipe(new Tuple<int, int>(397, 89), itemWallacesFealty.GetID());
- GadgetCoreAPI.AddUltimateForgeRecipe(new Tuple<int, int>(397, 90), itemWallacesBirthright.GetID());
- GadgetCoreAPI.AddUltimateForgeRecipe(new Tuple<int, int>(397, 91), itemWallacesEndurance.GetID());
- var recipePage = new RecipePage(RecipePageType.UltimateForge, "Ultimate NPC Weapons", GadgetCoreAPI.LoadTexture2D("gui/recipesNPC.png")).Register();
- recipePage.AddRecipePageEntry(new RecipePageEntry(itemGalacticSilence.GetID(), itemGalacticDarkfire.GetID(), itemGalacticRagnarok.GetID(), 497));
- recipePage.AddRecipePageEntry(new RecipePageEntry(itemRingaboltsOath.GetID(), itemRingaboltsVengeance.GetID(), itemRingaboltsFury.GetID(), 346));
- recipePage.AddRecipePageEntry(new RecipePageEntry(itemPercevalsDiscipline.GetID(), itemPercevalsPact.GetID(), itemPercevalsVolley.GetID(), 597));
- recipePage.AddRecipePageEntry(new RecipePageEntry(itemWallacesFealty.GetID(), itemWallacesBirthright.GetID(), itemWallacesEndurance.GetID(), 397));
- }
- }
- }
|