From 782e6a65825f782ee99556a6909ddffbe94831e2 Mon Sep 17 00:00:00 2001 From: FyloZ Date: Thu, 9 Jul 2020 17:08:49 -0400 Subject: [PATCH] Fixed tiles dropped a lot of items. Updated enchanted anvil. --- Content/Items/Misc/Souls/SoulofLife.cs | 1 + Content/Items/Placeable/EnchantedAnvil.cs | 21 ++++++----- Content/Items/Placeable/EnchantedAnvil.png | Bin 366 -> 402 bytes .../ShrineoftheMoltenOne/ShrineAltar.cs | 2 - .../ShrineoftheMoltenOne/ShrineAltar.png | Bin 3165 -> 984 bytes Content/Tiles/EnchantedAnvil.cs | 35 ++++++------------ Content/Tiles/EnchantedAnvil.png | Bin 501 -> 564 bytes Content/Tiles/TitanForge.cs | 2 + Lib/Tiles/DecimationFramedTile.cs | 1 + Lib/Tiles/DecimationMultiTile.cs | 6 ++- Lib/Tiles/DecimationTile.cs | 1 - 11 files changed, 31 insertions(+), 38 deletions(-) diff --git a/Content/Items/Misc/Souls/SoulofLife.cs b/Content/Items/Misc/Souls/SoulofLife.cs index 0eb7875..6fb6d29 100644 --- a/Content/Items/Misc/Souls/SoulofLife.cs +++ b/Content/Items/Misc/Souls/SoulofLife.cs @@ -21,6 +21,7 @@ namespace Decimation.Content.Items.Misc.Souls item.height = refItem.height; item.width = 20; item.height = 20; + item.value = Item.buyPrice(silver: 2); this.item.maxStack = 999; diff --git a/Content/Items/Placeable/EnchantedAnvil.cs b/Content/Items/Placeable/EnchantedAnvil.cs index 46bc170..8ae412f 100644 --- a/Content/Items/Placeable/EnchantedAnvil.cs +++ b/Content/Items/Placeable/EnchantedAnvil.cs @@ -3,6 +3,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; using Decimation.Lib.Items; +using Decimation.Lib.Util.Builder; namespace Decimation.Content.Items.Placeable { @@ -13,22 +14,22 @@ namespace Decimation.Content.Items.Placeable protected override void InitPlaceable() { - item.width = 20; + item.width = 44; item.height = 20; item.maxStack = 1; + item.value = Item.buyPrice(gold: 1); } protected override ModRecipe GetRecipe() { - ModRecipe recipe = GetNewModRecipe(this, 1, TileID.AdamantiteForge, true); - - recipe.AddIngredient(ItemID.MythrilAnvil, 1); - recipe.AddIngredient(ItemID.IronAnvil, 1); - recipe.AddIngredient(ModContent.ItemType(), 5); - recipe.AddIngredient(ItemID.SoulofNight, 5); - recipe.AddIngredient(ItemID.SoulofMight, 5); - - return recipe; + return new RecipeBuilder(this) + .AnyIronBar(true) + .WithIngredient(ItemID.MythrilAnvil) + .WithIngredient(ItemID.IronAnvil) + .WithIngredient(ItemID.SoulofNight, 5) + .WithIngredient(ModContent.ItemType(), 5) + .WithStation(TileID.AdamantiteForge) + .Build(); } } } diff --git a/Content/Items/Placeable/EnchantedAnvil.png b/Content/Items/Placeable/EnchantedAnvil.png index 982e462671113d871c1598449e03c6d5c899e70a..798d5e4504796caa052a19828acda7a9d6bd2c10 100644 GIT binary patch literal 402 zcmV;D0d4+?P)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D0VhdBK~zXfV`Lxz zBDtCVLz#mDFhS`d0~lpw<*|mK?YqZdx?zqhn7(@PI+%t5ZGBBJE$wIprl0OV2Bu+r zQUOdq44~V$dh!!6J#<6ZEj$)1py_4_reR>mlx0vBeju-=2xXxHbo0=`^pqkP0b+ZXgX!g8|AF({&Alj~`~Uy|07*qoM6N<$g66xNWB>pF literal 366 zcmV-!0g?WRP)PFv|Z zn7L?vD?})~3n>^Mmiy2{?D)PdU?umTd;`-yb`QZc%;zxuTlbuTF~Rhs=YLW7u#kZX z4!RIxfw>Guqq~@a0a7l(P1;Dp2V`7eero8r7W$ z9?XZZGy{`CFMqZil7~rwX;@l=J?EnA( M07*qoM6N<$g61WY2LJ#7 diff --git a/Content/Items/Placeable/ShrineoftheMoltenOne/ShrineAltar.cs b/Content/Items/Placeable/ShrineoftheMoltenOne/ShrineAltar.cs index 0dacbf9..4ae90dc 100644 --- a/Content/Items/Placeable/ShrineoftheMoltenOne/ShrineAltar.cs +++ b/Content/Items/Placeable/ShrineoftheMoltenOne/ShrineAltar.cs @@ -1,6 +1,5 @@ using Decimation.Lib.Items; using Decimation.Lib.Util; -using Terraria.DataStructures; using Terraria.ModLoader; namespace Decimation.Content.Items.Placeable.ShrineoftheMoltenOne @@ -9,7 +8,6 @@ namespace Decimation.Content.Items.Placeable.ShrineoftheMoltenOne { protected override string ItemName => "Shrine Altar"; protected override int Tile => ModContent.TileType(); - protected override DrawAnimation Animation => new DrawAnimationVertical(5, 6); protected override void InitPlaceable() { diff --git a/Content/Items/Placeable/ShrineoftheMoltenOne/ShrineAltar.png b/Content/Items/Placeable/ShrineoftheMoltenOne/ShrineAltar.png index c2397d53433e3ac8871ff5e917ada2d0641f0ea1..0c2e7b8a76f24535b17440770dcc1e5c0ff1a9a7 100644 GIT binary patch delta 975 zcmV;=12FvE7}y7p7k?@U1^@s63hn)v000A?NklWy z3_(Q6N#4x2vhViY%x=6rE;rlk?Yx<{GvE8oo0&bYrA}9_|9?Qa+N-nUFT8qmtu8NJ z8mJRQhZ{ol?fgR}n=-!xAk5}h)APjpRdi39l*9>ff-o|Uo%|V04ZYjLQ^n**Dj$2W zHc?U%BLrkLtstcf`)CzGECydD%0tvX-JJy)}HV-PMV?MwYCrCDXDlo=e?w)#HE-CP;R}VbK-l6IM#_g{) zA#q<|B&Fd5L5H>SJv|vJ>F(Y|_vMlz<&MawTt-Hr@PCe6Pfg_`k!&WU=>(CICWJta zV1&RdlEVE)%rzC{Nd5#e(7u8Y!+55=A<;W%6=to2w;MeyP zl@uMY3P0MvZ9mXY(>R?VS}6qVUs7dru~_^Tr3b*pl0?HzRQ-=T5`zaHnGQ4w+r?8p^IGlxRkjek(N zJCH90kL4?^YOr4Qbni>o){0cM#A&4xDclLMDPyU}TR+%#| zr>*=9x2>Ui7fZ$P4o4&ltoD}K3C{K(K xCy41|v?;`vb69kf(EB6j5YxCtdxHq_7q=7uV9I)QYXATM07*qoM6N<$f&hMe#zO!A literal 3165 zcmV-j45IUiP)AC9f$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g zrp#otF`0V{2vft9%!G&m5&$tJb2&432APuCVlw+55j7<=r(rvbuv*~ zW-*zGLPG__VlvY}j}{OMK`bxAuP0k70Ay738=!fh#;Ehh8ap&aJ@1B8wlOv!A3 zcm#rtSvn>2^gq5MTKtgFD4BZ$h%$wEc}`U_qkMJ@0f~1=K)et<m z43GdwrVH71IS&zg-H}>X7E#frbT(y14@k0b7b6PB2oi7jVB3n~-5Nti4~S?iB^v=o z#0q!?!ER-hqU5@)XnP993=joLQOO*RFgc(~K@v{&^Eu97YzT+a!F~4!5EJgk`A}1X zJerbOurZ>Nnc}v?X4KWIq8nL+JjD&5??Y+^eP&$x4+uGknu^KXxId&Z;co0kgmkK+ zJ~gtw!A_p=}$IcdQlrt=o`_74r@9 z8&$mrgb$=*mBAV?NawdBD!&I)Q)nE`5CepVb~M6W&6<(NZ1~b{%~z=ich{_0>md8` z%cCB;B?>|O&_gq>`3o1$=Y}}btEPq^7Kt)eKv)k7fHXZS1KBqvGwWwFC9?tIV@Vf; zyO@g@c^1`aieyR240T{;Ya)#~`h$MNDw(ALW|bn_J_Cdn15vokOpzFa>k@O?Rx(RW zK))p2YGG9j1q={6;#7sZ5>qe&(2nD61&J|D33nw%fT3ChUWpm#w*f-NJ^JBJV+u0{ z-2F{Fb0V5w9A*J;MK>z_{?YB`@G-q>^Yb#x^Q56(Vd7ElX?5YkLJo3 z-h<)VyV8e@7Z8Clyw6y;;(k_l>ZVnz-RI0*TT7Yn$-HOKxfk>4>q7kYC#LfZKqW_i zI`01c^U_7nycOOI7T&muWCV9kH>wh`P01XPF(orm!~n@N1G3EXreroHbAGOvlDXV= zn35T|Xx{ln_nrUq#%uYMWxi_h*dS8z`;d_U@*lLIMmwr`5>EgC002ovPDHLkV1fVu Dh8X5P diff --git a/Content/Tiles/EnchantedAnvil.cs b/Content/Tiles/EnchantedAnvil.cs index 380112c..484fce8 100644 --- a/Content/Tiles/EnchantedAnvil.cs +++ b/Content/Tiles/EnchantedAnvil.cs @@ -1,41 +1,30 @@ using Decimation.Content.Buffs.Buffs; +using Decimation.Lib.Tiles; using Microsoft.Xna.Framework; using Terraria; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; using Terraria.ObjectData; namespace Decimation.Content.Tiles { - public class EnchantedAnvil : ModTile + public class EnchantedAnvil : DecimationMultiTile { + public override Color MapColor => new Color(108, 239, 64); + public override int TileItem => ModContent.ItemType(); + public override TileObjectData Style => TileObjectData.Style3x2; + public override string Name => "Enchanted Anvil"; + public override int DustType => DustID.Iron; + public override bool HasLight => true; + public override Point16 Origin => new Point16(1, 1); + public override bool Table => true; - public override void SetDefaults() + protected override void InitMultiTile() { - Main.tileSolidTop[Type] = true; - Main.tileFrameImportant[Type] = true; - Main.tileNoAttach[Type] = false; - TileObjectData.newTile.CopyFrom(TileObjectData.Style3x2); - TileObjectData.newTile.CoordinateHeights = new int[] { 16, 16 }; - TileObjectData.addTile(Type); - ModTranslation name = CreateMapEntryName(); - name.SetDefault("Enchanted Anvil"); - AddMapEntry(new Color(108, 239, 64), name); - dustType = DustID.Iron; - disableSmartCursor = true; adjTiles = new int[] { TileID.Anvils, TileID.MythrilAnvil }; } - public override void NumDust(int i, int j, bool fail, ref int num) - { - num = fail ? 1 : 3; - } - - public override void KillMultiTile(int i, int j, int frameX, int frameY) - { - Item.NewItem(i * 16, j * 16, 48, 32, ModContent.ItemType()); - } - public override void NearbyEffects(int i, int j, bool closer) { if (closer) diff --git a/Content/Tiles/EnchantedAnvil.png b/Content/Tiles/EnchantedAnvil.png index 12a7f7277c1022f879eeedaacfc735601ddd69a4..95be29080bc76e0cced255d406518a685d6e3395 100644 GIT binary patch delta 540 zcmV+%0^|Ml1GEH?BYyw^b5ch_0Itp)=>Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi z!vFvd!vV){sAK>D0m(^3K~z{r?U*r00$~`2H6aR`TcWZd!>z`mhOmSnf~Lr5v7sS{ zTGAzmT5Jl+ws5qep(Q9H2_kBYhOl(Vw8okOE07CbeFHx{?teO4PXA|l?w8{`eqa92 z&vR;;=BS0w$TteKM4O%Xz#{)$rwOY%L~YD&sEyeTwK2P)HfA@}#_WdaSuxP&s(NEQ zRDgrAR@f@F)=7L6F=N*KtoWN)XP3KbA|vm4czu5yzQ0SsWJ1fpx&A4*V{{09y|{+C zHo~Jg`jE2qq!x zNc0ktsKkumH^ldWOqj{Z?kLX;laO_+q7pMgFR`7uQeFS@0!%pj`BoobmDnG#oEVca z+ZBz@nyh2C3rbXC64~|S7<1McYn1F z8ub{iWHuUO1TrAC186iUjwVGi%ly%#NMv3e&10i^Y&4Idh5+3Qj|fj@a3goc_P<#3 zBeflbtF1`L9k5`6xd&(A0W&Bw))K5|`r_kY8r_4m_87757=Jk)gM~Pmd4AApV;r^~ z!xiMPv^}L>0IY;hp%hHVC03(onXmT^%ul?;MN#bGGH22JR7W^E%0S zY}k1W76Ry{lD5)ylosH z;$E=O*FY(hn14LJZwr`z{|O`y`q(`L)36wTnX`4zDKN89^fQ>Qf6WV~A3gtz5*fG} z2xQ0Du=f~x$iVU*dT9oWNmxw5^hL#mftkw|tpd}EGLTXf)}lc-hu9dRIL1bd$6y{s zZz~ciMPYdlz3oZuHYe44(8JDS=q(ReUbA%a0Y@&bdQ}M)^RPTN=!Uq5jmOYS#Z&su zDCG-!{k7$gJc>N5RD`Jue+%jF!2)Q|l#0XFW7KZl51JSobRHYF9nInDF#z?EK%2Dj Sp 8; public override int? AnimationFrameHeight => 54; public override int TileItem => ModContent.ItemType(); + public override Point16 Origin => new Point16(1, 1); } } \ No newline at end of file diff --git a/Lib/Tiles/DecimationFramedTile.cs b/Lib/Tiles/DecimationFramedTile.cs index 6bac416..26fa995 100644 --- a/Lib/Tiles/DecimationFramedTile.cs +++ b/Lib/Tiles/DecimationFramedTile.cs @@ -12,6 +12,7 @@ namespace Decimation.Lib.Tiles protected sealed override void InitTile() { Main.tileMergeDirt[Type] = MergeDirt; + drop = TileItem; InitFramedTile(); } diff --git a/Lib/Tiles/DecimationMultiTile.cs b/Lib/Tiles/DecimationMultiTile.cs index d965112..a7eb097 100644 --- a/Lib/Tiles/DecimationMultiTile.cs +++ b/Lib/Tiles/DecimationMultiTile.cs @@ -1,3 +1,4 @@ +using System; using Terraria; using Terraria.DataStructures; using Terraria.Enums; @@ -51,15 +52,16 @@ namespace Decimation.Lib.Tiles // { // AnimationFrameHeight = (16 + TileObjectData.newTile.CoordinatePadding) * TileObjectData.newTile.Height; // } + + InitMultiTile(); _width = TileObjectData.newTile.Width * 16; _height = TileObjectData.newTile.Height * 16; } - - public override void KillMultiTile(int i, int j, int frameX, int frameY) { + Main.NewText(1); Item.NewItem(i * 16, j * 16, _width, _height, TileItem); } diff --git a/Lib/Tiles/DecimationTile.cs b/Lib/Tiles/DecimationTile.cs index d9f95d8..fd1c1a9 100644 --- a/Lib/Tiles/DecimationTile.cs +++ b/Lib/Tiles/DecimationTile.cs @@ -31,7 +31,6 @@ namespace Decimation.Lib.Tiles minPick = MinimumPickaxePower; mineResist = MineResistance; dustType = DustType; - drop = TileItem; disableSmartCursor = DisableSmartCursor; if (Name == null)