diff --git a/Items/Critters/BabyCannonballJellyfishItem.cs b/Items/Critters/BabyCannonballJellyfishItem.cs new file mode 100644 index 0000000000..511727fc22 --- /dev/null +++ b/Items/Critters/BabyCannonballJellyfishItem.cs @@ -0,0 +1,33 @@ +using CalamityMod.NPCs.Abyss; +using Terraria; +using Terraria.ModLoader; +using Terraria.ID; + +namespace CalamityMod.Items.Critters +{ + public class BabyCannonballJellyfishItem : ModItem, ILocalizedModType + { + public new string LocalizationCategory => "Items.Misc"; + public override void SetStaticDefaults() + { + Item.ResearchUnlockCount = 5; + } + //Intentionally NOT bait due to bestiary entry on them being used as ammunition, although dynamite fishing in terraria does sound pretty fun + public override void SetDefaults() + { + Item.useStyle = ItemUseStyleID.Swing; + Item.autoReuse = true; + Item.useTurn = true; + Item.useAnimation = 15; + Item.useTime = 10; + Item.maxStack = 9999; + Item.consumable = true; + Item.noUseGraphic = true; + Item.value = Item.buyPrice(0, 0, 30, 0); + Item.width = 26; + Item.height = 24; + Item.makeNPC = (short)ModContent.NPCType(); + Item.rare = ItemRarityID.Green; + } + } +} diff --git a/Items/Critters/BabyCannonballJellyfishItem.png b/Items/Critters/BabyCannonballJellyfishItem.png new file mode 100644 index 0000000000..7fc4c1bfe6 Binary files /dev/null and b/Items/Critters/BabyCannonballJellyfishItem.png differ diff --git a/Items/Placeables/Furniture/BabyCannonballJellyfishBowl.cs b/Items/Placeables/Furniture/BabyCannonballJellyfishBowl.cs new file mode 100644 index 0000000000..e980a584f0 --- /dev/null +++ b/Items/Placeables/Furniture/BabyCannonballJellyfishBowl.cs @@ -0,0 +1,30 @@ +using CalamityMod.Tiles.Furniture; +using CalamityMod.Items.Critters; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Items.Placeables.Furniture +{ + public class BabyCannonballJellyfishBowl : ModItem, ILocalizedModType + { + public new string LocalizationCategory => "Items.Placeables"; + public override void SetDefaults() + { + Item.width = 34; + Item.height = 32; + Item.maxStack = 9999; + Item.useTurn = true; + Item.autoReuse = true; + Item.useAnimation = 15; + Item.useTime = 10; + Item.useStyle = ItemUseStyleID.Swing; + Item.consumable = true; + Item.createTile = ModContent.TileType(); + } + + public override void AddRecipes() + { + CreateRecipe(1).AddIngredient(ModContent.ItemType()).AddIngredient(ItemID.BottledWater).Register(); + } + } +} diff --git a/Items/Placeables/Furniture/BabyCannonballJellyfishBowl.png b/Items/Placeables/Furniture/BabyCannonballJellyfishBowl.png new file mode 100644 index 0000000000..0d0376c841 Binary files /dev/null and b/Items/Placeables/Furniture/BabyCannonballJellyfishBowl.png differ diff --git a/Items/Placeables/Furniture/BabyGhostBellJar.cs b/Items/Placeables/Furniture/BabyGhostBellJar.cs index 641b111c48..d5984cb99b 100644 --- a/Items/Placeables/Furniture/BabyGhostBellJar.cs +++ b/Items/Placeables/Furniture/BabyGhostBellJar.cs @@ -24,7 +24,7 @@ namespace CalamityMod.Items.Placeables.Furniture public override void AddRecipes() { - CreateRecipe(1).AddIngredient(ModContent.ItemType()).AddIngredient(ItemID.Bottle).Register(); + CreateRecipe(1).AddIngredient(ModContent.ItemType()).AddIngredient(ItemID.BottledWater).Register(); } } } diff --git a/Localization/en-US/Mods.CalamityMod.Items.Misc.hjson b/Localization/en-US/Mods.CalamityMod.Items.Misc.hjson index db8b94aaad..5291f16c9e 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Misc.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Misc.hjson @@ -8,6 +8,11 @@ AndroombaItem: { ''' } +BabyCannonballJellyfishItem: { + DisplayName: "{$Mods.CalamityMod.NPCs.BabyCannonballJellyfish.DisplayName}" + Tooltip: "" +} + BabyFlakCrabItem: { DisplayName: "{$Mods.CalamityMod.NPCs.BabyFlakCrab.DisplayName}" Tooltip: "" diff --git a/Localization/en-US/Mods.CalamityMod.Items.Placeables.hjson b/Localization/en-US/Mods.CalamityMod.Items.Placeables.hjson index 69733b961d..992be9eeec 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Placeables.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Placeables.hjson @@ -910,6 +910,11 @@ AuricToilet: { ''' } +BabyCannonballJellyfishBowl: { + DisplayName: Baby Cannonball Jellyfish Bowl + Tooltip: "" +} + BabyFlakCrabCage: { DisplayName: Baby Flak Crab Cage Tooltip: "" diff --git a/NPCs/Abyss/BabyCannonballJellyfish.cs b/NPCs/Abyss/BabyCannonballJellyfish.cs index 4f1f4e30f8..e63b7ff216 100644 --- a/NPCs/Abyss/BabyCannonballJellyfish.cs +++ b/NPCs/Abyss/BabyCannonballJellyfish.cs @@ -3,6 +3,7 @@ using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using System.IO; using System.Linq; +using CalamityMod.Items.Critters; using CalamityMod.Items.Placeables.Banners; using Terraria; using Terraria.GameContent; @@ -44,7 +45,7 @@ namespace CalamityMod.NPCs.Abyss NPC.DeathSound = SoundID.NPCDeath28; Banner = NPC.type; BannerItem = ModContent.ItemType(); - //NPC.catchItem = (short)ModContent.ItemType(); + NPC.catchItem = (short)ModContent.ItemType(); NPC.Calamity().VulnerableToHeat = false; NPC.Calamity().VulnerableToSickness = false; NPC.Calamity().VulnerableToElectricity = true; diff --git a/Tiles/Furniture/BabyCannonballJellyfishBowlTile.cs b/Tiles/Furniture/BabyCannonballJellyfishBowlTile.cs new file mode 100644 index 0000000000..8cd09a2165 --- /dev/null +++ b/Tiles/Furniture/BabyCannonballJellyfishBowlTile.cs @@ -0,0 +1,63 @@ +using CalamityMod.Items.Placeables.Furniture; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +using Terraria.ObjectData; + +namespace CalamityMod.Tiles.Furniture +{ + public class BabyCannonballJellyfishBowlTile : ModTile + { + public override void SetStaticDefaults() + { + Main.tileLighted[Type] = true; + Main.tileFrameImportant[Type] = true; + Main.tileLavaDeath[Type] = true; + TileObjectData.newTile.CopyFrom(TileObjectData.Style2x2); + TileObjectData.addTile(Type); + AnimationFrameHeight = 36; + AddMapEntry(new Color(64, 224, 208), CalamityUtils.GetItemName()); + AddToArray(ref TileID.Sets.RoomNeeds.CountsAsTorch); + } + + public override bool CreateDust(int i, int j, ref int type) + { + Dust.NewDust(new Vector2(i, j) * 16f, 16, 16, 13, 0f, 0f, 0, new Color(), 1f); + return false; + } + + public override void NumDust(int i, int j, bool fail, ref int num) + { + num = fail ? 1 : 3; + } + + public override void AnimateTile(ref int frame, ref int frameCounter) + { + int frameAmt = 8; + int timeNeeded = 10; + frameCounter++; + if (frameCounter >= timeNeeded) + { + frame++; + frameCounter = 0; + } + if (frame >= frameAmt) + { + frame = 0; + } + } + + public override void AnimateIndividualTile(int type, int i, int j, ref int frameXOffset, ref int frameYOffset) + { + frameYOffset = this.GetAnimationOffset(i, j, 8, 18, 18, 2, 2, AnimationFrameHeight); + } + + public override void ModifyLight(int i, int j, ref float r, ref float g, ref float b) + { + r = 0.26f; + g = 0.85f; + b = 0.65f; + } + } +} diff --git a/Tiles/Furniture/BabyCannonballJellyfishBowlTile.png b/Tiles/Furniture/BabyCannonballJellyfishBowlTile.png new file mode 100644 index 0000000000..aa6c53127b Binary files /dev/null and b/Tiles/Furniture/BabyCannonballJellyfishBowlTile.png differ