From 57423952bfbb37fdc4c01b7bec15ea49b828a5ae Mon Sep 17 00:00:00 2001 From: FyloZ Date: Thu, 9 Jul 2020 15:47:54 -0400 Subject: [PATCH] Fixed items were always consumed. Added possibility to add light to tiles. Updated Shrine Altar's sprite. --- Content/Buffs/Debuffs/Hyperthermic.cs | 18 +++--- Content/Buffs/Debuffs/Singed.cs | 2 +- Content/Buffs/Debuffs/Slimed.cs | 2 +- Content/DecimationPlayer.cs | 1 + Content/Items/CursedItem.cs | 14 ++--- .../ShrineoftheMoltenOne/ShrineAltar.cs | 9 ++- .../ShrineoftheMoltenOne/ShrineAltar.png | Bin 666 -> 3165 bytes Content/Synergies/FireAmuletSynergy.cs | 2 +- .../Tiles/ShrineoftheMoltenOne/ShrineAltar.cs | 55 +++++++++--------- .../ShrineoftheMoltenOne/ShrineAltar.png | Bin 1068 -> 3018 bytes Content/Tiles/TitanForge.cs | 2 +- Lib/Items/DecimationPlaceableItem.cs | 1 - Lib/Tiles/DecimationMultiTile.cs | 9 +++ Lib/Tiles/DecimationTile.cs | 11 +++- 14 files changed, 72 insertions(+), 54 deletions(-) diff --git a/Content/Buffs/Debuffs/Hyperthermic.cs b/Content/Buffs/Debuffs/Hyperthermic.cs index 9bc07e8..ffc7b3d 100644 --- a/Content/Buffs/Debuffs/Hyperthermic.cs +++ b/Content/Buffs/Debuffs/Hyperthermic.cs @@ -1,7 +1,5 @@ -using System; -using Decimation.Lib.Buffs; +using Decimation.Lib.Buffs; using Terraria; -using Terraria.ID; using Terraria.ModLoader; namespace Decimation.Content.Buffs.Debuffs @@ -9,7 +7,10 @@ namespace Decimation.Content.Buffs.Debuffs internal class Hyperthermic : DecimationBuff { protected override string DisplayName => "Hyperthermic!"; - protected override string Description => "Water, water everywhere but not a drop to drink... \nBlock mana potions use \nLowers defense by 10% \nLowers speed by 5%"; + + protected override string Description => + "Water, water everywhere but not a drop to drink... \nBlock mana potions use \nLowers defense by 10% \nLowers speed by 5%"; + public override bool Debuff => true; protected override void Init() @@ -21,13 +22,13 @@ namespace Decimation.Content.Buffs.Debuffs public override void Update(Player player, ref int buffIndex) { - player.statDefense = (int)(player.statDefense * 0.90f); + player.statDefense = (int) (player.statDefense * 0.90f); player.moveSpeed *= 0.95f; } public override void Update(NPC npc, ref int buffIndex) { - npc.defense = (int)(npc.defense * 0.90f); + npc.defense = (int) (npc.defense * 0.90f); npc.velocity *= 0.95f; } } @@ -36,7 +37,8 @@ namespace Decimation.Content.Buffs.Debuffs { public override bool CanUseItem(Item item, Player player) { - return !(player.HasBuff(ModContent.BuffType()) && item.healMana > 0); + if (player.HasBuff(ModContent.BuffType()) && item.healMana > 0) return false; + return base.CanUseItem(item, player); } } -} +} \ No newline at end of file diff --git a/Content/Buffs/Debuffs/Singed.cs b/Content/Buffs/Debuffs/Singed.cs index c95c688..da33b9d 100644 --- a/Content/Buffs/Debuffs/Singed.cs +++ b/Content/Buffs/Debuffs/Singed.cs @@ -41,7 +41,7 @@ namespace Decimation.Content.Buffs.Debuffs { return !(item.UseSound != null && item.useStyle == 2); } - return true; + return base.CanUseItem(item, player); } } } \ No newline at end of file diff --git a/Content/Buffs/Debuffs/Slimed.cs b/Content/Buffs/Debuffs/Slimed.cs index ac13dcd..87a0cee 100644 --- a/Content/Buffs/Debuffs/Slimed.cs +++ b/Content/Buffs/Debuffs/Slimed.cs @@ -42,7 +42,7 @@ namespace Decimation.Content.Buffs.Debuffs { return !(item.UseSound != null && item.useStyle == 2); } - return true; + return base.CanUseItem(item, player); } } } \ No newline at end of file diff --git a/Content/DecimationPlayer.cs b/Content/DecimationPlayer.cs index 18f524a..bd60bcb 100644 --- a/Content/DecimationPlayer.cs +++ b/Content/DecimationPlayer.cs @@ -865,6 +865,7 @@ namespace Decimation.Content DecimationPlayer modPlayer = player.GetModPlayer(); if (item.type == ItemID.CobaltShield || item.type == ItemID.AnkhShield || item.type == ItemID.PaladinsShield || item.type == ItemID.ObsidianShield) modPlayer.HasShield = true; + base.UpdateAccessory(item, player, hideVisual); } } } \ No newline at end of file diff --git a/Content/Items/CursedItem.cs b/Content/Items/CursedItem.cs index ebb1baf..11a2d02 100644 --- a/Content/Items/CursedItem.cs +++ b/Content/Items/CursedItem.cs @@ -142,14 +142,17 @@ namespace Decimation.Content.Items CursedNPC.DamageBonus = 7; } } + + base.UpdateAccessory(item, player, hideVisual); } public override bool CanEquipAccessory(Item item, Player player, int slot) { // Maximize to one cursed item at once DecimationPlayer modPlayer = player.GetModPlayer(); - return !modPlayer.hasCursedAccessory || - modPlayer.hasCursedAccessory && !item.GetGlobalItem().Cursed; + if (!modPlayer.hasCursedAccessory || + modPlayer.hasCursedAccessory && !item.GetGlobalItem().Cursed) return true; + return base.CanEquipAccessory(item, player, slot); } public override void NetSend(Item item, BinaryWriter writer) @@ -272,12 +275,7 @@ namespace Decimation.Content.Items } } - return false; - } - - public override bool ConsumeItem(Item item, Player player) - { - return true; + return base.UseItem(item, player); } } } \ No newline at end of file diff --git a/Content/Items/Placeable/ShrineoftheMoltenOne/ShrineAltar.cs b/Content/Items/Placeable/ShrineoftheMoltenOne/ShrineAltar.cs index 2467fd7..0dacbf9 100644 --- a/Content/Items/Placeable/ShrineoftheMoltenOne/ShrineAltar.cs +++ b/Content/Items/Placeable/ShrineoftheMoltenOne/ShrineAltar.cs @@ -1,4 +1,6 @@ using Decimation.Lib.Items; +using Decimation.Lib.Util; +using Terraria.DataStructures; using Terraria.ModLoader; namespace Decimation.Content.Items.Placeable.ShrineoftheMoltenOne @@ -7,11 +9,14 @@ 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() { - item.width = 66; - item.height = 32; + item.width = 68; + item.height = 42; + item.maxStack = 1; + item.rare = Rarity.Red.GetRarityValue(); } } } \ No newline at end of file diff --git a/Content/Items/Placeable/ShrineoftheMoltenOne/ShrineAltar.png b/Content/Items/Placeable/Shrineofthe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0%iS)P)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D02y>eSaefwW^{L9 za%BK;VQFr3E^cLXAT%y8E;2FkAZe8V00Ih0L_t(&L+zH$O~XJCg(J?KbI1iH*YrRY z=_UsXpaHJ*KsQtZ2pQR#FWJ28Xx3gQSdpLfNqFb~2_Y6u(_B!Z)oRtG*mJS89xPm} z+WMnrBL<3r`~AKnT7bCHe7_v{c{^a=x!e|OcOl}X`;4Z(gNZAXH6m(2ysrV|e?C8T ze7!z)>~_13-;ak5zKN4RbY5w`eV$ZWICQbe8^J@=fOi&-^4^!rGpO?nQ3H6_KG9t2 zqP&ZH-GGSq(m{Fvb(1%uw83_}?a+MC0l*>D>A{`>+Q;ip9sBWa>mQ~0$2>P6;{EQ8 zC_Ruo%?IyY`>8SB;c1VSXfE_Nj2{S)$UEG<5r_v8(jhInIC-T|=Pd}tYv<^`Kpyk# z{F4Z1Lx_yntk-8~oVr>gO6OD?(RTpxbh)(Ns{=h8#+pMMsJogG9$p>vHNvB`E;IrS zHN?YP3BF@2Bn`p(Ji-eTvKE7zo@c0sN8zV*HD zoZRj$c3!<`$l!?ds1%Kt=0}Wvu&3DwlNym*I>$!-_-eg=Ykmavvk_K586!9V$gf5F z>fC=bLKgvDnEYC_Z*F!A`L^!(VnFnpKpt3mwY0Bi$kl%{XgnKXjnxP>z|yZS=BXjG z5w|wN!_sc9+%74WHlA`rQY`J}%I%V3X@M4tKiVq*!WqJSc>n+a07*qoM6N<$g6*v^ A8vp new Color(33, 28, 25); + public override int TileItem => ModContent.ItemType(); + public override TileObjectData Style => TileObjectData.Style5x4; + public override int? Height => 3; + public override Point16 Origin => new Point16(2, 1); + public override string Name => "Shrine Altar"; + public override int DustType => DustID.LavaMoss; + public override int? AnimationFrameCount => 6; + public override int? AnimationFrameHeight => 54; + public override bool HasLight => true; + + private readonly Vector3 _lightColor = LightingUtils.Rgb255ToRgb1(255, 155, 48); + + public override void ModifyLight(int i, int j, ref float r, ref float g, ref float b) { - Main.tileSolidTop[Type] = false; - Main.tileFrameImportant[Type] = true; - Main.tileNoAttach[Type] = true; - TileObjectData.newTile.CopyFrom(TileObjectData.Style5x4); - TileObjectData.newTile.Height = 2; - TileObjectData.newTile.Origin = new Point16(1, 1); - TileObjectData.newTile.CoordinateHeights = new int[] { 16, 16 }; - TileObjectData.addTile(Type); - ModTranslation name = CreateMapEntryName(); - name.SetDefault("Shrine Altar"); - AddMapEntry(new Color(33, 28, 25), name); - dustType = DustID.LavaMoss; - disableSmartCursor = true; + r = _lightColor.X; + g = _lightColor.Y; + b = _lightColor.Z; } - public override void RightClick(int i, int j) + public override bool NewRightClick(int i, int j) { Player player = Main.LocalPlayer; Item[] inventory = player.inventory; @@ -51,17 +53,19 @@ namespace Decimation.Content.Tiles.ShrineoftheMoltenOne if (Main.netMode == 1) { ModPacket packet = mod.GetPacket(); - packet.Write((byte)DecimationModMessageType.SpawnBoss); + packet.Write((byte) DecimationModMessageType.SpawnBoss); packet.Write(ModContent.NPCType()); packet.Write(player.whoAmI); packet.Send(); } else if (Main.netMode == 0) { - Main.PlaySound(15, (int)player.position.X, (int)player.position.Y, 0); + Main.PlaySound(15, (int) player.position.X, (int) player.position.Y, 0); NPC.SpawnOnPlayer(player.whoAmI, ModContent.NPCType()); } } + + return inventoryContainAmulet; } public override void MouseOver(int i, int j) @@ -72,14 +76,9 @@ namespace Decimation.Content.Tiles.ShrineoftheMoltenOne player.showItemIcon2 = ModContent.ItemType(); } - public override void KillMultiTile(int i, int j, int frameX, int frameY) - { - Item.NewItem(i * 16, j * 16, 80, 32, ModContent.ItemType()); - } - public override bool CanKillTile(int i, int j, ref bool blockDamaged) { return DecimationWorld.downedArachnus; } } -} +} \ No newline at end of file diff --git a/Content/Tiles/ShrineoftheMoltenOne/ShrineAltar.png b/Content/Tiles/ShrineoftheMoltenOne/ShrineAltar.png index 8f1e64ad020216b1cfe496ae335dff309fa66d9c..1169a13851dca6ef4f11cd83de7aea539cc033da 100644 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#0$|@Wovy{Wh9%E;t0INjk#vnhBr4(6n~YWAp}Sy?YMF-1yP*ngrE!_Qu~PVNRdp&3sF~rM z&IZ5(9tVH0yN^bRhMc^mW}_nIOdr^Vc7)!3C{a{7#7e)`x%LZNXH^BGFDW$w0ZB)f z24mGf(dy2zNr(88MmnTeQ$@&TQtifXV1+Ald$=r0uWaC)?|s%m0sr zg93rAR|DLyjwEUY<}S=o@o&DBm4>C(q$`~RxqtPcMT39We-i{9r+=POS6QO zQxOLvuWI(pUA8VZ@1lwfJP6fuUmicPbW6)ZrhhVAD8{{xZ_97M#*BnNk eLQ9YWvu*I!=4w?FIHhoBY{J>QVQOpxlK%jexWich delta 1061 zcmV+=1ls$`7pw@77JmRF2nGNE011FCvj6}C@kvBMRA@u(S}|)>K@ffifivlXAQ(}U z6lYpdgacDs7zh?x#6Yg_H%LG%L8LjMIPyV;YSHztLTh&F%8_H{5<%J;-f7+tT|c|lvP7PoTcA$Q^6AosC5jjw$DvUxsRot)(Bg&*%! zW=kf|pSi~4rqFH^{qtVVbDr8CVT491O;DAAb|!QI=kkq1mf>2ITzO-)GgO?F@Sb z+UI6v18wO&HlPthiegRb?+t-U0=hQj3w2zBrkgQS2tOfZk@^g9b z>eFf_KHXN9_MT_~eTkGAnC z(y!IcPt<>gs0|cNGyz?NkmtAovJ+W^vBYU#dF()o7>%re#>dn;WWC&t!6%Z@A;qNx zbOEbFVzdNW)*h&KV4dp-aIAcYD+g&PI)B|74L$pB7>zWqBjpiQynh8W?9$4f106bw zVzb;~VWJcp`#mu_3n "Titan Forge"; public override Color MapColor => new Color(104, 140, 183); public override int DustType => DustID.Iron; - public override int AnimationFrameCount => 8; + public override int? AnimationFrameCount => 8; public override int? AnimationFrameHeight => 54; public override int TileItem => ModContent.ItemType(); } diff --git a/Lib/Items/DecimationPlaceableItem.cs b/Lib/Items/DecimationPlaceableItem.cs index b180190..3ca54c6 100644 --- a/Lib/Items/DecimationPlaceableItem.cs +++ b/Lib/Items/DecimationPlaceableItem.cs @@ -16,7 +16,6 @@ item.useStyle = 1; item.autoReuse = true; item.useTurn = true; - InitPlaceable(); diff --git a/Lib/Tiles/DecimationMultiTile.cs b/Lib/Tiles/DecimationMultiTile.cs index bce788d..d965112 100644 --- a/Lib/Tiles/DecimationMultiTile.cs +++ b/Lib/Tiles/DecimationMultiTile.cs @@ -40,14 +40,23 @@ namespace Decimation.Lib.Tiles TileObjectData.newTile.CoordinateHeights = CoordinateHeights; TileObjectData.newTile.CoordinateWidth = CoordinateWidth; TileObjectData.newTile.CoordinatePadding = CoordinatePadding; + TileObjectData.newTile.Origin = Origin; if (AnchorBottom) TileObjectData.newTile.AnchorBottom = new AnchorData(AnchorType.SolidTile, TileObjectData.newTile.Width - 1, 0); TileObjectData.addTile(Type); + // TODO not working + // if (AnimationFrameCount.HasValue && !AnimationFrameHeight.HasValue) + // { + // AnimationFrameHeight = (16 + TileObjectData.newTile.CoordinatePadding) * TileObjectData.newTile.Height; + // } + _width = TileObjectData.newTile.Width * 16; _height = TileObjectData.newTile.Height * 16; } + + public override void KillMultiTile(int i, int j, int frameX, int frameY) { diff --git a/Lib/Tiles/DecimationTile.cs b/Lib/Tiles/DecimationTile.cs index 1f6cdbe..d9f95d8 100644 --- a/Lib/Tiles/DecimationTile.cs +++ b/Lib/Tiles/DecimationTile.cs @@ -10,11 +10,12 @@ namespace Decimation.Lib.Tiles public virtual bool SolidTop { get; set; } = false; public virtual bool TilesCanAttach { get; set; } = false; public virtual bool DisableSmartCursor { get; set; } = false; + public virtual bool HasLight { get; } = false; public virtual float MineResistance { get; set; } = 1f; public virtual int DustType { get; } = 0; - public virtual int AnimationFrameCount { get; } = 0; + public virtual int? AnimationFrameCount { get; } = null; public virtual int AnimationFps { get; } = 5; - public virtual int? AnimationFrameHeight { get; } = null; + public virtual int? AnimationFrameHeight { get; set; } public virtual string Name { get; } = null; public virtual int MinimumPickaxePower { get; set; } = 0; @@ -26,12 +27,12 @@ namespace Decimation.Lib.Tiles Main.tileSolid[Type] = Solid; Main.tileSolidTop[Type] = SolidTop; Main.tileNoAttach[Type] = !TilesCanAttach; + Main.tileLighted[Type] = HasLight; minPick = MinimumPickaxePower; mineResist = MineResistance; dustType = DustType; drop = TileItem; disableSmartCursor = DisableSmartCursor; - if (AnimationFrameHeight.HasValue) animationFrameHeight = AnimationFrameHeight.Value; if (Name == null) { @@ -45,6 +46,8 @@ namespace Decimation.Lib.Tiles } InitTile(); + + if (AnimationFrameHeight.HasValue) animationFrameHeight = AnimationFrameHeight.Value; } public override void NumDust(int i, int j, bool fail, ref int num) @@ -54,6 +57,8 @@ namespace Decimation.Lib.Tiles public override void AnimateTile(ref int frame, ref int frameCounter) { + if (!AnimationFrameCount.HasValue) return; + frameCounter++; if (frameCounter > AnimationFps) {