The 4 torches of the Abyss
Fix to Gloom Torch and its dust spawns being Yellow/Green
No files matched your search
@@ -1,5 +1,5 @@
|
||||
using CalamityMod.CalPlayer;
|
||||
using CalamityMod.Items.Placeables.FurnitureAbyss;
|
||||
using CalamityMod.Items.Placeables.Furniture;
|
||||
using CalamityMod.Systems;
|
||||
using CalamityMod.Waters;
|
||||
using CalamityMod.World;
|
||||
@@ -48,7 +48,7 @@ namespace CalamityMod.BiomeManagers
|
||||
|
||||
// Temporarily use sulphur for now
|
||||
public override ModWaterStyle WaterStyle => SulphuricDepthsWater.Instance;
|
||||
public override int BiomeTorchItemType => ModContent.ItemType<AbyssTorch>();
|
||||
public override int BiomeTorchItemType => ModContent.ItemType<CausticTorch>();
|
||||
public override SceneEffectPriority Priority => SceneEffectPriority.Environment;
|
||||
public override string BestiaryIcon => "CalamityMod/BiomeManagers/AbyssLayer1Icon";
|
||||
public override string BackgroundPath => "CalamityMod/Backgrounds/MapBackgrounds/AbyssBGLayer1";
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
using CalamityMod.CalPlayer;
|
||||
using CalamityMod.Items.Placeables.FurnitureAbyss;
|
||||
using CalamityMod.Items.Placeables.Furniture;
|
||||
using CalamityMod.Systems;
|
||||
using CalamityMod.Waters;
|
||||
using CalamityMod.World;
|
||||
@@ -22,7 +22,7 @@ namespace CalamityMod.BiomeManagers
|
||||
}
|
||||
|
||||
public override ModWaterStyle WaterStyle => UpperAbyssWater.Instance;
|
||||
public override int BiomeTorchItemType => ModContent.ItemType<AbyssTorch>();
|
||||
public override int BiomeTorchItemType => ModContent.ItemType<KelpTorch>();
|
||||
public override SceneEffectPriority Priority => SceneEffectPriority.Environment;
|
||||
public override string BestiaryIcon => "CalamityMod/BiomeManagers/AbyssLayer2Icon";
|
||||
public override string BackgroundPath => "CalamityMod/Backgrounds/MapBackgrounds/AbyssBGLayer23";
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
using CalamityMod.CalPlayer;
|
||||
using CalamityMod.Items.Placeables.FurnitureAbyss;
|
||||
using CalamityMod.Items.Placeables.Furniture;
|
||||
using CalamityMod.Systems;
|
||||
using CalamityMod.Waters;
|
||||
using CalamityMod.World;
|
||||
@@ -22,7 +22,7 @@ namespace CalamityMod.BiomeManagers
|
||||
}
|
||||
|
||||
public override ModWaterStyle WaterStyle => MiddleAbyssWater.Instance;
|
||||
public override int BiomeTorchItemType => ModContent.ItemType<AbyssTorch>();
|
||||
public override int BiomeTorchItemType => ModContent.ItemType<ThermalTorch>();
|
||||
public override SceneEffectPriority Priority => SceneEffectPriority.Environment;
|
||||
public override string BestiaryIcon => "CalamityMod/BiomeManagers/AbyssLayer3Icon";
|
||||
public override string BackgroundPath => "CalamityMod/Backgrounds/MapBackgrounds/AbyssBGLayer23";
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
using CalamityMod.CalPlayer;
|
||||
using CalamityMod.Items.Placeables.FurnitureAbyss;
|
||||
using CalamityMod.Items.Placeables.Furniture;
|
||||
using CalamityMod.Systems;
|
||||
using CalamityMod.Waters;
|
||||
using CalamityMod.World;
|
||||
@@ -22,7 +22,7 @@ namespace CalamityMod.BiomeManagers
|
||||
}
|
||||
|
||||
public override ModWaterStyle WaterStyle => VoidWater.Instance;
|
||||
public override int BiomeTorchItemType => ModContent.ItemType<AbyssTorch>();
|
||||
public override int BiomeTorchItemType => ModContent.ItemType<VoidTorch>();
|
||||
public override SceneEffectPriority Priority => SceneEffectPriority.Environment;
|
||||
public override string BestiaryIcon => "CalamityMod/BiomeManagers/AbyssLayer4Icon";
|
||||
public override string BackgroundPath => "CalamityMod/Backgrounds/MapBackgrounds/AbyssBGLayer4";
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Items.Placeables.Abyss;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Placeables.Furniture
|
||||
{
|
||||
public class CausticTorch : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Placeables";
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Item.ResearchUnlockCount = 100;
|
||||
ItemID.Sets.Torches[Type] = true;
|
||||
ItemID.Sets.SingleUseInGamepad[Type] = true;
|
||||
ItemID.Sets.WaterTorches[Type] = true;
|
||||
ItemID.Sets.ShimmerTransformToItem[Type] = ItemID.ShimmerTorch;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.DefaultToTorch(ModContent.TileType<Tiles.Abyss.CausticTorch>(), 0, true);
|
||||
}
|
||||
|
||||
public override void HoldItem(Player player)
|
||||
{
|
||||
if (Main.rand.NextBool(player.itemAnimation > 0 ? 10 : 20))
|
||||
{
|
||||
Dust.NewDust(new Vector2(player.itemLocation.X + 16f * player.direction, player.itemLocation.Y - 14f * player.gravDir), 4, 4, DustID.t_LivingWood);
|
||||
}
|
||||
Vector2 position = player.RotatedRelativePoint(new Vector2(player.itemLocation.X + 12f * player.direction + player.velocity.X, player.itemLocation.Y - 14f + player.velocity.Y), true);
|
||||
Lighting.AddLight(position, 1f, 1.35f, 0.3f);
|
||||
}
|
||||
|
||||
public override void PostUpdate()
|
||||
{
|
||||
Lighting.AddLight((int)((Item.position.X + Item.width / 2) / 16f), (int)((Item.position.Y + Item.height / 2) / 16f), 1f, 1.35f, 0.3f);
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
CreateRecipe(3).
|
||||
AddIngredient(ItemID.Torch, 3).
|
||||
AddIngredient<SulphurousShale>().
|
||||
Register();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 351 B |
|
After Width: | Height: | Size: 189 B |
@@ -27,7 +27,7 @@ namespace CalamityMod.Items.Placeables.Furniture
|
||||
Vector2 position = player.RotatedRelativePoint(new Vector2(player.itemLocation.X + 12f * player.direction + player.velocity.X, player.itemLocation.Y - 14f + player.velocity.Y), true);
|
||||
|
||||
if (!killTorch)
|
||||
Lighting.AddLight(position, 0.9f, 1.2f, 0.3f);
|
||||
Lighting.AddLight(position, 0.5f, 0.75f, 1.2f);
|
||||
}
|
||||
|
||||
public override void PostUpdate()
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Items.Placeables.Abyss;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Placeables.Furniture
|
||||
{
|
||||
public class KelpTorch : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Placeables";
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Item.ResearchUnlockCount = 100;
|
||||
ItemID.Sets.Torches[Type] = true;
|
||||
ItemID.Sets.SingleUseInGamepad[Type] = true;
|
||||
ItemID.Sets.WaterTorches[Type] = true;
|
||||
ItemID.Sets.ShimmerTransformToItem[Type] = ItemID.ShimmerTorch;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.DefaultToTorch(ModContent.TileType<Tiles.Abyss.KelpTorch>(), 0, true);
|
||||
}
|
||||
|
||||
public override void HoldItem(Player player)
|
||||
{
|
||||
if (Main.rand.NextBool(player.itemAnimation > 0 ? 10 : 20))
|
||||
{
|
||||
Dust.NewDust(new Vector2(player.itemLocation.X + 16f * player.direction, player.itemLocation.Y - 14f * player.gravDir), 4, 4, DustID.Sunflower);
|
||||
}
|
||||
Vector2 position = player.RotatedRelativePoint(new Vector2(player.itemLocation.X + 12f * player.direction + player.velocity.X, player.itemLocation.Y - 14f + player.velocity.Y), true);
|
||||
Lighting.AddLight(position, 1.5f, 1.35f, 0.3f);
|
||||
}
|
||||
|
||||
public override void PostUpdate()
|
||||
{
|
||||
Lighting.AddLight((int)((Item.position.X + Item.width / 2) / 16f), (int)((Item.position.Y + Item.height / 2) / 16f), 1.5f, 1.35f, 0.3f);
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
CreateRecipe(3).
|
||||
AddIngredient(ItemID.Torch, 3).
|
||||
AddIngredient<PlantyMush>().
|
||||
Register();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 333 B |
|
After Width: | Height: | Size: 126 B |
@@ -0,0 +1,50 @@
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Items.Placeables.Abyss;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Placeables.Furniture
|
||||
{
|
||||
public class ThermalTorch : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Placeables";
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Item.ResearchUnlockCount = 100;
|
||||
ItemID.Sets.Torches[Type] = true;
|
||||
ItemID.Sets.SingleUseInGamepad[Type] = true;
|
||||
ItemID.Sets.WaterTorches[Type] = true;
|
||||
ItemID.Sets.ShimmerTransformToItem[Type] = ItemID.ShimmerTorch;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.DefaultToTorch(ModContent.TileType<Tiles.Abyss.ThermalTorch>(), 0, true);
|
||||
}
|
||||
|
||||
public override void HoldItem(Player player)
|
||||
{
|
||||
if (Main.rand.NextBool(player.itemAnimation > 0 ? 10 : 20))
|
||||
{
|
||||
Dust.NewDust(new Vector2(player.itemLocation.X + 16f * player.direction, player.itemLocation.Y - 14f * player.gravDir), 4, 4, DustID.DynastyShingle_Red);
|
||||
}
|
||||
Vector2 position = player.RotatedRelativePoint(new Vector2(player.itemLocation.X + 12f * player.direction + player.velocity.X, player.itemLocation.Y - 14f + player.velocity.Y), true);
|
||||
Lighting.AddLight(position, 1.8f, 0f, 0f);
|
||||
}
|
||||
|
||||
public override void PostUpdate()
|
||||
{
|
||||
Lighting.AddLight((int)((Item.position.X + Item.width / 2) / 16f), (int)((Item.position.Y + Item.height / 2) / 16f), 1.8f, 0f, 0f);
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
CreateRecipe(3).
|
||||
AddIngredient(ItemID.Torch, 3).
|
||||
AddIngredient<PyreMantleMolten>().
|
||||
Register();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 314 B |
|
After Width: | Height: | Size: 144 B |
@@ -5,9 +5,9 @@ using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Placeables.FurnitureAbyss
|
||||
namespace CalamityMod.Items.Placeables.Furniture
|
||||
{
|
||||
public class AbyssTorch : ModItem, ILocalizedModType
|
||||
public class VoidTorch : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Placeables";
|
||||
public override void SetStaticDefaults()
|
||||
@@ -21,7 +21,7 @@ namespace CalamityMod.Items.Placeables.FurnitureAbyss
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.DefaultToTorch(ModContent.TileType<Tiles.FurnitureAbyss.AbyssTorch>(), 0, true);
|
||||
Item.DefaultToTorch(ModContent.TileType<Tiles.Abyss.VoidTorch>(), 0, true);
|
||||
}
|
||||
|
||||
public override void HoldItem(Player player)
|
||||
@@ -43,7 +43,7 @@ namespace CalamityMod.Items.Placeables.FurnitureAbyss
|
||||
{
|
||||
CreateRecipe(3).
|
||||
AddIngredient(ItemID.Torch, 3).
|
||||
AddIngredient<AbyssGravel>().
|
||||
AddIngredient<Voidstone>().
|
||||
Register();
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 231 B After Width: | Height: | Size: 231 B |
|
Before Width: | Height: | Size: 153 B After Width: | Height: | Size: 153 B |
@@ -1,4 +1,4 @@
|
||||
using CalamityMod.Items.Placeables.FurnitureAbyss;
|
||||
using CalamityMod.Items.Placeables.Furniture;
|
||||
using CalamityMod.Items.Potions;
|
||||
using Terraria;
|
||||
using Terraria.GameContent.ItemDropRules;
|
||||
@@ -61,7 +61,7 @@ namespace CalamityMod.Items.TreasureBags.MiscGrabBags
|
||||
|
||||
// Pots can normally contain hearts here... but we turned it into a grab bag (so... coins!)
|
||||
// 4-12/5-18 Biome Torches @ 12.43% (87/700)
|
||||
var torches = DropHelper.NormalVsExpertQuantity(ModContent.ItemType<AbyssTorch>(), 1, 4, 12, 5, 18);
|
||||
var torches = DropHelper.NormalVsExpertQuantity(ModContent.ItemType<KelpTorch>(), 1, 4, 12, 5, 18);
|
||||
|
||||
// 10-20 Hellfire Arrows @ 12.43%
|
||||
var ammo = ItemDropRule.NotScalingWithLuck(ItemID.HellfireArrow, 1, 10, 20);
|
||||
|
||||
@@ -677,6 +677,11 @@ YharonRelic: {
|
||||
Tooltip: A glimpse into what will be...
|
||||
}
|
||||
|
||||
CausticTorch: {
|
||||
DisplayName: Caustic Torch
|
||||
Tooltip: Can be placed in water
|
||||
}
|
||||
|
||||
ChaosCandle: {
|
||||
DisplayName: Chaos Candle
|
||||
Tooltip: The mere presence of this candle enrages surrounding enemies drastically
|
||||
@@ -887,6 +892,11 @@ FrigidMonolith: {
|
||||
Tooltip: "'Enchant the sky with frosty auroras.'"
|
||||
}
|
||||
|
||||
KelpTorch: {
|
||||
DisplayName: Kelp Torch
|
||||
Tooltip: Can be placed in water
|
||||
}
|
||||
|
||||
OtonilouStatue: {
|
||||
DisplayName: Otonilou Memorial
|
||||
Tooltip: ""
|
||||
@@ -969,11 +979,21 @@ ThaumaticChair: {
|
||||
Tooltip: One of Chloe's finest creations
|
||||
}
|
||||
|
||||
ThermalTorch: {
|
||||
DisplayName: Thermal Torch
|
||||
Tooltip: Can be placed in water
|
||||
}
|
||||
|
||||
TranquilityCandle: {
|
||||
DisplayName: Tranquility Candle
|
||||
Tooltip: The mere presence of this candle calms surrounding enemies drastically
|
||||
}
|
||||
|
||||
VoidTorch: {
|
||||
DisplayName: Void Torch
|
||||
Tooltip: Can be placed in water
|
||||
}
|
||||
|
||||
AnahitaTrophy: {
|
||||
DisplayName: Anahita Trophy
|
||||
Tooltip: ""
|
||||
@@ -1294,11 +1314,6 @@ AbyssTable: {
|
||||
Tooltip: ""
|
||||
}
|
||||
|
||||
AbyssTorch: {
|
||||
DisplayName: Abyss Torch
|
||||
Tooltip: Can be placed in water
|
||||
}
|
||||
|
||||
AbyssWorkBench: {
|
||||
DisplayName: Abyss Work Bench
|
||||
Tooltip: ""
|
||||
|
||||
@@ -2670,7 +2670,10 @@ namespace CalamityMod.NPCs.DevourerofGods
|
||||
GFBOnly.Add(ItemID.JungleTorch, dropRate, dropMin, dropMax, true);
|
||||
GFBOnly.Add(ItemID.MushroomTorch, dropRate, dropMin, dropMax, true);
|
||||
GFBOnly.Add(ItemID.ShimmerTorch, dropRate, dropMin, dropMax, true);
|
||||
GFBOnly.Add(ModContent.ItemType<AbyssTorch>(), dropRate, dropMin, dropMax, true);
|
||||
GFBOnly.Add(ModContent.ItemType<CausticTorch>(), dropRate, dropMin, dropMax, true);
|
||||
GFBOnly.Add(ModContent.ItemType<KelpTorch>(), dropRate, dropMin, dropMax, true);
|
||||
GFBOnly.Add(ModContent.ItemType<ThermalTorch>(), dropRate, dropMin, dropMax, true);
|
||||
GFBOnly.Add(ModContent.ItemType<VoidTorch>(), dropRate, dropMin, dropMax, true);
|
||||
GFBOnly.Add(ModContent.ItemType<AlgalPrismTorch>(), dropRate, dropMin, dropMax, true);
|
||||
GFBOnly.Add(ModContent.ItemType<AstralTorch>(), dropRate, dropMin, dropMax, true);
|
||||
GFBOnly.Add(ModContent.ItemType<GloomTorch>(), dropRate, dropMin, dropMax, true);
|
||||
|
||||
@@ -0,0 +1,80 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Tiles.Abyss
|
||||
{
|
||||
public class CausticTorch : ModTile
|
||||
{
|
||||
public override void SetStaticDefaults() => this.SetUpTorch(ModContent.ItemType<Items.Placeables.Furniture.CausticTorch>(), true, true);
|
||||
|
||||
public override bool CreateDust(int i, int j, ref int type)
|
||||
{
|
||||
Dust.NewDust(new Vector2(i, j) * 16f, 16, 16, DustID.Stone, 0f, 0f, 1, new Color(160, 210, 60), 1f);
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void NumDust(int i, int j, bool fail, ref int num)
|
||||
{
|
||||
num = fail ? 1 : 3;
|
||||
}
|
||||
|
||||
public override void MouseOver(int i, int j)
|
||||
{
|
||||
Player player = Main.LocalPlayer;
|
||||
player.noThrow = 2;
|
||||
player.cursorItemIconEnabled = true;
|
||||
player.cursorItemIconID = ModContent.ItemType<Items.Placeables.Furniture.CausticTorch>();
|
||||
}
|
||||
|
||||
public override void ModifyLight(int i, int j, ref float r, ref float g, ref float b)
|
||||
{
|
||||
Tile tile = Main.tile[i, j];
|
||||
if (tile.TileFrameX < 66)
|
||||
{
|
||||
r = 1f;
|
||||
g = 1.5f;
|
||||
b = 0.4f;
|
||||
}
|
||||
}
|
||||
|
||||
public override void SetDrawPositions(int i, int j, ref int width, ref int offsetY, ref int height, ref short tileFrameX, ref short tileFrameY)
|
||||
{
|
||||
offsetY = 0;
|
||||
if (WorldGen.SolidTile(i, j - 1))
|
||||
{
|
||||
offsetY = 2;
|
||||
if (WorldGen.SolidTile(i - 1, j + 1) || WorldGen.SolidTile(i + 1, j + 1))
|
||||
{
|
||||
offsetY = 4;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override void PostDraw(int i, int j, SpriteBatch spriteBatch)
|
||||
{
|
||||
CalamityUtils.DrawFlameEffect(ModContent.Request<Texture2D>("CalamityMod/Tiles/Abyss/CausticTorchFlame").Value, i, j, 2);
|
||||
}
|
||||
|
||||
public override void DrawEffects(int i, int j, SpriteBatch spriteBatch, ref TileDrawInfo drawData)
|
||||
{
|
||||
if (Main.tile[i, j].TileFrameX < 66)
|
||||
CalamityUtils.DrawFlameSparks(Main.rand.NextBool() ? DustID.GreenTorch : DustID.YellowTorch, 5, i, j);
|
||||
}
|
||||
|
||||
public override bool RightClick(int i, int j)
|
||||
{
|
||||
CalamityUtils.RightClickBreak(i, j);
|
||||
return true;
|
||||
}
|
||||
|
||||
public override float GetTorchLuck(Player player)
|
||||
{
|
||||
// Note: Total Torch luck never goes below zero
|
||||
return player.Calamity().ZoneAbyss ? 1f : -1f; // Abyss Torch gives positive luck when in the Abyss, otherwise some negative luck
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 591 B |
@@ -0,0 +1,80 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Tiles.Abyss
|
||||
{
|
||||
public class KelpTorch : ModTile
|
||||
{
|
||||
public override void SetStaticDefaults() => this.SetUpTorch(ModContent.ItemType<Items.Placeables.Furniture.KelpTorch>(), true, true);
|
||||
|
||||
public override bool CreateDust(int i, int j, ref int type)
|
||||
{
|
||||
Dust.NewDust(new Vector2(i, j) * 16f, 16, 16, DustID.Stone, 0f, 0f, 1, new Color(160, 210, 60), 1f);
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void NumDust(int i, int j, bool fail, ref int num)
|
||||
{
|
||||
num = fail ? 1 : 3;
|
||||
}
|
||||
|
||||
public override void MouseOver(int i, int j)
|
||||
{
|
||||
Player player = Main.LocalPlayer;
|
||||
player.noThrow = 2;
|
||||
player.cursorItemIconEnabled = true;
|
||||
player.cursorItemIconID = ModContent.ItemType<Items.Placeables.Furniture.KelpTorch>();
|
||||
}
|
||||
|
||||
public override void ModifyLight(int i, int j, ref float r, ref float g, ref float b)
|
||||
{
|
||||
Tile tile = Main.tile[i, j];
|
||||
if (tile.TileFrameX < 66)
|
||||
{
|
||||
r = 1.8f;
|
||||
g = 1.5f;
|
||||
b = 0.4f;
|
||||
}
|
||||
}
|
||||
|
||||
public override void SetDrawPositions(int i, int j, ref int width, ref int offsetY, ref int height, ref short tileFrameX, ref short tileFrameY)
|
||||
{
|
||||
offsetY = 0;
|
||||
if (WorldGen.SolidTile(i, j - 1))
|
||||
{
|
||||
offsetY = 2;
|
||||
if (WorldGen.SolidTile(i - 1, j + 1) || WorldGen.SolidTile(i + 1, j + 1))
|
||||
{
|
||||
offsetY = 4;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override void PostDraw(int i, int j, SpriteBatch spriteBatch)
|
||||
{
|
||||
CalamityUtils.DrawFlameEffect(ModContent.Request<Texture2D>("CalamityMod/Tiles/Abyss/KelpTorchFlame").Value, i, j, 2);
|
||||
}
|
||||
|
||||
public override void DrawEffects(int i, int j, SpriteBatch spriteBatch, ref TileDrawInfo drawData)
|
||||
{
|
||||
if (Main.tile[i, j].TileFrameX < 66)
|
||||
CalamityUtils.DrawFlameSparks(DustID.YellowTorch, 5, i, j);
|
||||
}
|
||||
|
||||
public override bool RightClick(int i, int j)
|
||||
{
|
||||
CalamityUtils.RightClickBreak(i, j);
|
||||
return true;
|
||||
}
|
||||
|
||||
public override float GetTorchLuck(Player player)
|
||||
{
|
||||
// Note: Total Torch luck never goes below zero
|
||||
return player.Calamity().ZoneAbyss ? 1f : -1f; // Abyss Torch gives positive luck when in the Abyss, otherwise some negative luck
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 438 B |
@@ -60,7 +60,7 @@ namespace CalamityMod.Tiles.Abyss
|
||||
public override void DrawEffects(int i, int j, SpriteBatch spriteBatch, ref TileDrawInfo drawData)
|
||||
{
|
||||
if (Main.tile[i, j].TileFrameX < 66)
|
||||
CalamityUtils.DrawFlameSparks(Main.rand.NextBool() ? 61 : 64, 5, i, j);
|
||||
CalamityUtils.DrawFlameSparks(Main.rand.NextBool() ? DustID.GreenTorch : DustID.YellowTorch, 5, i, j);
|
||||
}
|
||||
|
||||
public override bool RightClick(int i, int j)
|
||||
|
||||
@@ -0,0 +1,80 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Tiles.Abyss
|
||||
{
|
||||
public class ThermalTorch : ModTile
|
||||
{
|
||||
public override void SetStaticDefaults() => this.SetUpTorch(ModContent.ItemType<Items.Placeables.Furniture.ThermalTorch>(), true, true);
|
||||
|
||||
public override bool CreateDust(int i, int j, ref int type)
|
||||
{
|
||||
Dust.NewDust(new Vector2(i, j) * 16f, 16, 16, DustID.Stone, 0f, 0f, 1, new Color(200, 0, 0), 1f);
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void NumDust(int i, int j, bool fail, ref int num)
|
||||
{
|
||||
num = fail ? 1 : 3;
|
||||
}
|
||||
|
||||
public override void MouseOver(int i, int j)
|
||||
{
|
||||
Player player = Main.LocalPlayer;
|
||||
player.noThrow = 2;
|
||||
player.cursorItemIconEnabled = true;
|
||||
player.cursorItemIconID = ModContent.ItemType<Items.Placeables.Furniture.ThermalTorch>();
|
||||
}
|
||||
|
||||
public override void ModifyLight(int i, int j, ref float r, ref float g, ref float b)
|
||||
{
|
||||
Tile tile = Main.tile[i, j];
|
||||
if (tile.TileFrameX < 66)
|
||||
{
|
||||
r = 2f;
|
||||
g = 0.5f;
|
||||
b = 0.5f;
|
||||
}
|
||||
}
|
||||
|
||||
public override void SetDrawPositions(int i, int j, ref int width, ref int offsetY, ref int height, ref short tileFrameX, ref short tileFrameY)
|
||||
{
|
||||
offsetY = 0;
|
||||
if (WorldGen.SolidTile(i, j - 1))
|
||||
{
|
||||
offsetY = 2;
|
||||
if (WorldGen.SolidTile(i - 1, j + 1) || WorldGen.SolidTile(i + 1, j + 1))
|
||||
{
|
||||
offsetY = 4;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override void PostDraw(int i, int j, SpriteBatch spriteBatch)
|
||||
{
|
||||
CalamityUtils.DrawFlameEffect(ModContent.Request<Texture2D>("CalamityMod/Tiles/Abyss/ThermalTorchFlame").Value, i, j, 2);
|
||||
}
|
||||
|
||||
public override void DrawEffects(int i, int j, SpriteBatch spriteBatch, ref TileDrawInfo drawData)
|
||||
{
|
||||
if (Main.tile[i, j].TileFrameX < 66)
|
||||
CalamityUtils.DrawFlameSparks(DustID.RedTorch, 5, i, j);
|
||||
}
|
||||
|
||||
public override bool RightClick(int i, int j)
|
||||
{
|
||||
CalamityUtils.RightClickBreak(i, j);
|
||||
return true;
|
||||
}
|
||||
|
||||
public override float GetTorchLuck(Player player)
|
||||
{
|
||||
// Note: Total Torch luck never goes below zero
|
||||
return player.Calamity().ZoneAbyss ? 1f : -1f; // Abyss Torch gives positive luck when in the Abyss, otherwise some negative luck
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 998 B |
|
After Width: | Height: | Size: 371 B |
@@ -5,11 +5,11 @@ using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Tiles.FurnitureAbyss
|
||||
namespace CalamityMod.Tiles.Abyss
|
||||
{
|
||||
public class AbyssTorch : ModTile
|
||||
public class VoidTorch : ModTile
|
||||
{
|
||||
public override void SetStaticDefaults() => this.SetUpTorch(ModContent.ItemType<Items.Placeables.FurnitureAbyss.AbyssTorch>(), true, true);
|
||||
public override void SetStaticDefaults() => this.SetUpTorch(ModContent.ItemType<Items.Placeables.Furniture.VoidTorch>(), true, true);
|
||||
|
||||
public override bool CreateDust(int i, int j, ref int type)
|
||||
{
|
||||
@@ -27,7 +27,7 @@ namespace CalamityMod.Tiles.FurnitureAbyss
|
||||
Player player = Main.LocalPlayer;
|
||||
player.noThrow = 2;
|
||||
player.cursorItemIconEnabled = true;
|
||||
player.cursorItemIconID = ModContent.ItemType<Items.Placeables.FurnitureAbyss.AbyssTorch>();
|
||||
player.cursorItemIconID = ModContent.ItemType<Items.Placeables.Furniture.VoidTorch>();
|
||||
}
|
||||
|
||||
public override void ModifyLight(int i, int j, ref float r, ref float g, ref float b)
|
||||
@@ -56,13 +56,13 @@ namespace CalamityMod.Tiles.FurnitureAbyss
|
||||
|
||||
public override void PostDraw(int i, int j, SpriteBatch spriteBatch)
|
||||
{
|
||||
CalamityUtils.DrawFlameEffect(ModContent.Request<Texture2D>("CalamityMod/Tiles/FurnitureAbyss/AbyssTorchFlame").Value, i, j, 2);
|
||||
CalamityUtils.DrawFlameEffect(ModContent.Request<Texture2D>("CalamityMod/Tiles/Abyss/VoidTorchFlame").Value, i, j, 2);
|
||||
}
|
||||
|
||||
public override void DrawEffects(int i, int j, SpriteBatch spriteBatch, ref TileDrawInfo drawData)
|
||||
{
|
||||
if (Main.tile[i, j].TileFrameX < 66)
|
||||
CalamityUtils.DrawFlameSparks(187, 5, i, j);
|
||||
CalamityUtils.DrawFlameSparks(DustID.BlueFlare, 5, i, j);
|
||||
}
|
||||
|
||||
public override bool RightClick(int i, int j)
|
||||
|
Before Width: | Height: | Size: 684 B After Width: | Height: | Size: 684 B |
|
Before Width: | Height: | Size: 287 B After Width: | Height: | Size: 287 B |
@@ -63,7 +63,7 @@ namespace CalamityMod.Tiles.Crags
|
||||
public override void DrawEffects(int i, int j, SpriteBatch spriteBatch, ref TileDrawInfo drawData)
|
||||
{
|
||||
if (Main.tile[i, j].TileFrameX < 66)
|
||||
CalamityUtils.DrawFlameSparks(Main.rand.NextBool() ? 61 : 64, 5, i, j);
|
||||
CalamityUtils.DrawFlameSparks(DustID.BlueTorch, 5, i, j);
|
||||
}
|
||||
|
||||
public override bool RightClick(int i, int j)
|
||||
|
||||
@@ -60,7 +60,7 @@ namespace CalamityMod.Tiles.SunkenSea
|
||||
public override void DrawEffects(int i, int j, SpriteBatch spriteBatch, ref TileDrawInfo drawData)
|
||||
{
|
||||
if (Main.tile[i, j].TileFrameX < 66)
|
||||
CalamityUtils.DrawFlameSparks(61, 5, i, j);
|
||||
CalamityUtils.DrawFlameSparks(DustID.GreenTorch, 5, i, j);
|
||||
}
|
||||
|
||||
public override bool RightClick(int i, int j)
|
||||
|
||||
@@ -61,7 +61,7 @@ namespace CalamityMod.Tiles.SunkenSea
|
||||
public override void DrawEffects(int i, int j, SpriteBatch spriteBatch, ref TileDrawInfo drawData)
|
||||
{
|
||||
if (Main.tile[i, j].TileFrameX < 66)
|
||||
CalamityUtils.DrawFlameSparks(59, 5, i, j);
|
||||
CalamityUtils.DrawFlameSparks(DustID.BlueTorch, 5, i, j);
|
||||
}
|
||||
|
||||
public override bool RightClick(int i, int j)
|
||||
|
||||
@@ -62,7 +62,7 @@ namespace CalamityMod.Tiles.SunkenSea
|
||||
public override void DrawEffects(int i, int j, SpriteBatch spriteBatch, ref TileDrawInfo drawData)
|
||||
{
|
||||
if (Main.tile[i, j].TileFrameX < 66)
|
||||
CalamityUtils.DrawFlameSparks(62, 5, i, j);
|
||||
CalamityUtils.DrawFlameSparks(DustID.PurpleTorch, 5, i, j);
|
||||
}
|
||||
|
||||
public override bool RightClick(int i, int j)
|
||||
|
||||
@@ -1132,7 +1132,7 @@ namespace CalamityMod.World
|
||||
Main.chest[ChestIndex].item[4].SetDefaults(ItemID.ManaPotion);
|
||||
Main.chest[ChestIndex].item[4].stack = WorldGen.genRand.Next(2, 5);
|
||||
|
||||
Main.chest[ChestIndex].item[5].SetDefaults(ModContent.ItemType<Items.Placeables.FurnitureAbyss.AbyssTorch>());
|
||||
Main.chest[ChestIndex].item[5].SetDefaults(ModContent.ItemType<Items.Placeables.Furniture.KelpTorch>());
|
||||
Main.chest[ChestIndex].item[5].stack = WorldGen.genRand.Next(3, 12);
|
||||
|
||||
Main.chest[ChestIndex].item[6].SetDefaults(ItemID.GoldCoin);
|
||||
|
||||
@@ -4,7 +4,6 @@ using System.Linq;
|
||||
using CalamityMod.Items.Accessories;
|
||||
using CalamityMod.Items.Mounts;
|
||||
using CalamityMod.Items.Placeables.Furniture;
|
||||
using CalamityMod.Items.Placeables.FurnitureAbyss;
|
||||
using CalamityMod.Items.Placeables.SunkenSea;
|
||||
using CalamityMod.Items.Potions;
|
||||
using CalamityMod.Items.Potions.Alcohol;
|
||||
@@ -1010,7 +1009,7 @@ namespace CalamityMod.World
|
||||
{
|
||||
new ChestItem(ItemType<Terminus>(), 1),
|
||||
new ChestItem(dropType, 1),
|
||||
new ChestItem(ItemType<AbyssTorch>(), WorldGen.genRand.Next(100, 110 + 1)),
|
||||
new ChestItem(ItemType<VoidTorch>(), WorldGen.genRand.Next(100, 110 + 1)),
|
||||
new ChestItem(ItemID.GoldCoin, WorldGen.genRand.Next(20, 24 + 1)),
|
||||
new ChestItem(ItemType<HadalStew>(), WorldGen.genRand.Next(10, 12 + 1)),
|
||||
new ChestItem(potionType, WorldGen.genRand.Next(10, 12 + 1)),
|
||||
|
||||