Minor tile/old recipe fixes
This commit is contained in:
1 parent
6970edc097
commit
f4e9fa4a12
17 files changed
+107
-73
No files matched your search
@@ -1,33 +1,33 @@
|
||||
using CalamityMod.World;
|
||||
using Terraria.ModLoader;
|
||||
using System;
|
||||
using Terraria;
|
||||
using Terraria.Localization;
|
||||
|
||||
namespace CalamityMod.CustomRecipes
|
||||
{
|
||||
public class SchematicRecipe : ModRecipe
|
||||
public static class SchematicRecipe
|
||||
{
|
||||
public string SchematicName;
|
||||
public SchematicRecipe(Mod mod, string schematicName) : base(mod) => SchematicName = schematicName;
|
||||
|
||||
public override bool RecipeAvailable()
|
||||
// TODO -- Use an enumeration instead of strings in the switch cases.
|
||||
public static NetworkText ConstructRecipeCondition(string schematicName, out Predicate<Recipe> condition)
|
||||
{
|
||||
// Allow old worlds to craft the new schematics; They don't exist in old worlds
|
||||
if (!CalamityWorld.IsWorldAfterDraedonUpdate)
|
||||
return true;
|
||||
|
||||
switch (SchematicName)
|
||||
switch (schematicName)
|
||||
{
|
||||
case "Sunken Sea":
|
||||
return RecipeUnlockHandler.HasFoundSunkenSeaSchematic;
|
||||
default:
|
||||
condition = r => RecipeUnlockHandler.HasFoundSunkenSeaSchematic;
|
||||
return NetworkText.FromKey($"Mods.Calamity.SunkenSeaSchematicRecipeCondition");
|
||||
case "Planetoid":
|
||||
return RecipeUnlockHandler.HasFoundPlanetoidSchematic;
|
||||
condition = r => RecipeUnlockHandler.HasFoundPlanetoidSchematic;
|
||||
return NetworkText.FromKey($"Mods.Calamity.PlanetoidSchematicRecipeCondition");
|
||||
case "Jungle":
|
||||
return RecipeUnlockHandler.HasFoundJungleSchematic;
|
||||
condition = r => RecipeUnlockHandler.HasFoundJungleSchematic;
|
||||
return NetworkText.FromKey($"Mods.Calamity.JungleSchematicRecipeCondition");
|
||||
case "Hell":
|
||||
return RecipeUnlockHandler.HasFoundHellSchematic;
|
||||
condition = r => RecipeUnlockHandler.HasFoundHellSchematic;
|
||||
return NetworkText.FromKey($"Mods.Calamity.UnderworldSchematicRecipeCondition");
|
||||
case "Ice":
|
||||
return RecipeUnlockHandler.HasFoundIceSchematic;
|
||||
condition = r => RecipeUnlockHandler.HasFoundIceSchematic;
|
||||
return NetworkText.FromKey($"Mods.Calamity.IceSchematicRecipeCondition");
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -18,24 +18,7 @@ namespace CalamityMod.Gores
|
||||
gore.behindTiles = true;
|
||||
gore.timeLeft = Gore.goreTime * 3;
|
||||
}
|
||||
public override bool DrawBehind(Gore gore)
|
||||
{
|
||||
Main.instance.LoadGore(gore.type);
|
||||
|
||||
int num = Main.goreTexture[gore.type].Height / (int)gore.numFrames;
|
||||
|
||||
Color alpha = gore.GetAlpha(Lighting.GetColor((int)((double)gore.position.X + (double)Main.goreTexture[gore.type].Width * 0.5) / 16, (int)(((double)gore.position.Y + (double)num * 0.5) / 16.0)));
|
||||
|
||||
Main.spriteBatch.Draw(
|
||||
Main.goreTexture[gore.type],
|
||||
new Vector2(gore.position.X - Main.screenPosition.X + (float)(Main.goreTexture[gore.type].Width / 2), gore.position.Y - Main.screenPosition.Y + (float)(num / 2) - 2f),
|
||||
new Rectangle(0, num * (int)gore.frame, Main.goreTexture[gore.type].Width, num),
|
||||
alpha, gore.rotation,
|
||||
new Vector2((float)(Main.goreTexture[gore.type].Width / 2), (float)(num / 2)),
|
||||
gore.scale, SpriteEffects.None, 0f);
|
||||
|
||||
return false;
|
||||
}
|
||||
public override bool Update(Gore gore)
|
||||
{
|
||||
if ((double)gore.position.Y < Main.worldSurface * 16.0 + 8.0)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using CalamityMod.Tiles.DraedonStructures;
|
||||
using CalamityMod.Tiles.DraedonStructures;
|
||||
using CalamityMod.Tiles.FurnitureExo;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@@ -42,7 +42,7 @@ namespace CalamityMod.ILEditing
|
||||
On.Terraria.Wiring.Teleport += DisableTeleporters; // only applies in boss rush
|
||||
IL.Terraria.Main.DrawInterface_40_InteractItemIcon += MakeMouseHoverItemsSupportAnimations;
|
||||
On.Terraria.Item.AffixName += IncorporateEnchantmentInAffix;
|
||||
On.Terraria.Projectile.NewProjectile_float_float_float_float_int_int_float_int_float_float += IncorporateMinionExplodingCountdown;
|
||||
On.Terraria.Projectile.NewProjectile_IEntitySource_float_float_float_float_int_int_float_int_float_float += IncorporateMinionExplodingCountdown;
|
||||
On.Terraria.Main.DrawCursor += UseCoolFireCursorEffect;
|
||||
IL.Terraria.Player.QuickHeal += ApplyManaBurnIfNeeded;
|
||||
IL.Terraria.Player.QuickMana += ApplyManaBurnIfNeeded;
|
||||
@@ -60,7 +60,7 @@ namespace CalamityMod.ILEditing
|
||||
|
||||
// Damage and health balance
|
||||
IL.Terraria.Main.DamageVar += AdjustDamageVariance;
|
||||
IL.Terraria.NPC.scaleStats += RemoveExpertHardmodeScaling;
|
||||
IL.Terraria.NPC.ScaleStats += RemoveExpertHardmodeScaling;
|
||||
IL.Terraria.Projectile.AI_001 += AdjustChlorophyteBullets;
|
||||
|
||||
// Movement speed balance
|
||||
@@ -91,7 +91,7 @@ namespace CalamityMod.ILEditing
|
||||
IL.Terraria.Main.UpdateTime += BloodMoonsRequire200MaxLife;
|
||||
|
||||
// Fix vanilla bugs exposed by Calamity mechanics
|
||||
On.Terraria.Main.InitLifeBytes += BossRushLifeBytes;
|
||||
// On.Terraria.Main.InitLifeBytes += BossRushLifeBytes;
|
||||
IL.Terraria.NPC.NPCLoot += FixSplittingWormBannerDrops;
|
||||
// IL.Terraria.Main.DoUpdate += FixProjectileUpdatePriorityProblems;
|
||||
}
|
||||
@@ -116,7 +116,7 @@ namespace CalamityMod.ILEditing
|
||||
On.Terraria.Wiring.Teleport -= DisableTeleporters;
|
||||
IL.Terraria.Main.DrawInterface_40_InteractItemIcon -= MakeMouseHoverItemsSupportAnimations;
|
||||
On.Terraria.Item.AffixName -= IncorporateEnchantmentInAffix;
|
||||
On.Terraria.Projectile.NewProjectile_float_float_float_float_int_int_float_int_float_float -= IncorporateMinionExplodingCountdown;
|
||||
On.Terraria.Projectile.NewProjectile_IEntitySource_float_float_float_float_int_int_float_int_float_float -= IncorporateMinionExplodingCountdown;
|
||||
On.Terraria.Main.DrawCursor -= UseCoolFireCursorEffect;
|
||||
IL.Terraria.Player.QuickHeal -= ApplyManaBurnIfNeeded;
|
||||
IL.Terraria.Player.QuickMana -= ApplyManaBurnIfNeeded;
|
||||
@@ -134,7 +134,7 @@ namespace CalamityMod.ILEditing
|
||||
|
||||
// Damage and health balance
|
||||
IL.Terraria.Main.DamageVar -= AdjustDamageVariance;
|
||||
IL.Terraria.NPC.scaleStats -= RemoveExpertHardmodeScaling;
|
||||
IL.Terraria.NPC.ScaleStats -= RemoveExpertHardmodeScaling;
|
||||
IL.Terraria.Projectile.AI_001 -= AdjustChlorophyteBullets;
|
||||
|
||||
// Movement speed balance
|
||||
@@ -165,7 +165,7 @@ namespace CalamityMod.ILEditing
|
||||
IL.Terraria.Main.UpdateTime -= BloodMoonsRequire200MaxLife;
|
||||
|
||||
// Fix vanilla bugs exposed by Calamity mechanics
|
||||
On.Terraria.Main.InitLifeBytes -= BossRushLifeBytes;
|
||||
// On.Terraria.Main.InitLifeBytes -= BossRushLifeBytes;
|
||||
IL.Terraria.NPC.NPCLoot -= FixSplittingWormBannerDrops;
|
||||
// IL.Terraria.Main.DoUpdate -= FixProjectileUpdatePriorityProblems;
|
||||
}
|
||||
|
||||
@@ -14,6 +14,7 @@ using Mono.Cecil.Cil;
|
||||
using MonoMod.Cil;
|
||||
using System;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.GameContent.Liquid;
|
||||
using Terraria.GameInput;
|
||||
using Terraria.Graphics;
|
||||
@@ -294,7 +295,7 @@ namespace CalamityMod.ILEditing
|
||||
#endregion Incorporate Enchantments in Item Names
|
||||
|
||||
#region Hellbound Enchantment Projectile Creation Effects
|
||||
private static int IncorporateMinionExplodingCountdown(On.Terraria.Projectile.orig_NewProjectile_float_float_float_float_int_int_float_int_float_float orig, float x, float y, float xSpeed, float ySpeed, int type, int damage, float knockback, int owner, float ai0, float ai1)
|
||||
private static int IncorporateMinionExplodingCountdown(On.Terraria.Projectile.orig_NewProjectile_IEntitySource_float_float_float_float_int_int_float_int_float_float orig, IEntitySource spawnSource, float x, float y, float xSpeed, float ySpeed, int type, int damage, float knockback, int owner, float ai0, float ai1)
|
||||
{
|
||||
// This is unfortunately not something that can be done via SetDefaults since owner is set
|
||||
// after that method is called. Doing it directly when the projectile is spawned appears to be the only reasonable way.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using CalamityMod.NPCs;
|
||||
using CalamityMod.NPCs;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Mono.Cecil.Cil;
|
||||
using MonoMod.Cil;
|
||||
@@ -81,6 +81,7 @@ namespace CalamityMod.ILEditing
|
||||
|
||||
public static List<OrderedProjectileEntry> OrderedProjectiles = new List<OrderedProjectileEntry>();
|
||||
|
||||
/*
|
||||
#region Fixing NPC HP Sync Byte Counts in Boss Rush
|
||||
// CONTEXT FOR FIX: When NPCs sync they have a pre-determined amount of bytes that are used to store HP/Max NPC information in packets for efficiency.
|
||||
// However, this may not always coincide with the true HP of the NPC when it's created if it has more HP than the allocated bytes can sufficiently store, which can
|
||||
@@ -88,6 +89,7 @@ namespace CalamityMod.ILEditing
|
||||
// To give an example, the Ancient Visions in the culst fight have a few thousand HP to work with, placing it in the 2-life-bytes category, and thusly allowing HP values
|
||||
// of up to 2^15 - 1 (32767). However, in Boss Rush, as of writing this, it has 50000 HP. In order to mitigate this, it must be placed in the 4-byte category, which allows
|
||||
// values up to the integer limit.
|
||||
// NOTE -- This mechanic appears to have been removed in 1.4.
|
||||
private static void BossRushLifeBytes(On.Terraria.Main.orig_InitLifeBytes orig)
|
||||
{
|
||||
orig();
|
||||
@@ -95,6 +97,7 @@ namespace CalamityMod.ILEditing
|
||||
Main.npcLifeBytes[npcType] = 4;
|
||||
}
|
||||
#endregion Fixing NPC HP Sync Byte Counts in Boss Rush
|
||||
*/
|
||||
|
||||
#region Fixing Splitting Worm Banner Spam in Deathmode
|
||||
// CONTEXT FOR FIX: In Death Mode, normal worms are capable of splitting similarly to the Eater of Worlds. This, as expected, comes with problems with loot dropping, as you can kill multiple
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
using System;
|
||||
using CalamityMod.CustomRecipes;
|
||||
using CalamityMod.Items.Materials;
|
||||
using Terraria;
|
||||
@@ -34,7 +35,13 @@ namespace CalamityMod.Items.DraedonMisc
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
CreateRecipe(1).AddIngredient(ModContent.ItemType<MysteriousCircuitry>(), 10).AddIngredient(ModContent.ItemType<DubiousPlating>(), 10).AddIngredient(ItemID.Glass, 50).AddTile(TileID.Anvils).Register();
|
||||
CreateRecipe(1).
|
||||
AddIngredient(ModContent.ItemType<MysteriousCircuitry>(), 10).
|
||||
AddIngredient(ModContent.ItemType<DubiousPlating>(), 10).
|
||||
AddIngredient(ItemID.Glass, 50).
|
||||
AddCondition(SchematicRecipe.ConstructRecipeCondition("Hell", out Predicate<Recipe> condition), condition).
|
||||
AddTile(TileID.Anvils).
|
||||
Register();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,3 +1,4 @@
|
||||
using System;
|
||||
using CalamityMod.CustomRecipes;
|
||||
using CalamityMod.Items.Materials;
|
||||
using Terraria;
|
||||
@@ -34,7 +35,13 @@ namespace CalamityMod.Items.DraedonMisc
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
CreateRecipe(1).AddIngredient(ModContent.ItemType<MysteriousCircuitry>(), 10).AddIngredient(ModContent.ItemType<DubiousPlating>(), 10).AddIngredient(ItemID.Glass, 50).AddTile(TileID.Anvils).Register();
|
||||
CreateRecipe(1).
|
||||
AddIngredient(ModContent.ItemType<MysteriousCircuitry>(), 10).
|
||||
AddIngredient(ModContent.ItemType<DubiousPlating>(), 10).
|
||||
AddIngredient(ItemID.Glass, 50).
|
||||
AddCondition(SchematicRecipe.ConstructRecipeCondition("Ice", out Predicate<Recipe> condition), condition).
|
||||
AddTile(TileID.Anvils).
|
||||
Register();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,3 +1,4 @@
|
||||
using System;
|
||||
using CalamityMod.CustomRecipes;
|
||||
using CalamityMod.Items.Materials;
|
||||
using Terraria;
|
||||
@@ -34,7 +35,13 @@ namespace CalamityMod.Items.DraedonMisc
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
CreateRecipe(1).AddIngredient(ModContent.ItemType<MysteriousCircuitry>(), 10).AddIngredient(ModContent.ItemType<DubiousPlating>(), 10).AddIngredient(ItemID.Glass, 50).AddTile(TileID.Anvils).Register();
|
||||
CreateRecipe(1).
|
||||
AddIngredient(ModContent.ItemType<MysteriousCircuitry>(), 10).
|
||||
AddIngredient(ModContent.ItemType<DubiousPlating>(), 10).
|
||||
AddIngredient(ItemID.Glass, 50).
|
||||
AddCondition(SchematicRecipe.ConstructRecipeCondition("Jungle", out Predicate<Recipe> condition), condition).
|
||||
AddTile(TileID.Anvils).
|
||||
Register();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,3 +1,4 @@
|
||||
using System;
|
||||
using CalamityMod.CustomRecipes;
|
||||
using CalamityMod.Items.Materials;
|
||||
using Terraria;
|
||||
@@ -34,7 +35,13 @@ namespace CalamityMod.Items.DraedonMisc
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
CreateRecipe(1).AddIngredient(ModContent.ItemType<MysteriousCircuitry>(), 10).AddIngredient(ModContent.ItemType<DubiousPlating>(), 10).AddIngredient(ItemID.Glass, 50).AddTile(TileID.Anvils).Register();
|
||||
CreateRecipe(1).
|
||||
AddIngredient(ModContent.ItemType<MysteriousCircuitry>(), 10).
|
||||
AddIngredient(ModContent.ItemType<DubiousPlating>(), 10).
|
||||
AddIngredient(ItemID.Glass, 50).
|
||||
AddCondition(SchematicRecipe.ConstructRecipeCondition("Planetoid", out Predicate<Recipe> condition), condition).
|
||||
AddTile(TileID.Anvils).
|
||||
Register();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
using CalamityMod.CustomRecipes;
|
||||
using CalamityMod.CustomRecipes;
|
||||
using CalamityMod.Items.Materials;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
@@ -14,7 +14,7 @@ namespace CalamityMod.Items.DraedonMisc
|
||||
Tooltip.SetDefault("Finely detailed diagrams of numerous devices and weaponry dance across the holographic screen.\n" +
|
||||
"The weaponry I supply to the workers of the laboratories is weak. Hardly suited for battle.\n" +
|
||||
"However, they suffice for self defense against any lab mechanisms or creations which may have gone rogue.\n" +
|
||||
"Addendum: For those who think themselves powerful, search the upper bounds of this planet’s atmosphere for a structure similar to that of the Sunken Seas.\n" +
|
||||
"Addendum: For those who think themselves powerful, search the upper bounds of this planet’s atmosphere for a structure similar to that of the Sunken Seas.\n" +
|
||||
"I will know by the end if you are worthy of battling my creations.\n" +
|
||||
"Picking up this item or holding it in your inventory permanently unlocks new recipes");
|
||||
}
|
||||
@@ -43,7 +43,13 @@ namespace CalamityMod.Items.DraedonMisc
|
||||
// Recipe exists for posierity.
|
||||
public override void AddRecipes()
|
||||
{
|
||||
CreateRecipe(1).AddIngredient(ModContent.ItemType<MysteriousCircuitry>(), 10).AddIngredient(ModContent.ItemType<DubiousPlating>(), 10).AddIngredient(ItemID.Glass, 50).AddTile(TileID.Anvils).Register();
|
||||
CreateRecipe(1).
|
||||
AddIngredient(ModContent.ItemType<MysteriousCircuitry>(), 10).
|
||||
AddIngredient(ModContent.ItemType<DubiousPlating>(), 10).
|
||||
AddIngredient(ItemID.Glass, 50).
|
||||
AddCondition(SchematicRecipe.ConstructRecipeCondition("Sunken Sea", out Predicate<Recipe> condition), condition).
|
||||
AddTile(TileID.Anvils).
|
||||
Register();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -208,6 +208,12 @@ namespace CalamityMod.Localization
|
||||
new [] { "Tier3ArsenalRecipeCondition", "Decrypt a schematic from the lab deep within the jungle" },
|
||||
new [] { "Tier4ArsenalRecipeCondition", "Decrypt a schematic from the lab near the edges of the underworld" },
|
||||
new [] { "Tier5ArsenalRecipeCondition", "Decrypt a schematic from the lab deep within the frozen caverns" },
|
||||
|
||||
new [] { "SunkenSeaSchematicRecipeCondition", "Place a schematic from the lab near the Sunken Sea in your inventory at least once" },
|
||||
new [] { "PlanetoidSchematicRecipeCondition", "Place a schematic from the lab in the large planetoid in your inventory at least once" },
|
||||
new [] { "JungleSchematicRecipeCondition", "Place a schematic from the lab deep within the jungle in your inventory at least once" },
|
||||
new [] { "UnderworldSchematicRecipeCondition", "Place a schematic from the lab near the edges of the underworld in your inventory at least once" },
|
||||
new [] { "IceSchematicRecipeCondition", "Place a schematic from the lab within the frozen caverns in your inventory at least once" },
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
using CalamityMod.Buffs.Placeables;
|
||||
using CalamityMod.Buffs.Placeables;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
@@ -57,7 +58,7 @@ namespace CalamityMod.Tiles.Furniture
|
||||
CalamityUtils.LightHitWire(Type, i, j, 1, 1);
|
||||
}
|
||||
|
||||
public override void DrawEffects(int i, int j, SpriteBatch spriteBatch, ref Color drawColor, ref int nextSpecialDrawIndex)
|
||||
public override void DrawEffects(int i, int j, SpriteBatch spriteBatch, ref TileDrawInfo drawData)
|
||||
{
|
||||
if (Main.tile[i, j].TileFrameX < 18)
|
||||
CalamityUtils.DrawFlameSparks(235, 5, i, j);
|
||||
@@ -65,7 +66,7 @@ namespace CalamityMod.Tiles.Furniture
|
||||
|
||||
public override void PostDraw(int i, int j, SpriteBatch spriteBatch)
|
||||
{
|
||||
CalamityUtils.DrawFlameEffect(ModContent.Request<Texture2D>("CalamityMod/Tiles/Furniture/ChaosCandleFlame"), i, j);
|
||||
CalamityUtils.DrawFlameEffect(ModContent.Request<Texture2D>("CalamityMod/Tiles/Furniture/ChaosCandleFlame").Value, i, j);
|
||||
}
|
||||
|
||||
public override bool RightClick(int i, int j)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
@@ -64,10 +64,10 @@ namespace CalamityMod.Tiles.Furniture.CraftingStations
|
||||
|
||||
public override void PostDraw(int i, int j, SpriteBatch spriteBatch)
|
||||
{
|
||||
CalamityUtils.DrawStaticFlameEffect(ModContent.Request<Texture2D>("CalamityMod/Tiles/Furniture/CraftingStations/AncientAltarFlame"), i, j, offsetY: animationFrame * animationFrameHeight);
|
||||
CalamityUtils.DrawStaticFlameEffect(ModContent.Request<Texture2D>("CalamityMod/Tiles/Furniture/CraftingStations/AncientAltarFlame").Value, i, j, offsetY: animationFrame * animationFrameHeight);
|
||||
}
|
||||
|
||||
public override void DrawEffects(int i, int j, SpriteBatch spriteBatch, ref Color drawColor, ref int nextSpecialDrawIndex)
|
||||
public override void DrawEffects(int i, int j, SpriteBatch spriteBatch, ref TileDrawInfo drawData)
|
||||
{
|
||||
Tile tile = Main.tile[i, j];
|
||||
if (tile.TileFrameX == 18 && tile.TileFrameY == 18)
|
||||
|
||||
@@ -64,10 +64,10 @@ namespace CalamityMod.Tiles.Furniture.CraftingStations
|
||||
|
||||
public override void PostDraw(int i, int j, SpriteBatch spriteBatch)
|
||||
{
|
||||
CalamityUtils.DrawStaticFlameEffect(ModContent.Request<Texture2D>("CalamityMod/Tiles/Furniture/CraftingStations/AshenAltarFlame"), i, j, offsetY: animationFrame * animationFrameHeight);
|
||||
CalamityUtils.DrawStaticFlameEffect(ModContent.Request<Texture2D>("CalamityMod/Tiles/Furniture/CraftingStations/AshenAltarFlame").Value, i, j, offsetY: animationFrame * animationFrameHeight);
|
||||
}
|
||||
|
||||
public override void DrawEffects(int i, int j, SpriteBatch spriteBatch, ref Color drawColor, ref int nextSpecialDrawIndex)
|
||||
public override void DrawEffects(int i, int j, SpriteBatch spriteBatch, ref TileDrawInfo drawData)
|
||||
{
|
||||
Tile tile = Main.tile[i, j];
|
||||
if (tile.TileFrameX == 18 && tile.TileFrameY == 18)
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
using CalamityMod.Buffs.Placeables;
|
||||
using CalamityMod.Buffs.Placeables;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
@@ -57,7 +58,7 @@ namespace CalamityMod.Tiles.Furniture
|
||||
CalamityUtils.LightHitWire(Type, i, j, 1, 1);
|
||||
}
|
||||
|
||||
public override void DrawEffects(int i, int j, SpriteBatch spriteBatch, ref Color drawColor, ref int nextSpecialDrawIndex)
|
||||
public override void DrawEffects(int i, int j, SpriteBatch spriteBatch, ref TileDrawInfo drawData)
|
||||
{
|
||||
if (Main.tile[i, j].TileFrameX < 18)
|
||||
CalamityUtils.DrawFlameSparks(62, 5, i, j);
|
||||
@@ -65,7 +66,7 @@ namespace CalamityMod.Tiles.Furniture
|
||||
|
||||
public override void PostDraw(int i, int j, SpriteBatch spriteBatch)
|
||||
{
|
||||
CalamityUtils.DrawFlameEffect(ModContent.Request<Texture2D>("CalamityMod/Tiles/Furniture/TranquilityCandleFlame"), i, j);
|
||||
CalamityUtils.DrawFlameEffect(ModContent.Request<Texture2D>("CalamityMod/Tiles/Furniture/TranquilityCandleFlame").Value, i, j);
|
||||
}
|
||||
|
||||
public override bool RightClick(int i, int j)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
@@ -74,10 +74,10 @@ namespace CalamityMod.Tiles.FurnitureAshen
|
||||
|
||||
public override void PostDraw(int i, int j, SpriteBatch spriteBatch)
|
||||
{
|
||||
CalamityUtils.DrawStaticFlameEffect(ModContent.Request<Texture2D>("CalamityMod/Tiles/FurnitureAshen/AshenBasinFlame"), i, j, offsetY: animationFrame * animationFrameHeight);
|
||||
CalamityUtils.DrawStaticFlameEffect(ModContent.Request<Texture2D>("CalamityMod/Tiles/FurnitureAshen/AshenBasinFlame").Value, i, j, offsetY: animationFrame * AnimationFrameHeight);
|
||||
}
|
||||
|
||||
public override void DrawEffects(int i, int j, SpriteBatch spriteBatch, ref Color drawColor, ref int nextSpecialDrawIndex)
|
||||
public override void DrawEffects(int i, int j, SpriteBatch spriteBatch, ref TileDrawInfo drawData)
|
||||
{
|
||||
Tile tile = Main.tile[i, j];
|
||||
if (tile.TileFrameY == 18 && tile.TileFrameX < 54)
|
||||
|
||||
+13
-8
@@ -1,10 +1,11 @@
|
||||
|
||||
|
||||
using CalamityMod.Dusts.Furniture;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
using Terraria.ID;
|
||||
using Terraria.DataStructures;
|
||||
|
||||
namespace CalamityMod.Tiles
|
||||
{
|
||||
@@ -35,6 +36,9 @@ namespace CalamityMod.Tiles
|
||||
return false;
|
||||
}
|
||||
|
||||
// TODO -- Fix the drapes from these. This uses specialized drawing hooks which appear to currently be private in 1.4.
|
||||
// This may require either gross reflection or contacting TML developers to make the necessary information for this public again.
|
||||
/*
|
||||
public override void DrawEffects(int i, int j, SpriteBatch spriteBatch, ref Color drawColor, ref int nextSpecialDrawIndex)
|
||||
{
|
||||
if ((Main.tile[i - 1, j - 1].TileType != Type || Main.tile[i, j - 1].TileType != Type || Main.tile[i + 1, j - 1].TileType != Type ||
|
||||
@@ -47,22 +51,23 @@ namespace CalamityMod.Tiles
|
||||
}
|
||||
}
|
||||
|
||||
public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak)
|
||||
{
|
||||
return TileFraming.BrimstoneFraming(i, j, resetFrame);
|
||||
}
|
||||
|
||||
public override void SpecialDraw(int i, int j, SpriteBatch spriteBatch)
|
||||
{
|
||||
Vector2 zero = Main.drawToScreen ? Vector2.Zero : new Vector2(Main.offScreenRange);
|
||||
Vector2 drawOffset = new Vector2(i * 16 - Main.screenPosition.X, j * 16 - Main.screenPosition.Y) + zero;
|
||||
Color drawColour = GetDrawColour(i, j);
|
||||
Texture2D leaves = ModContent.Request<Texture2D>("CalamityMod/Tiles/UelibloomBrick_Leaves");
|
||||
Texture2D leaves = ModContent.Request<Texture2D>("CalamityMod/Tiles/UelibloomBrick_Leaves").Value;
|
||||
|
||||
DrawExtraTop(i, j, leaves, drawOffset, drawColour);
|
||||
DrawExtraWallEnds(i, j, leaves, drawOffset, drawColour);
|
||||
DrawExtraDrapes(i, j, leaves, drawOffset, drawColour);
|
||||
}
|
||||
*/
|
||||
|
||||
public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak)
|
||||
{
|
||||
return TileFraming.BrimstoneFraming(i, j, resetFrame);
|
||||
}
|
||||
|
||||
#region 'Extra Drapes' Drawing
|
||||
private void DrawExtraTop(int i, int j, Texture2D extras, Vector2 drawOffset, Color drawColour)
|
||||
@@ -234,7 +239,7 @@ namespace CalamityMod.Tiles
|
||||
|
||||
private int GetExtraVariant(int i, int j)
|
||||
{
|
||||
return Main.tile[i, j].frameNumber() * extraFrameWidth;
|
||||
return Main.tile[i, j].TileFrameNumber * extraFrameWidth;
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in new issue
Block a user