From 821e26bba417c83e24b79088d9b43197a3ff5bc7 Mon Sep 17 00:00:00 2001 From: goldenapple Date: Sun, 29 Jul 2018 23:36:51 +0300 Subject: [PATCH] Ancient Forges/Hellforges now glow! (version bump) --- Tiles/AncientForge.cs | 17 +++++++++++++++-- Tiles/AncientHellforge.cs | 19 ++++++++++++++++++- build.txt | 2 +- 3 files changed, 34 insertions(+), 4 deletions(-) diff --git a/Tiles/AncientForge.cs b/Tiles/AncientForge.cs index 042dae7..e39567f 100644 --- a/Tiles/AncientForge.cs +++ b/Tiles/AncientForge.cs @@ -20,6 +20,7 @@ public override void SetDefaults() { Main.tileFrameImportant[Type] = true; Main.tileNoAttach[Type] = true; + Main.tileLighted[Type] = true; TileObjectData.newTile.CopyFrom(TileObjectData.Style3x2); TileObjectData.newTile.CoordinateHeights = new []{ 16, 18 }; TileObjectData.addTile(Type); @@ -33,10 +34,22 @@ public override void KillMultiTile(int i, int j, int frameX, int frameY) { Item.NewItem(i * 16, j * 16, 48, 32, mod.ItemType(GetType().Name)); } - + public override void RandomUpdate(int i, int j) { - base.RandomUpdate(i, j); + int amount = Main.rand.Next(1, 4); + for(int a = 0; a < amount; a++) + Dust.NewDust(new Vector2(i * 16, j * 16), 16, 16, DustID.Fire); + } + + public override void ModifyLight(int i, int j, ref float r, ref float g, ref float b) + { + float rand = 0f; + //float rand = (float)Main.rand.Next(28, 42) * 0.005f; + //rand += (float)(270 - (int)Main.mouseTextColor) / 700f; + r = 0.5f + rand; + g = 0.8f + rand; + b = 0.35f + rand; } } } diff --git a/Tiles/AncientHellforge.cs b/Tiles/AncientHellforge.cs index e34d17d..86e6b2e 100644 --- a/Tiles/AncientHellforge.cs +++ b/Tiles/AncientHellforge.cs @@ -21,7 +21,7 @@ public override void SetDefaults() Main.tileObsidianKill[Type] = true; Main.tileLighted[Type] = true; Main.tileFrameImportant[Type] = true; -// Main.tileNoAttach[Type] = true; + Main.tileNoAttach[Type] = true; TileObjectData.newTile.CopyFrom(TileObjectData.Style3x2); TileObjectData.newTile.CoordinateHeights = new []{ 16, 18 }; TileObjectData.newTile.LavaDeath = false; @@ -35,5 +35,22 @@ public override void KillMultiTile(int i, int j, int frameX, int frameY) { Item.NewItem(i * 16, j * 16, 48, 32, mod.ItemType(GetType().Name)); } + + public override void RandomUpdate(int i, int j) + { + int amount = Main.rand.Next(1, 4); + for(int a = 0; a < amount; a++) + Dust.NewDust(new Vector2(i * 16, j * 16), 16, 16, DustID.Fire); + } + + public override void ModifyLight(int i, int j, ref float r, ref float g, ref float b) + { + float rand = 0f; + //float rand = (float)Main.rand.Next(28, 42) * 0.005f; + //rand += (float)(270 - (int)Main.mouseTextColor) / 700f; + r = 0.5f + rand; + g = 0.8f + rand; + b = 0.35f + rand; + } } } diff --git a/build.txt b/build.txt index aa1bf00..e23c3e0 100644 --- a/build.txt +++ b/build.txt @@ -1,6 +1,6 @@ displayName = Miscellania author = goldenapple -version = 1.6 +version = 1.6.1 homepage = http://forums.terraria.org/index.php?threads/miscellania.39500/ hideResources = false hideCode = false