Cache Request<Texture2D> for Tiles
This commit is contained in:
1 parent
591df2f80f
commit
4281113b1d
176 files changed
+1224
-500
No files matched your search
@@ -1,5 +1,6 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using ReLogic.Content;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
@@ -9,6 +10,8 @@ namespace CalamityMod.Tiles.Abyss
|
||||
{
|
||||
public class CausticTorch : ModTile
|
||||
{
|
||||
public Asset<Texture2D> FlameTexture;
|
||||
|
||||
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)
|
||||
@@ -56,7 +59,8 @@ namespace CalamityMod.Tiles.Abyss
|
||||
|
||||
public override void PostDraw(int i, int j, SpriteBatch spriteBatch)
|
||||
{
|
||||
CalamityUtils.DrawFlameEffect(ModContent.Request<Texture2D>("CalamityMod/Tiles/Abyss/CausticTorchFlame").Value, i, j, 2);
|
||||
FlameTexture ??= ModContent.Request<Texture2D>("CalamityMod/Tiles/Abyss/CausticTorchFlame");
|
||||
CalamityUtils.DrawFlameEffect(FlameTexture.Value, i, j, 2);
|
||||
}
|
||||
|
||||
public override void DrawEffects(int i, int j, SpriteBatch spriteBatch, ref TileDrawInfo drawData)
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using ReLogic.Content;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
@@ -9,6 +10,8 @@ namespace CalamityMod.Tiles.Abyss
|
||||
{
|
||||
public class KelpTorch : ModTile
|
||||
{
|
||||
public Asset<Texture2D> FlameTexture;
|
||||
|
||||
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)
|
||||
@@ -56,7 +59,8 @@ namespace CalamityMod.Tiles.Abyss
|
||||
|
||||
public override void PostDraw(int i, int j, SpriteBatch spriteBatch)
|
||||
{
|
||||
CalamityUtils.DrawFlameEffect(ModContent.Request<Texture2D>("CalamityMod/Tiles/Abyss/KelpTorchFlame").Value, i, j, 2);
|
||||
FlameTexture ??= ModContent.Request<Texture2D>("CalamityMod/Tiles/Abyss/KelpTorchFlame");
|
||||
CalamityUtils.DrawFlameEffect(FlameTexture.Value, i, j, 2);
|
||||
}
|
||||
|
||||
public override void DrawEffects(int i, int j, SpriteBatch spriteBatch, ref TileDrawInfo drawData)
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using ReLogic.Content;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
@@ -9,6 +10,8 @@ namespace CalamityMod.Tiles.Abyss
|
||||
{
|
||||
public class SulphurousTorch : ModTile
|
||||
{
|
||||
public Asset<Texture2D> FlameTexture;
|
||||
|
||||
public override void SetStaticDefaults() => this.SetUpTorch(ModContent.ItemType<Items.Placeables.Furniture.SulphurousTorch>(), waterImmune: true);
|
||||
|
||||
public override bool CreateDust(int i, int j, ref int type)
|
||||
@@ -54,7 +57,8 @@ namespace CalamityMod.Tiles.Abyss
|
||||
|
||||
public override void PostDraw(int i, int j, SpriteBatch spriteBatch)
|
||||
{
|
||||
CalamityUtils.DrawFlameEffect(ModContent.Request<Texture2D>("CalamityMod/Tiles/Abyss/SulphurousTorchFlame").Value, i, j, 2);
|
||||
FlameTexture ??= ModContent.Request<Texture2D>("CalamityMod/Tiles/Abyss/SulphurousTorchFlame");
|
||||
CalamityUtils.DrawFlameEffect(FlameTexture.Value, i, j, 2);
|
||||
}
|
||||
|
||||
public override void DrawEffects(int i, int j, SpriteBatch spriteBatch, ref TileDrawInfo drawData)
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using ReLogic.Content;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
@@ -9,6 +10,8 @@ namespace CalamityMod.Tiles.Abyss
|
||||
{
|
||||
public class ThermalTorch : ModTile
|
||||
{
|
||||
public Asset<Texture2D> FlameTexture;
|
||||
|
||||
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)
|
||||
@@ -56,7 +59,8 @@ namespace CalamityMod.Tiles.Abyss
|
||||
|
||||
public override void PostDraw(int i, int j, SpriteBatch spriteBatch)
|
||||
{
|
||||
CalamityUtils.DrawFlameEffect(ModContent.Request<Texture2D>("CalamityMod/Tiles/Abyss/ThermalTorchFlame").Value, i, j, 2);
|
||||
FlameTexture ??= ModContent.Request<Texture2D>("CalamityMod/Tiles/Abyss/ThermalTorchFlame");
|
||||
CalamityUtils.DrawFlameEffect(FlameTexture.Value, i, j, 2);
|
||||
}
|
||||
|
||||
public override void DrawEffects(int i, int j, SpriteBatch spriteBatch, ref TileDrawInfo drawData)
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using ReLogic.Content;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
@@ -10,6 +11,8 @@ namespace CalamityMod.Tiles.Abyss
|
||||
[LegacyName("AbyssTorch")]
|
||||
public class VoidTorch : ModTile
|
||||
{
|
||||
public Asset<Texture2D> FlameTexture;
|
||||
|
||||
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)
|
||||
@@ -57,7 +60,8 @@ namespace CalamityMod.Tiles.Abyss
|
||||
|
||||
public override void PostDraw(int i, int j, SpriteBatch spriteBatch)
|
||||
{
|
||||
CalamityUtils.DrawFlameEffect(ModContent.Request<Texture2D>("CalamityMod/Tiles/Abyss/VoidTorchFlame").Value, i, j, 2);
|
||||
FlameTexture ??= ModContent.Request<Texture2D>("CalamityMod/Tiles/Abyss/VoidTorchFlame");
|
||||
CalamityUtils.DrawFlameEffect(FlameTexture.Value, i, j, 2);
|
||||
}
|
||||
|
||||
public override void DrawEffects(int i, int j, SpriteBatch spriteBatch, ref TileDrawInfo drawData)
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using CalamityMod.Dusts;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using ReLogic.Content;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
@@ -10,6 +11,8 @@ namespace CalamityMod.Tiles.Astral
|
||||
{
|
||||
public class AstralTorch : ModTile
|
||||
{
|
||||
public Asset<Texture2D> FlameTexture;
|
||||
|
||||
public override void SetStaticDefaults() => this.SetUpTorch(ModContent.ItemType<Items.Placeables.Furniture.AstralTorch>(), waterImmune: true);
|
||||
|
||||
public override bool CreateDust(int i, int j, ref int type)
|
||||
@@ -58,7 +61,8 @@ namespace CalamityMod.Tiles.Astral
|
||||
|
||||
public override void PostDraw(int i, int j, SpriteBatch spriteBatch)
|
||||
{
|
||||
CalamityUtils.DrawFlameEffect(ModContent.Request<Texture2D>("CalamityMod/Tiles/Astral/AstralTorchFlame").Value, i, j, 2);
|
||||
FlameTexture ??= ModContent.Request<Texture2D>("CalamityMod/Tiles/Astral/AstralTorchFlame");
|
||||
CalamityUtils.DrawFlameEffect(FlameTexture.Value, i, j, 2);
|
||||
}
|
||||
|
||||
public override void DrawEffects(int i, int j, SpriteBatch spriteBatch, ref TileDrawInfo drawData)
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria.GameContent;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using ReLogic.Content;
|
||||
using Terraria;
|
||||
using Terraria.Audio;
|
||||
using Terraria.GameContent;
|
||||
using Terraria.GameContent.ObjectInteractions;
|
||||
using Terraria.ID;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Tiles.BaseTiles
|
||||
{
|
||||
@@ -25,6 +25,11 @@ namespace CalamityMod.Tiles.BaseTiles
|
||||
/// </summary>
|
||||
public Asset<Texture2D> GlowMask;
|
||||
|
||||
/// <summary>
|
||||
/// Highlight to use for Monolith
|
||||
/// </summary>
|
||||
public Asset<Texture2D> Highlight;
|
||||
|
||||
/// <summary>
|
||||
/// Sound to play on right-clicked by player
|
||||
/// </summary>
|
||||
@@ -69,8 +74,8 @@ namespace CalamityMod.Tiles.BaseTiles
|
||||
var relJ = leftTopJ + p;
|
||||
var relTile = Main.tile[relI, relJ];
|
||||
|
||||
if (enabled) relTile.TileFrameY -= (short)height;
|
||||
else relTile.TileFrameY += (short)height;
|
||||
if (enabled) relTile.TileFrameY -= (short)height;
|
||||
else relTile.TileFrameY += (short)height;
|
||||
|
||||
if (Wiring.running)
|
||||
{
|
||||
@@ -144,10 +149,9 @@ namespace CalamityMod.Tiles.BaseTiles
|
||||
// transplanted into base monolith as part of manual cherry pick merge
|
||||
//
|
||||
// Draws the Smart Cursor Highlight. Not 100% accurate, but its close enough
|
||||
bool actuallySelected;
|
||||
Color highlightColor;
|
||||
Texture2D texhighlight = ModContent.Request<Texture2D>(HighlightTexture).Value;
|
||||
if (texhighlight is not null && Main.InSmartCursorHighlightArea(i, j, out actuallySelected))
|
||||
Highlight ??= ModContent.Request<Texture2D>(HighlightTexture);
|
||||
if (Highlight is not null && Main.InSmartCursorHighlightArea(i, j, out var actuallySelected))
|
||||
{
|
||||
if (actuallySelected)
|
||||
{
|
||||
@@ -157,7 +161,7 @@ namespace CalamityMod.Tiles.BaseTiles
|
||||
{
|
||||
highlightColor = new Color(125, 125, 125);
|
||||
}
|
||||
Main.spriteBatch.Draw(texhighlight, new Vector2(i * 16 - (int)Main.screenPosition.X, j * 16 - (int)Main.screenPosition.Y) + zero, new Rectangle(tile.TileFrameX, tile.TileFrameY + animateFrameOffset, 16, height), highlightColor, 0f, default(Vector2), 1f, SpriteEffects.None, 0f); ;
|
||||
Main.spriteBatch.Draw(Highlight.Value, new Vector2(i * 16 - (int)Main.screenPosition.X, j * 16 - (int)Main.screenPosition.Y) + zero, new Rectangle(tile.TileFrameX, tile.TileFrameY + animateFrameOffset, 16, height), highlightColor, 0f, default(Vector2), 1f, SpriteEffects.None, 0f); ;
|
||||
}
|
||||
|
||||
return false;
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using ReLogic.Content;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
@@ -9,6 +10,8 @@ namespace CalamityMod.Tiles.Crags
|
||||
{
|
||||
public class GloomTorch : ModTile
|
||||
{
|
||||
public Asset<Texture2D> FlameTexture;
|
||||
|
||||
public override void SetStaticDefaults() => this.SetUpTorch(ModContent.ItemType<Items.Placeables.Furniture.GloomTorch>(), lavaImmune: true);
|
||||
|
||||
public override bool CreateDust(int i, int j, ref int type)
|
||||
@@ -57,7 +60,8 @@ namespace CalamityMod.Tiles.Crags
|
||||
|
||||
public override void PostDraw(int i, int j, SpriteBatch spriteBatch)
|
||||
{
|
||||
CalamityUtils.DrawFlameEffect(ModContent.Request<Texture2D>("CalamityMod/Tiles/Crags/GloomTorchFlame").Value, i, j, 2);
|
||||
FlameTexture ??= ModContent.Request<Texture2D>("CalamityMod/Tiles/Crags/GloomTorchFlame");
|
||||
CalamityUtils.DrawFlameEffect(FlameTexture.Value, i, j, 2);
|
||||
}
|
||||
|
||||
public override void DrawEffects(int i, int j, SpriteBatch spriteBatch, ref TileDrawInfo drawData)
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using ReLogic.Content;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.Enums;
|
||||
@@ -11,6 +12,10 @@ namespace CalamityMod.Tiles.Crags.Lily
|
||||
{
|
||||
public class LavaLily1 : ModTile
|
||||
{
|
||||
public Asset<Texture2D> GlowTexture;
|
||||
public Asset<Texture2D> TopTexture;
|
||||
public Asset<Texture2D> TopGlowTexture;
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.tileFrameImportant[Type] = true;
|
||||
@@ -60,19 +65,19 @@ namespace CalamityMod.Tiles.Crags.Lily
|
||||
if (tile.IsTileActuallyInvisible())
|
||||
return;
|
||||
|
||||
Texture2D tex = ModContent.Request<Texture2D>("CalamityMod/Tiles/Crags/Lily/LavaLily1Glow").Value;
|
||||
GlowTexture ??= ModContent.Request<Texture2D>("CalamityMod/Tiles/Crags/Lily/LavaLily1Glow");
|
||||
Vector2 zero = Main.drawToScreen ? Vector2.Zero : new Vector2(Main.offScreenRange, Main.offScreenRange);
|
||||
|
||||
spriteBatch.Draw(tex, new Vector2(i * 16, j * 16 + 2) - Main.screenPosition + zero, new Rectangle(tile.TileFrameX, tile.TileFrameY, 16, 16), Color.White);
|
||||
|
||||
Texture2D lilyTex = ModContent.Request<Texture2D>("CalamityMod/Tiles/Crags/Lily/LavaLily1Top").Value;
|
||||
Texture2D glowTex = ModContent.Request<Texture2D>("CalamityMod/Tiles/Crags/Lily/LavaLily1TopGlow").Value;
|
||||
spriteBatch.Draw(GlowTexture.Value, new Vector2(i * 16, j * 16 + 2) - Main.screenPosition + zero, new Rectangle(tile.TileFrameX, tile.TileFrameY, 16, 16), Color.White);
|
||||
|
||||
//draw in the middle of the tile so it doesnt draw more than once
|
||||
if (Framing.GetTileSafely(i, j).TileFrameX == 36 && Framing.GetTileSafely(i, j).TileFrameY == 18)
|
||||
{
|
||||
DrawLilyTop(i, j, lilyTex, new Rectangle(0, 0, 178, 184), TileOffset.ToWorldCoordinates(), new Vector2(98, 191), false);
|
||||
DrawLilyTop(i, j, glowTex, new Rectangle(0, 0, 178, 184), TileOffset.ToWorldCoordinates(), new Vector2(98, 191), true);
|
||||
TopTexture ??= ModContent.Request<Texture2D>("CalamityMod/Tiles/Crags/Lily/LavaLily1Top");
|
||||
TopGlowTexture ??= ModContent.Request<Texture2D>("CalamityMod/Tiles/Crags/Lily/LavaLily1TopGlow");
|
||||
|
||||
DrawLilyTop(i, j, TopTexture.Value, new Rectangle(0, 0, 178, 184), TileOffset.ToWorldCoordinates(), new Vector2(98, 191), false);
|
||||
DrawLilyTop(i, j, TopGlowTexture.Value, new Rectangle(0, 0, 178, 184), TileOffset.ToWorldCoordinates(), new Vector2(98, 191), true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using ReLogic.Content;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.Enums;
|
||||
@@ -11,6 +12,10 @@ namespace CalamityMod.Tiles.Crags.Lily
|
||||
{
|
||||
public class LavaLily2 : ModTile
|
||||
{
|
||||
public Asset<Texture2D> GlowTexture;
|
||||
public Asset<Texture2D> TopTexture;
|
||||
public Asset<Texture2D> TopGlowTexture;
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.tileFrameImportant[Type] = true;
|
||||
@@ -60,19 +65,19 @@ namespace CalamityMod.Tiles.Crags.Lily
|
||||
if (tile.IsTileActuallyInvisible())
|
||||
return;
|
||||
|
||||
Texture2D tex = ModContent.Request<Texture2D>("CalamityMod/Tiles/Crags/Lily/LavaLily2Glow").Value;
|
||||
GlowTexture ??= ModContent.Request<Texture2D>("CalamityMod/Tiles/Crags/Lily/LavaLily2Glow");
|
||||
Vector2 zero = Main.drawToScreen ? Vector2.Zero : new Vector2(Main.offScreenRange, Main.offScreenRange);
|
||||
|
||||
spriteBatch.Draw(tex, new Vector2(i * 16, j * 16 + 2) - Main.screenPosition + zero, new Rectangle(tile.TileFrameX, tile.TileFrameY, 16, 16), Color.White);
|
||||
|
||||
Texture2D lilyTex = ModContent.Request<Texture2D>("CalamityMod/Tiles/Crags/Lily/LavaLily2Top").Value;
|
||||
Texture2D glowTex = ModContent.Request<Texture2D>("CalamityMod/Tiles/Crags/Lily/LavaLily2TopGlow").Value;
|
||||
spriteBatch.Draw(GlowTexture.Value, new Vector2(i * 16, j * 16 + 2) - Main.screenPosition + zero, new Rectangle(tile.TileFrameX, tile.TileFrameY, 16, 16), Color.White);
|
||||
|
||||
//draw in the middle of the tile so it doesnt draw more than once
|
||||
if (Framing.GetTileSafely(i, j).TileFrameX == 36 && Framing.GetTileSafely(i, j).TileFrameY == 18)
|
||||
{
|
||||
DrawLilyTop(i, j, lilyTex, new Rectangle(0, 0, 192, 206), TileOffset.ToWorldCoordinates(), new Vector2(90, 209), false);
|
||||
DrawLilyTop(i, j, glowTex, new Rectangle(0, 0, 192, 206), TileOffset.ToWorldCoordinates(), new Vector2(90, 209), true);
|
||||
TopTexture ??= ModContent.Request<Texture2D>("CalamityMod/Tiles/Crags/Lily/LavaLily2Top");
|
||||
TopGlowTexture ??= ModContent.Request<Texture2D>("CalamityMod/Tiles/Crags/Lily/LavaLily2TopGlow");
|
||||
|
||||
DrawLilyTop(i, j, TopTexture.Value, new Rectangle(0, 0, 192, 206), TileOffset.ToWorldCoordinates(), new Vector2(90, 209), false);
|
||||
DrawLilyTop(i, j, TopGlowTexture.Value, new Rectangle(0, 0, 192, 206), TileOffset.ToWorldCoordinates(), new Vector2(90, 209), true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using ReLogic.Content;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.Enums;
|
||||
@@ -11,6 +12,10 @@ namespace CalamityMod.Tiles.Crags.Lily
|
||||
{
|
||||
public class LavaLily3 : ModTile
|
||||
{
|
||||
public Asset<Texture2D> GlowTexture;
|
||||
public Asset<Texture2D> TopTexture;
|
||||
public Asset<Texture2D> TopGlowTexture;
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.tileFrameImportant[Type] = true;
|
||||
@@ -60,19 +65,19 @@ namespace CalamityMod.Tiles.Crags.Lily
|
||||
if (tile.IsTileActuallyInvisible())
|
||||
return;
|
||||
|
||||
Texture2D tex = ModContent.Request<Texture2D>("CalamityMod/Tiles/Crags/Lily/LavaLily3Glow").Value;
|
||||
GlowTexture ??= ModContent.Request<Texture2D>("CalamityMod/Tiles/Crags/Lily/LavaLily3Glow");
|
||||
Vector2 zero = Main.drawToScreen ? Vector2.Zero : new Vector2(Main.offScreenRange, Main.offScreenRange);
|
||||
|
||||
spriteBatch.Draw(tex, new Vector2(i * 16, j * 16 + 2) - Main.screenPosition + zero, new Rectangle(tile.TileFrameX, tile.TileFrameY, 16, 16), Color.White);
|
||||
|
||||
Texture2D lilyTex = ModContent.Request<Texture2D>("CalamityMod/Tiles/Crags/Lily/LavaLily3Top").Value;
|
||||
Texture2D glowTex = ModContent.Request<Texture2D>("CalamityMod/Tiles/Crags/Lily/LavaLily3TopGlow").Value;
|
||||
spriteBatch.Draw(GlowTexture.Value, new Vector2(i * 16, j * 16 + 2) - Main.screenPosition + zero, new Rectangle(tile.TileFrameX, tile.TileFrameY, 16, 16), Color.White);
|
||||
|
||||
//draw in the middle of the tile so it doesnt draw more than once
|
||||
if (Framing.GetTileSafely(i, j).TileFrameX == 36 && Framing.GetTileSafely(i, j).TileFrameY == 18)
|
||||
{
|
||||
DrawLilyTop(i, j, lilyTex, new Rectangle(0, 0, 178, 198), TileOffset.ToWorldCoordinates(), new Vector2(98, 199), false);
|
||||
DrawLilyTop(i, j, glowTex, new Rectangle(0, 0, 178, 198), TileOffset.ToWorldCoordinates(), new Vector2(98, 199), true);
|
||||
TopTexture ??= ModContent.Request<Texture2D>("CalamityMod/Tiles/Crags/Lily/LavaLily3Top");
|
||||
TopGlowTexture ??= ModContent.Request<Texture2D>("CalamityMod/Tiles/Crags/Lily/LavaLily3TopGlow");
|
||||
|
||||
DrawLilyTop(i, j, TopTexture.Value, new Rectangle(0, 0, 178, 198), TileOffset.ToWorldCoordinates(), new Vector2(98, 199), false);
|
||||
DrawLilyTop(i, j, TopGlowTexture.Value, new Rectangle(0, 0, 178, 198), TileOffset.ToWorldCoordinates(), new Vector2(98, 199), true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using ReLogic.Content;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.Enums;
|
||||
@@ -11,6 +12,10 @@ namespace CalamityMod.Tiles.Crags.Lily
|
||||
{
|
||||
public class LavaLily4 : ModTile
|
||||
{
|
||||
public Asset<Texture2D> GlowTexture;
|
||||
public Asset<Texture2D> TopTexture;
|
||||
public Asset<Texture2D> TopGlowTexture;
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.tileFrameImportant[Type] = true;
|
||||
@@ -60,19 +65,19 @@ namespace CalamityMod.Tiles.Crags.Lily
|
||||
if (tile.IsTileActuallyInvisible())
|
||||
return;
|
||||
|
||||
Texture2D tex = ModContent.Request<Texture2D>("CalamityMod/Tiles/Crags/Lily/LavaLily4Glow").Value;
|
||||
GlowTexture ??= ModContent.Request<Texture2D>("CalamityMod/Tiles/Crags/Lily/LavaLily4Glow");
|
||||
Vector2 zero = Main.drawToScreen ? Vector2.Zero : new Vector2(Main.offScreenRange, Main.offScreenRange);
|
||||
|
||||
spriteBatch.Draw(tex, new Vector2(i * 16, j * 16 + 2) - Main.screenPosition + zero, new Rectangle(tile.TileFrameX, tile.TileFrameY, 16, 16), Color.White);
|
||||
|
||||
Texture2D lilyTex = ModContent.Request<Texture2D>("CalamityMod/Tiles/Crags/Lily/LavaLily4Top").Value;
|
||||
Texture2D glowTex = ModContent.Request<Texture2D>("CalamityMod/Tiles/Crags/Lily/LavaLily4TopGlow").Value;
|
||||
spriteBatch.Draw(GlowTexture.Value, new Vector2(i * 16, j * 16 + 2) - Main.screenPosition + zero, new Rectangle(tile.TileFrameX, tile.TileFrameY, 16, 16), Color.White);
|
||||
|
||||
//draw in the middle of the tile so it doesnt draw more than once
|
||||
if (Framing.GetTileSafely(i, j).TileFrameX == 36 && Framing.GetTileSafely(i, j).TileFrameY == 18)
|
||||
{
|
||||
DrawLilyTop(i, j, lilyTex, new Rectangle(0, 0, 178, 184), TileOffset.ToWorldCoordinates(), new Vector2(96, 191), false);
|
||||
DrawLilyTop(i, j, glowTex, new Rectangle(0, 0, 178, 184), TileOffset.ToWorldCoordinates(), new Vector2(96, 191), true);
|
||||
TopTexture ??= ModContent.Request<Texture2D>("CalamityMod/Tiles/Crags/Lily/LavaLily4Top");
|
||||
TopGlowTexture ??= ModContent.Request<Texture2D>("CalamityMod/Tiles/Crags/Lily/LavaLily4TopGlow");
|
||||
|
||||
DrawLilyTop(i, j, TopTexture.Value, new Rectangle(0, 0, 178, 184), TileOffset.ToWorldCoordinates(), new Vector2(96, 191), false);
|
||||
DrawLilyTop(i, j, TopGlowTexture.Value, new Rectangle(0, 0, 178, 184), TileOffset.ToWorldCoordinates(), new Vector2(96, 191), true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using ReLogic.Content;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.Enums;
|
||||
@@ -11,6 +12,10 @@ namespace CalamityMod.Tiles.Crags.Lily
|
||||
{
|
||||
public class LavaLily5 : ModTile
|
||||
{
|
||||
public Asset<Texture2D> GlowTexture;
|
||||
public Asset<Texture2D> TopTexture;
|
||||
public Asset<Texture2D> TopGlowTexture;
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.tileFrameImportant[Type] = true;
|
||||
@@ -60,19 +65,19 @@ namespace CalamityMod.Tiles.Crags.Lily
|
||||
if (tile.IsTileActuallyInvisible())
|
||||
return;
|
||||
|
||||
Texture2D tex = ModContent.Request<Texture2D>("CalamityMod/Tiles/Crags/Lily/LavaLily5Glow").Value;
|
||||
GlowTexture ??= ModContent.Request<Texture2D>("CalamityMod/Tiles/Crags/Lily/LavaLily5Glow");
|
||||
Vector2 zero = Main.drawToScreen ? Vector2.Zero : new Vector2(Main.offScreenRange, Main.offScreenRange);
|
||||
|
||||
spriteBatch.Draw(tex, new Vector2(i * 16, j * 16 + 2) - Main.screenPosition + zero, new Rectangle(tile.TileFrameX, tile.TileFrameY, 16, 16), Color.White);
|
||||
|
||||
Texture2D lilyTex = ModContent.Request<Texture2D>("CalamityMod/Tiles/Crags/Lily/LavaLily5Top").Value;
|
||||
Texture2D glowTex = ModContent.Request<Texture2D>("CalamityMod/Tiles/Crags/Lily/LavaLily5TopGlow").Value;
|
||||
spriteBatch.Draw(GlowTexture.Value, new Vector2(i * 16, j * 16 + 2) - Main.screenPosition + zero, new Rectangle(tile.TileFrameX, tile.TileFrameY, 16, 16), Color.White);
|
||||
|
||||
//draw in the middle of the tile so it doesnt draw more than once
|
||||
if (Framing.GetTileSafely(i, j).TileFrameX == 36 && Framing.GetTileSafely(i, j).TileFrameY == 18)
|
||||
{
|
||||
DrawLilyTop(i, j, lilyTex, new Rectangle(0, 0, 192, 206), TileOffset.ToWorldCoordinates(), new Vector2(118, 209), false);
|
||||
DrawLilyTop(i, j, glowTex, new Rectangle(0, 0, 192, 206), TileOffset.ToWorldCoordinates(), new Vector2(118, 209), true);
|
||||
TopTexture ??= ModContent.Request<Texture2D>("CalamityMod/Tiles/Crags/Lily/LavaLily5Top");
|
||||
TopGlowTexture ??= ModContent.Request<Texture2D>("CalamityMod/Tiles/Crags/Lily/LavaLily5TopGlow");
|
||||
|
||||
DrawLilyTop(i, j, TopTexture.Value, new Rectangle(0, 0, 192, 206), TileOffset.ToWorldCoordinates(), new Vector2(118, 209), false);
|
||||
DrawLilyTop(i, j, TopGlowTexture.Value, new Rectangle(0, 0, 192, 206), TileOffset.ToWorldCoordinates(), new Vector2(118, 209), true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using ReLogic.Content;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.Enums;
|
||||
@@ -11,6 +12,10 @@ namespace CalamityMod.Tiles.Crags.Lily
|
||||
{
|
||||
public class LavaLily6 : ModTile
|
||||
{
|
||||
public Asset<Texture2D> GlowTexture;
|
||||
public Asset<Texture2D> TopTexture;
|
||||
public Asset<Texture2D> TopGlowTexture;
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.tileFrameImportant[Type] = true;
|
||||
@@ -60,19 +65,19 @@ namespace CalamityMod.Tiles.Crags.Lily
|
||||
if (tile.IsTileActuallyInvisible())
|
||||
return;
|
||||
|
||||
Texture2D tex = ModContent.Request<Texture2D>("CalamityMod/Tiles/Crags/Lily/LavaLily6Glow").Value;
|
||||
GlowTexture ??= ModContent.Request<Texture2D>("CalamityMod/Tiles/Crags/Lily/LavaLily6Glow");
|
||||
Vector2 zero = Main.drawToScreen ? Vector2.Zero : new Vector2(Main.offScreenRange, Main.offScreenRange);
|
||||
|
||||
spriteBatch.Draw(tex, new Vector2(i * 16, j * 16 + 2) - Main.screenPosition + zero, new Rectangle(tile.TileFrameX, tile.TileFrameY, 16, 16), Color.White);
|
||||
|
||||
Texture2D lilyTex = ModContent.Request<Texture2D>("CalamityMod/Tiles/Crags/Lily/LavaLily6Top").Value;
|
||||
Texture2D glowTex = ModContent.Request<Texture2D>("CalamityMod/Tiles/Crags/Lily/LavaLily6TopGlow").Value;
|
||||
spriteBatch.Draw(GlowTexture.Value, new Vector2(i * 16, j * 16 + 2) - Main.screenPosition + zero, new Rectangle(tile.TileFrameX, tile.TileFrameY, 16, 16), Color.White);
|
||||
|
||||
//draw in the middle of the tile so it doesnt draw more than once
|
||||
if (Framing.GetTileSafely(i, j).TileFrameX == 36 && Framing.GetTileSafely(i, j).TileFrameY == 18)
|
||||
{
|
||||
DrawLilyTop(i, j, lilyTex, new Rectangle(0, 0, 178, 198), TileOffset.ToWorldCoordinates(), new Vector2(96, 199), false);
|
||||
DrawLilyTop(i, j, glowTex, new Rectangle(0, 0, 178, 198), TileOffset.ToWorldCoordinates(), new Vector2(96, 199), true);
|
||||
TopTexture ??= ModContent.Request<Texture2D>("CalamityMod/Tiles/Crags/Lily/LavaLily6Top");
|
||||
TopGlowTexture ??= ModContent.Request<Texture2D>("CalamityMod/Tiles/Crags/Lily/LavaLily6TopGlow");
|
||||
|
||||
DrawLilyTop(i, j, TopTexture.Value, new Rectangle(0, 0, 178, 198), TileOffset.ToWorldCoordinates(), new Vector2(96, 199), false);
|
||||
DrawLilyTop(i, j, TopGlowTexture.Value, new Rectangle(0, 0, 178, 198), TileOffset.ToWorldCoordinates(), new Vector2(96, 199), true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
using System.Collections.Generic;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using ReLogic.Content;
|
||||
using Terraria;
|
||||
using Terraria.Audio;
|
||||
using Terraria.ID;
|
||||
@@ -27,6 +28,20 @@ namespace CalamityMod.Tiles.Crags.Tree
|
||||
y-frame 3 = both left and right branch
|
||||
*/
|
||||
|
||||
public Asset<Texture2D> BottomTexture;
|
||||
public Asset<Texture2D> SegmentsTexture;
|
||||
|
||||
public Asset<Texture2D> Rib1LeftTexture;
|
||||
public Asset<Texture2D> Rib1RightTexture;
|
||||
|
||||
public Asset<Texture2D> Rib2LeftTexture;
|
||||
public Asset<Texture2D> Rib2RightTexture;
|
||||
|
||||
public Asset<Texture2D> Rib3LeftTexture;
|
||||
public Asset<Texture2D> Rib3RightTexture;
|
||||
|
||||
public Asset<Texture2D> TopTexture;
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
TileID.Sets.IsATreeTrunk[Type] = true;
|
||||
@@ -310,15 +325,16 @@ namespace CalamityMod.Tiles.Crags.Tree
|
||||
Vector2 treeSegmentOffset = new Vector2((xOff * 2) - (frameOff / 2) + 25, 14);
|
||||
Vector2 topSegmentOffset = new Vector2((xOff * 2) - (frameOff / 2) + 20, 16);
|
||||
|
||||
Texture2D baseTex = ModContent.Request<Texture2D>("CalamityMod/Tiles/Crags/Tree/SpineBottom").Value;
|
||||
Texture2D segmentTex = ModContent.Request<Texture2D>("CalamityMod/Tiles/Crags/Tree/SpineSegments").Value;
|
||||
BottomTexture ??= ModContent.Request<Texture2D>("CalamityMod/Tiles/Crags/Tree/SpineBottom");
|
||||
SegmentsTexture ??= ModContent.Request<Texture2D>("CalamityMod/Tiles/Crags/Tree/SpineSegments");
|
||||
var segmentTex = SegmentsTexture.Value;
|
||||
|
||||
//draw the base of the tree
|
||||
if (Framing.GetTileSafely(i, j).TileFrameX == 0)
|
||||
{
|
||||
int frame = tile.TileFrameY / 18;
|
||||
|
||||
DrawTreeSegments(i, j, baseTex, new Rectangle(34 * frame, 0, 32, 20), TileOffset.ToWorldCoordinates(), baseSegmentOffset, false);
|
||||
DrawTreeSegments(i, j, BottomTexture.Value, new Rectangle(34 * frame, 0, 32, 20), TileOffset.ToWorldCoordinates(), baseSegmentOffset, false);
|
||||
}
|
||||
|
||||
//draw the different segments of the tree
|
||||
@@ -335,8 +351,8 @@ namespace CalamityMod.Tiles.Crags.Tree
|
||||
int frame = tile.TileFrameY / 18;
|
||||
|
||||
//branch drawing stuff
|
||||
Texture2D leftBranchTex = ModContent.Request<Texture2D>("CalamityMod/Tiles/Crags/Tree/SpineRib1Left").Value;
|
||||
Texture2D rightBranchTex = ModContent.Request<Texture2D>("CalamityMod/Tiles/Crags/Tree/SpineRib1Right").Value;
|
||||
Rib1LeftTexture ??= ModContent.Request<Texture2D>("CalamityMod/Tiles/Crags/Tree/SpineRib1Left");
|
||||
Rib1RightTexture ??= ModContent.Request<Texture2D>("CalamityMod/Tiles/Crags/Tree/SpineRib1Right");
|
||||
|
||||
Vector2 leftBranchOffset = new Vector2((xOff * 2) - (frameOff / 2) + 50, 14);
|
||||
Vector2 rightBranchOffset = new Vector2((xOff * 2) - (frameOff / 2) + 4, 14);
|
||||
@@ -344,8 +360,8 @@ namespace CalamityMod.Tiles.Crags.Tree
|
||||
//ok so, terraria just does not want to cooperate when i draw a single branch texture on the side of the tree segments
|
||||
//i changed them into a horitonzal sheet with blanks in it so it gives the illusion of branches being random
|
||||
//not a good idea if branches are meant to be separate tiles, but here they are purely visual so it doesnt matter
|
||||
DrawTreeSegments(i, j, leftBranchTex, new Rectangle(38 * frame, 0, 38, 40), TileOffset.ToWorldCoordinates(), leftBranchOffset, false);
|
||||
DrawTreeSegments(i, j, rightBranchTex, new Rectangle(38 * frame, 0, 38, 40), TileOffset.ToWorldCoordinates(), rightBranchOffset, false);
|
||||
DrawTreeSegments(i, j, Rib1LeftTexture.Value, new Rectangle(38 * frame, 0, 38, 40), TileOffset.ToWorldCoordinates(), leftBranchOffset, false);
|
||||
DrawTreeSegments(i, j, Rib1RightTexture.Value, new Rectangle(38 * frame, 0, 38, 40), TileOffset.ToWorldCoordinates(), rightBranchOffset, false);
|
||||
|
||||
//draw segments
|
||||
DrawTreeSegments(i, j, segmentTex, new Rectangle(34 * frame, 0, 32, 20), TileOffset.ToWorldCoordinates(), treeSegmentOffset, false);
|
||||
@@ -357,14 +373,14 @@ namespace CalamityMod.Tiles.Crags.Tree
|
||||
int frame = tile.TileFrameY / 18;
|
||||
|
||||
//branch drawing stuff
|
||||
Texture2D leftBranchTex = ModContent.Request<Texture2D>("CalamityMod/Tiles/Crags/Tree/SpineRib2Left").Value;
|
||||
Texture2D rightBranchTex = ModContent.Request<Texture2D>("CalamityMod/Tiles/Crags/Tree/SpineRib2Right").Value;
|
||||
Rib2LeftTexture ??= ModContent.Request<Texture2D>("CalamityMod/Tiles/Crags/Tree/SpineRib2Left");
|
||||
Rib2RightTexture ??= ModContent.Request<Texture2D>("CalamityMod/Tiles/Crags/Tree/SpineRib2Right");
|
||||
|
||||
Vector2 leftBranchOffset = new Vector2((xOff * 2) - (frameOff / 2) + 60, 14);
|
||||
Vector2 rightBranchOffset = new Vector2((xOff * 2) - (frameOff / 2) + 4, 14);
|
||||
|
||||
DrawTreeSegments(i, j, leftBranchTex, new Rectangle(50 * frame, 0, 50, 54), TileOffset.ToWorldCoordinates(), leftBranchOffset, false);
|
||||
DrawTreeSegments(i, j, rightBranchTex, new Rectangle(50 * frame, 0, 50, 54), TileOffset.ToWorldCoordinates(), rightBranchOffset, false);
|
||||
DrawTreeSegments(i, j, Rib2LeftTexture.Value, new Rectangle(50 * frame, 0, 50, 54), TileOffset.ToWorldCoordinates(), leftBranchOffset, false);
|
||||
DrawTreeSegments(i, j, Rib2RightTexture.Value, new Rectangle(50 * frame, 0, 50, 54), TileOffset.ToWorldCoordinates(), rightBranchOffset, false);
|
||||
|
||||
//draw segments
|
||||
DrawTreeSegments(i, j, segmentTex, new Rectangle(34 * frame, 0, 32, 20), TileOffset.ToWorldCoordinates(), treeSegmentOffset, false);
|
||||
@@ -376,14 +392,14 @@ namespace CalamityMod.Tiles.Crags.Tree
|
||||
int frame = tile.TileFrameY / 18;
|
||||
|
||||
//branch drawing stuff
|
||||
Texture2D leftBranchTex = ModContent.Request<Texture2D>("CalamityMod/Tiles/Crags/Tree/SpineRib3Left").Value;
|
||||
Texture2D rightBranchTex = ModContent.Request<Texture2D>("CalamityMod/Tiles/Crags/Tree/SpineRib3Right").Value;
|
||||
Rib3LeftTexture ??= ModContent.Request<Texture2D>("CalamityMod/Tiles/Crags/Tree/SpineRib3Left");
|
||||
Rib3RightTexture ??= ModContent.Request<Texture2D>("CalamityMod/Tiles/Crags/Tree/SpineRib3Right");
|
||||
|
||||
Vector2 leftBranchOffset = new Vector2((xOff * 2) - (frameOff / 2) + 75, 14);
|
||||
Vector2 rightBranchOffset = new Vector2((xOff * 2) - (frameOff / 2) + 4, 14);
|
||||
|
||||
DrawTreeSegments(i, j, leftBranchTex, new Rectangle(62 * frame, 0, 62, 60), TileOffset.ToWorldCoordinates(), leftBranchOffset, false);
|
||||
DrawTreeSegments(i, j, rightBranchTex, new Rectangle(62 * frame, 0, 62, 60), TileOffset.ToWorldCoordinates(), rightBranchOffset, false);
|
||||
DrawTreeSegments(i, j, Rib3LeftTexture.Value, new Rectangle(62 * frame, 0, 62, 60), TileOffset.ToWorldCoordinates(), leftBranchOffset, false);
|
||||
DrawTreeSegments(i, j, Rib3RightTexture.Value, new Rectangle(62 * frame, 0, 62, 60), TileOffset.ToWorldCoordinates(), rightBranchOffset, false);
|
||||
|
||||
//draw segments
|
||||
DrawTreeSegments(i, j, segmentTex, new Rectangle(34 * frame, 0, 32, 20), TileOffset.ToWorldCoordinates(), treeSegmentOffset, false);
|
||||
@@ -392,10 +408,10 @@ namespace CalamityMod.Tiles.Crags.Tree
|
||||
//draw top segment
|
||||
if (Framing.GetTileSafely(i, j).TileFrameX == 36)
|
||||
{
|
||||
Texture2D topTex = ModContent.Request<Texture2D>("CalamityMod/Tiles/Crags/Tree/SpineTop").Value;
|
||||
TopTexture ??= ModContent.Request<Texture2D>("CalamityMod/Tiles/Crags/Tree/SpineTop");
|
||||
int frame = tile.TileFrameY / 18;
|
||||
|
||||
DrawTreeSegments(i, j - 1, topTex, new Rectangle(26 * frame, 0, 24, 24), TileOffset.ToWorldCoordinates(), topSegmentOffset, false);
|
||||
DrawTreeSegments(i, j - 1, TopTexture.Value, new Rectangle(26 * frame, 0, 24, 24), TileOffset.ToWorldCoordinates(), topSegmentOffset, false);
|
||||
|
||||
//draw segments
|
||||
DrawTreeSegments(i, j, segmentTex, new Rectangle(34 * frame, 0, 32, 20), TileOffset.ToWorldCoordinates(), treeSegmentOffset, false);
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
using CalamityMod.Items.Placeables.DraedonStructures;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using ReLogic.Content;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.Enums;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
using Terraria.ObjectData;
|
||||
|
||||
@@ -13,6 +11,8 @@ namespace CalamityMod.Tiles.DraedonStructures
|
||||
{
|
||||
public class AgedLaboratoryConsole : ModTile
|
||||
{
|
||||
public Asset<Texture2D> GlowTexture;
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.tileLighted[Type] = true;
|
||||
@@ -58,15 +58,15 @@ namespace CalamityMod.Tiles.DraedonStructures
|
||||
|
||||
int xFrameOffset = Main.tile[i, j].TileFrameX;
|
||||
int yFrameOffset = Main.tile[i, j].TileFrameY;
|
||||
Texture2D glowmask = ModContent.Request<Texture2D>("CalamityMod/Tiles/DraedonStructures/AgedLaboratoryConsoleGlow").Value;
|
||||
GlowTexture ??= ModContent.Request<Texture2D>("CalamityMod/Tiles/DraedonStructures/AgedLaboratoryConsoleGlow");
|
||||
Vector2 drawOffest = Main.drawToScreen ? Vector2.Zero : new Vector2(Main.offScreenRange);
|
||||
Vector2 drawPosition = new Vector2(i * 16 - Main.screenPosition.X, j * 16 - Main.screenPosition.Y) + drawOffest;
|
||||
Color drawColour = Color.White;
|
||||
Tile trackTile = Main.tile[i, j];
|
||||
if (!trackTile.IsHalfBlock && trackTile.Slope == 0)
|
||||
spriteBatch.Draw(glowmask, drawPosition, new Rectangle(xFrameOffset, yFrameOffset, 18, 18), drawColour, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f);
|
||||
spriteBatch.Draw(GlowTexture.Value, drawPosition, new Rectangle(xFrameOffset, yFrameOffset, 18, 18), drawColour, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f);
|
||||
else if (trackTile.IsHalfBlock)
|
||||
spriteBatch.Draw(glowmask, drawPosition + new Vector2(0f, 8f), new Rectangle(xFrameOffset, yFrameOffset, 18, 8), drawColour, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f);
|
||||
spriteBatch.Draw(GlowTexture.Value, drawPosition + new Vector2(0f, 8f), new Rectangle(xFrameOffset, yFrameOffset, 18, 8), drawColour, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,11 +1,10 @@
|
||||
using CalamityMod.Items.Placeables.DraedonStructures;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using ReLogic.Content;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.Enums;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
using Terraria.ObjectData;
|
||||
|
||||
@@ -13,6 +12,8 @@ namespace CalamityMod.Tiles.DraedonStructures
|
||||
{
|
||||
public class AgedLaboratoryDisplay : ModTile
|
||||
{
|
||||
public Asset<Texture2D> GlowTexture;
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.tileLighted[Type] = true;
|
||||
@@ -51,15 +52,15 @@ namespace CalamityMod.Tiles.DraedonStructures
|
||||
|
||||
int xFrameOffset = Main.tile[i, j].TileFrameX;
|
||||
int yFrameOffset = Main.tile[i, j].TileFrameY;
|
||||
Texture2D glowmask = ModContent.Request<Texture2D>("CalamityMod/Tiles/DraedonStructures/AgedLaboratoryDisplayGlow").Value;
|
||||
GlowTexture ??= ModContent.Request<Texture2D>("CalamityMod/Tiles/DraedonStructures/AgedLaboratoryDisplayGlow");
|
||||
Vector2 drawOffest = Main.drawToScreen ? Vector2.Zero : new Vector2(Main.offScreenRange);
|
||||
Vector2 drawPosition = new Vector2(i * 16 - Main.screenPosition.X, j * 16 - Main.screenPosition.Y) + drawOffest;
|
||||
Color drawColour = Color.White;
|
||||
Tile trackTile = Main.tile[i, j];
|
||||
if (!trackTile.IsHalfBlock && trackTile.Slope == 0)
|
||||
spriteBatch.Draw(glowmask, drawPosition, new Rectangle(xFrameOffset, yFrameOffset, 18, 18), drawColour, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f);
|
||||
spriteBatch.Draw(GlowTexture.Value, drawPosition, new Rectangle(xFrameOffset, yFrameOffset, 18, 18), drawColour, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f);
|
||||
else if (trackTile.IsHalfBlock)
|
||||
spriteBatch.Draw(glowmask, drawPosition + new Vector2(0f, 8f), new Rectangle(xFrameOffset, yFrameOffset, 18, 8), drawColour, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f);
|
||||
spriteBatch.Draw(GlowTexture.Value, drawPosition + new Vector2(0f, 8f), new Rectangle(xFrameOffset, yFrameOffset, 18, 8), drawColour, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,10 +1,8 @@
|
||||
using CalamityMod.Items.Placeables.DraedonStructures;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using ReLogic.Content;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
using Terraria.ObjectData;
|
||||
|
||||
@@ -12,6 +10,8 @@ namespace CalamityMod.Tiles.DraedonStructures
|
||||
{
|
||||
public class AgedLaboratoryScreen : ModTile
|
||||
{
|
||||
public Asset<Texture2D> GlowTexture;
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.tileFrameImportant[Type] = true;
|
||||
@@ -41,15 +41,15 @@ namespace CalamityMod.Tiles.DraedonStructures
|
||||
|
||||
int xFrameOffset = Main.tile[i, j].TileFrameX;
|
||||
int yFrameOffset = Main.tile[i, j].TileFrameY;
|
||||
Texture2D glowmask = ModContent.Request<Texture2D>("CalamityMod/Tiles/DraedonStructures/AgedLaboratoryScreenGlow").Value;
|
||||
GlowTexture ??= ModContent.Request<Texture2D>("CalamityMod/Tiles/DraedonStructures/AgedLaboratoryScreenGlow");
|
||||
Vector2 drawOffest = Main.drawToScreen ? Vector2.Zero : new Vector2(Main.offScreenRange);
|
||||
Vector2 drawPosition = new Vector2(i * 16 - Main.screenPosition.X, j * 16 - Main.screenPosition.Y) + drawOffest;
|
||||
Color drawColour = Color.White;
|
||||
Tile trackTile = Main.tile[i, j];
|
||||
if (!trackTile.IsHalfBlock && trackTile.Slope == 0)
|
||||
spriteBatch.Draw(glowmask, drawPosition, new Rectangle(xFrameOffset, yFrameOffset, 18, 18), drawColour, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f);
|
||||
spriteBatch.Draw(GlowTexture.Value, drawPosition, new Rectangle(xFrameOffset, yFrameOffset, 18, 18), drawColour, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f);
|
||||
else if (trackTile.IsHalfBlock)
|
||||
spriteBatch.Draw(glowmask, drawPosition + new Vector2(0f, 8f), new Rectangle(xFrameOffset, yFrameOffset, 18, 8), drawColour, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f);
|
||||
spriteBatch.Draw(GlowTexture.Value, drawPosition + new Vector2(0f, 8f), new Rectangle(xFrameOffset, yFrameOffset, 18, 8), drawColour, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,11 +1,9 @@
|
||||
using CalamityMod.Items.Placeables.DraedonStructures;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using ReLogic.Content;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.Enums;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
using Terraria.ObjectData;
|
||||
|
||||
@@ -13,6 +11,8 @@ namespace CalamityMod.Tiles.DraedonStructures
|
||||
{
|
||||
public class AgedLaboratoryServer : ModTile
|
||||
{
|
||||
public Asset<Texture2D> GlowTexture;
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.tileLighted[Type] = true;
|
||||
@@ -58,15 +58,15 @@ namespace CalamityMod.Tiles.DraedonStructures
|
||||
|
||||
int xFrameOffset = Main.tile[i, j].TileFrameX;
|
||||
int yFrameOffset = Main.tile[i, j].TileFrameY;
|
||||
Texture2D glowmask = ModContent.Request<Texture2D>("CalamityMod/Tiles/DraedonStructures/AgedLaboratoryServerGlow").Value;
|
||||
GlowTexture ??= ModContent.Request<Texture2D>("CalamityMod/Tiles/DraedonStructures/AgedLaboratoryServerGlow");
|
||||
Vector2 drawOffest = Main.drawToScreen ? Vector2.Zero : new Vector2(Main.offScreenRange);
|
||||
Vector2 drawPosition = new Vector2(i * 16 - Main.screenPosition.X, j * 16 - Main.screenPosition.Y) + drawOffest;
|
||||
Color drawColour = Color.White;
|
||||
Tile trackTile = Main.tile[i, j];
|
||||
if (!trackTile.IsHalfBlock && trackTile.Slope == 0)
|
||||
spriteBatch.Draw(glowmask, drawPosition, new Rectangle(xFrameOffset, yFrameOffset, 18, 18), drawColour, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f);
|
||||
spriteBatch.Draw(GlowTexture.Value, drawPosition, new Rectangle(xFrameOffset, yFrameOffset, 18, 18), drawColour, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f);
|
||||
else if (trackTile.IsHalfBlock)
|
||||
spriteBatch.Draw(glowmask, drawPosition + new Vector2(0f, 8f), new Rectangle(xFrameOffset, yFrameOffset, 18, 8), drawColour, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f);
|
||||
spriteBatch.Draw(GlowTexture.Value, drawPosition + new Vector2(0f, 8f), new Rectangle(xFrameOffset, yFrameOffset, 18, 8), drawColour, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,10 +1,8 @@
|
||||
using CalamityMod.Items.Placeables.DraedonStructures;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using ReLogic.Content;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
using Terraria.ObjectData;
|
||||
|
||||
@@ -12,6 +10,8 @@ namespace CalamityMod.Tiles.DraedonStructures
|
||||
{
|
||||
public class AgedReinforcedCrate : ModTile
|
||||
{
|
||||
public Asset<Texture2D> GlowTexture;
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.tileLighted[Type] = true;
|
||||
@@ -47,15 +47,15 @@ namespace CalamityMod.Tiles.DraedonStructures
|
||||
|
||||
int xFrameOffset = Main.tile[i, j].TileFrameX;
|
||||
int yFrameOffset = Main.tile[i, j].TileFrameY;
|
||||
Texture2D glowmask = ModContent.Request<Texture2D>("CalamityMod/Tiles/DraedonStructures/AgedReinforcedCrateGlow").Value;
|
||||
GlowTexture ??= ModContent.Request<Texture2D>("CalamityMod/Tiles/DraedonStructures/AgedReinforcedCrateGlow");
|
||||
Vector2 drawOffest = Main.drawToScreen ? Vector2.Zero : new Vector2(Main.offScreenRange);
|
||||
Vector2 drawPosition = new Vector2(i * 16 - Main.screenPosition.X, j * 16 - Main.screenPosition.Y) + drawOffest;
|
||||
Color drawColour = Color.White;
|
||||
Tile trackTile = Main.tile[i, j];
|
||||
if (!trackTile.IsHalfBlock && trackTile.Slope == 0)
|
||||
spriteBatch.Draw(glowmask, drawPosition, new Rectangle(xFrameOffset, yFrameOffset, 18, 18), drawColour, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f);
|
||||
spriteBatch.Draw(GlowTexture.Value, drawPosition, new Rectangle(xFrameOffset, yFrameOffset, 18, 18), drawColour, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f);
|
||||
else if (trackTile.IsHalfBlock)
|
||||
spriteBatch.Draw(glowmask, drawPosition + new Vector2(0f, 8f), new Rectangle(xFrameOffset, yFrameOffset, 18, 8), drawColour, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f);
|
||||
spriteBatch.Draw(GlowTexture.Value, drawPosition + new Vector2(0f, 8f), new Rectangle(xFrameOffset, yFrameOffset, 18, 8), drawColour, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,21 +1,21 @@
|
||||
using System;
|
||||
using CalamityMod.Items.Placeables.DraedonStructures.CagedLights;
|
||||
using CalamityMod.Items.Placeables.DraedonStructures.CagedLights;
|
||||
using CalamityMod.Sounds;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using ReLogic.Content;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.Enums;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using Terraria.ObjectData;
|
||||
using Terraria.Audio;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using CalamityMod.Sounds;
|
||||
|
||||
namespace CalamityMod.Tiles.DraedonStructures.CagedLights
|
||||
{
|
||||
public class AgedLablight : ModTile
|
||||
{
|
||||
public Asset<Texture2D> GlowTexture;
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.tileLighted[Type] = true;
|
||||
@@ -33,7 +33,7 @@ namespace CalamityMod.Tiles.DraedonStructures.CagedLights
|
||||
|
||||
// Attach to ground
|
||||
TileObjectData.newTile.CopyFrom(TileObjectData.Style2x2);
|
||||
TileObjectData.newTile.StyleHorizontal = true;
|
||||
TileObjectData.newTile.StyleHorizontal = true;
|
||||
TileObjectData.newTile.StyleMultiplier = 10; // total 10 frames, all should be same "itemStyle"
|
||||
TileObjectData.newTile.StyleWrapLimit = 2; // only 1 placement alternative per row
|
||||
TileObjectData.newTile.Origin = new Point16(0, 1);
|
||||
@@ -87,7 +87,10 @@ namespace CalamityMod.Tiles.DraedonStructures.CagedLights
|
||||
|
||||
int xFrameOffset = Main.tile[i, j].TileFrameX;
|
||||
int yFrameOffset = Main.tile[i, j].TileFrameY;
|
||||
Texture2D glowmask = ModContent.Request<Texture2D>("CalamityMod/Tiles/DraedonStructures/CagedLights/AgedLablight_Glow").Value;
|
||||
|
||||
GlowTexture ??= ModContent.Request<Texture2D>("CalamityMod/Tiles/DraedonStructures/CagedLights/AgedLablight_Glow");
|
||||
Texture2D glowmask = GlowTexture.Value;
|
||||
|
||||
Vector2 drawOffest = Main.drawToScreen ? Vector2.Zero : new Vector2(Main.offScreenRange);
|
||||
Vector2 drawPosition = new Vector2(i * 16 - Main.screenPosition.X, j * 16 - Main.screenPosition.Y) + drawOffest;
|
||||
Color drawColour = Color.White * 0.6f;
|
||||
@@ -97,6 +100,5 @@ namespace CalamityMod.Tiles.DraedonStructures.CagedLights
|
||||
else if (trackTile.IsHalfBlock)
|
||||
spriteBatch.Draw(glowmask, drawPosition + new Vector2(0f, 8f), new Rectangle(xFrameOffset, yFrameOffset, 18, 8), drawColour, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,21 +1,21 @@
|
||||
using System;
|
||||
using CalamityMod.Items.Placeables.DraedonStructures.CagedLights;
|
||||
using CalamityMod.Items.Placeables.DraedonStructures.CagedLights;
|
||||
using CalamityMod.Sounds;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using ReLogic.Content;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.Enums;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using Terraria.ObjectData;
|
||||
using Terraria.Audio;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using CalamityMod.Sounds;
|
||||
|
||||
namespace CalamityMod.Tiles.DraedonStructures.CagedLights
|
||||
{
|
||||
public class MiniAgedLablight : ModTile
|
||||
{
|
||||
public Asset<Texture2D> GlowTexture;
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.tileLighted[Type] = true;
|
||||
@@ -86,7 +86,10 @@ namespace CalamityMod.Tiles.DraedonStructures.CagedLights
|
||||
|
||||
int xFrameOffset = Main.tile[i, j].TileFrameX;
|
||||
int yFrameOffset = Main.tile[i, j].TileFrameY;
|
||||
Texture2D glowmask = ModContent.Request<Texture2D>("CalamityMod/Tiles/DraedonStructures/CagedLights/MiniAgedLablight_Glow").Value;
|
||||
|
||||
GlowTexture ??= ModContent.Request<Texture2D>("CalamityMod/Tiles/DraedonStructures/CagedLights/MiniAgedLablight_Glow");
|
||||
Texture2D glowmask = GlowTexture.Value;
|
||||
|
||||
Vector2 drawOffest = Main.drawToScreen ? Vector2.Zero : new Vector2(Main.offScreenRange);
|
||||
Vector2 drawPosition = new Vector2(i * 16 - Main.screenPosition.X, j * 16 - Main.screenPosition.Y) + drawOffest;
|
||||
Color drawColour = Color.White * 0.6f;
|
||||
|
||||
@@ -4,12 +4,12 @@ using CalamityMod.Items.Placeables.DraedonStructures;
|
||||
using CalamityMod.TileEntities;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using ReLogic.Content;
|
||||
using Terraria;
|
||||
using Terraria.Audio;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.GameContent.ObjectInteractions;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
using Terraria.ObjectData;
|
||||
|
||||
@@ -27,6 +27,8 @@ namespace CalamityMod.Tiles.DraedonStructures
|
||||
// One cell of charge is placed into the weapon on a timer of this many frames.
|
||||
public const int FramesPerChargeAction = 8;
|
||||
|
||||
public Asset<Texture2D> GlowTexture;
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.tileLighted[Type] = true;
|
||||
@@ -122,15 +124,15 @@ namespace CalamityMod.Tiles.DraedonStructures
|
||||
// Grab the tile entity because its glowmask depends on whether it's currently charging.
|
||||
TEChargingStation charger = CalamityUtils.FindTileEntity<TEChargingStation>(i, j, Width, Height, SheetSquare);
|
||||
|
||||
Texture2D glowmask = ModContent.Request<Texture2D>("CalamityMod/Tiles/DraedonStructures/ChargingStation_Glow").Value;
|
||||
GlowTexture ??= ModContent.Request<Texture2D>("CalamityMod/Tiles/DraedonStructures/ChargingStation_Glow");
|
||||
Vector2 screenOffset = Main.drawToScreen ? Vector2.Zero : new Vector2(Main.offScreenRange);
|
||||
Vector2 drawOffset = new Vector2(i * 16 - Main.screenPosition.X, j * 16 - Main.screenPosition.Y) + screenOffset;
|
||||
Color drawColor = charger?.LightColor ?? Color.Red;
|
||||
|
||||
if (!t.IsHalfBlock && t.Slope == 0)
|
||||
Main.spriteBatch.Draw(glowmask, drawOffset, new Rectangle?(new Rectangle(xFrame, yFrame, 18, 18)), drawColor, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f);
|
||||
Main.spriteBatch.Draw(GlowTexture.Value, drawOffset, new Rectangle?(new Rectangle(xFrame, yFrame, 18, 18)), drawColor, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f);
|
||||
else if (t.IsHalfBlock)
|
||||
Main.spriteBatch.Draw(glowmask, drawOffset + new Vector2(0f, 8f), new Rectangle?(new Rectangle(xFrame, yFrame, 18, 8)), drawColor, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f);
|
||||
Main.spriteBatch.Draw(GlowTexture.Value, drawOffset + new Vector2(0f, 8f), new Rectangle?(new Rectangle(xFrame, yFrame, 18, 8)), drawColor, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3,6 +3,7 @@ using CalamityMod.Items.Materials;
|
||||
using CalamityMod.TileEntities;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using ReLogic.Content;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.GameContent.ObjectInteractions;
|
||||
@@ -21,6 +22,8 @@ namespace CalamityMod.Tiles.DraedonStructures
|
||||
public const int OriginOffsetY = 1;
|
||||
public const int SheetSquare = 18;
|
||||
|
||||
public Asset<Texture2D> GlowTexture;
|
||||
|
||||
public override string Texture => "CalamityMod/Tiles/PlayerTurrets/PlayerLabTurret";
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
@@ -99,7 +102,9 @@ namespace CalamityMod.Tiles.DraedonStructures
|
||||
drawColor.B = 50;
|
||||
}
|
||||
|
||||
Texture2D tex = ModContent.Request<Texture2D>("CalamityMod/Projectiles/DraedonsArsenal/PulseTurret").Value;
|
||||
GlowTexture ??= ModContent.Request<Texture2D>("CalamityMod/Projectiles/DraedonsArsenal/PulseTurret");
|
||||
Texture2D tex = GlowTexture.Value;
|
||||
|
||||
Vector2 screenOffset = Main.drawToScreen ? Vector2.Zero : new Vector2(Main.offScreenRange);
|
||||
Vector2 drawOffset = new Vector2(i * 16 - Main.screenPosition.X, j * 16 - Main.screenPosition.Y) + screenOffset;
|
||||
drawOffset.Y -= 2f;
|
||||
|
||||
@@ -3,6 +3,7 @@ using CalamityMod.Items.Materials;
|
||||
using CalamityMod.TileEntities;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using ReLogic.Content;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.GameContent.ObjectInteractions;
|
||||
@@ -21,6 +22,8 @@ namespace CalamityMod.Tiles.DraedonStructures
|
||||
public const int OriginOffsetY = 1;
|
||||
public const int SheetSquare = 18;
|
||||
|
||||
public Asset<Texture2D> GlowTexture;
|
||||
|
||||
public override string Texture => "CalamityMod/Tiles/PlayerTurrets/PlayerFireTurret";
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
@@ -93,7 +96,9 @@ namespace CalamityMod.Tiles.DraedonStructures
|
||||
drawColor.B = 50;
|
||||
}
|
||||
|
||||
Texture2D tex = ModContent.Request<Texture2D>("CalamityMod/Tiles/PlayerTurrets/FireTurretHead").Value;
|
||||
GlowTexture ??= ModContent.Request<Texture2D>("CalamityMod/Tiles/PlayerTurrets/FireTurretHead");
|
||||
Texture2D tex = GlowTexture.Value;
|
||||
|
||||
Vector2 screenOffset = Main.drawToScreen ? Vector2.Zero : new Vector2(Main.offScreenRange);
|
||||
Vector2 drawOffset = new Vector2(i * 16 - Main.screenPosition.X, j * 16 - Main.screenPosition.Y) + screenOffset;
|
||||
drawOffset.Y -= 2f;
|
||||
|
||||
@@ -3,6 +3,7 @@ using CalamityMod.Items.Materials;
|
||||
using CalamityMod.TileEntities;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using ReLogic.Content;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.GameContent.ObjectInteractions;
|
||||
@@ -21,6 +22,8 @@ namespace CalamityMod.Tiles.DraedonStructures
|
||||
public const int OriginOffsetY = 1;
|
||||
public const int SheetSquare = 18;
|
||||
|
||||
public Asset<Texture2D> GlowTexture;
|
||||
|
||||
public override string Texture => "CalamityMod/Tiles/PlayerTurrets/PlayerIceTurret";
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
@@ -93,7 +96,9 @@ namespace CalamityMod.Tiles.DraedonStructures
|
||||
drawColor.B = 50;
|
||||
}
|
||||
|
||||
Texture2D tex = ModContent.Request<Texture2D>("CalamityMod/Tiles/PlayerTurrets/IceTurretHead").Value;
|
||||
GlowTexture ??= ModContent.Request<Texture2D>("CalamityMod/Tiles/PlayerTurrets/IceTurretHead");
|
||||
Texture2D tex = GlowTexture.Value;
|
||||
|
||||
Vector2 screenOffset = Main.drawToScreen ? Vector2.Zero : new Vector2(Main.offScreenRange);
|
||||
Vector2 drawOffset = new Vector2(i * 16 - Main.screenPosition.X, j * 16 - Main.screenPosition.Y) + screenOffset;
|
||||
drawOffset.Y -= 2f;
|
||||
|
||||
@@ -3,6 +3,7 @@ using CalamityMod.Items.Materials;
|
||||
using CalamityMod.TileEntities;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using ReLogic.Content;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.GameContent.ObjectInteractions;
|
||||
@@ -21,6 +22,8 @@ namespace CalamityMod.Tiles.DraedonStructures
|
||||
public const int OriginOffsetY = 1;
|
||||
public const int SheetSquare = 18;
|
||||
|
||||
public Asset<Texture2D> GlowTexture;
|
||||
|
||||
public override string Texture => "CalamityMod/Tiles/PlayerTurrets/PlayerLaserTurret";
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
@@ -93,7 +96,9 @@ namespace CalamityMod.Tiles.DraedonStructures
|
||||
drawColor.B = 50;
|
||||
}
|
||||
|
||||
Texture2D tex = ModContent.Request<Texture2D>("CalamityMod/Tiles/PlayerTurrets/LaserTurretHead").Value;
|
||||
GlowTexture ??= ModContent.Request<Texture2D>("CalamityMod/Tiles/PlayerTurrets/LaserTurretHead");
|
||||
Texture2D tex = GlowTexture.Value;
|
||||
|
||||
Vector2 screenOffset = Main.drawToScreen ? Vector2.Zero : new Vector2(Main.offScreenRange);
|
||||
Vector2 drawOffset = new Vector2(i * 16 - Main.screenPosition.X, j * 16 - Main.screenPosition.Y) + screenOffset;
|
||||
drawOffset.Y -= 2f;
|
||||
|
||||
@@ -3,6 +3,7 @@ using CalamityMod.Items.Materials;
|
||||
using CalamityMod.TileEntities;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using ReLogic.Content;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.GameContent.ObjectInteractions;
|
||||
@@ -21,6 +22,8 @@ namespace CalamityMod.Tiles.DraedonStructures
|
||||
public const int OriginOffsetY = 1;
|
||||
public const int SheetSquare = 18;
|
||||
|
||||
public Asset<Texture2D> GlowTexture;
|
||||
|
||||
public override string Texture => "CalamityMod/Tiles/PlayerTurrets/PlayerOnyxTurret";
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
@@ -93,7 +96,9 @@ namespace CalamityMod.Tiles.DraedonStructures
|
||||
drawColor.B = 50;
|
||||
}
|
||||
|
||||
Texture2D tex = ModContent.Request<Texture2D>("CalamityMod/Tiles/PlayerTurrets/OnyxTurretHead").Value;
|
||||
GlowTexture ??= ModContent.Request<Texture2D>("CalamityMod/Tiles/PlayerTurrets/OnyxTurretHead");
|
||||
Texture2D tex = GlowTexture.Value;
|
||||
|
||||
Vector2 screenOffset = Main.drawToScreen ? Vector2.Zero : new Vector2(Main.offScreenRange);
|
||||
Vector2 drawOffset = new Vector2(i * 16 - Main.screenPosition.X, j * 16 - Main.screenPosition.Y) + screenOffset;
|
||||
drawOffset.Y -= 2f;
|
||||
|
||||
@@ -3,6 +3,7 @@ using CalamityMod.Items.Materials;
|
||||
using CalamityMod.TileEntities;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using ReLogic.Content;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.GameContent.ObjectInteractions;
|
||||
@@ -21,6 +22,8 @@ namespace CalamityMod.Tiles.DraedonStructures
|
||||
public const int OriginOffsetY = 1;
|
||||
public const int SheetSquare = 18;
|
||||
|
||||
public Asset<Texture2D> GlowTexture;
|
||||
|
||||
public override string Texture => "CalamityMod/Tiles/PlayerTurrets/PlayerPlagueTurret";
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
@@ -93,7 +96,9 @@ namespace CalamityMod.Tiles.DraedonStructures
|
||||
drawColor.B = 50;
|
||||
}
|
||||
|
||||
Texture2D tex = ModContent.Request<Texture2D>("CalamityMod/Tiles/PlayerTurrets/PlagueTurretHead").Value;
|
||||
GlowTexture ??= ModContent.Request<Texture2D>("CalamityMod/Tiles/PlayerTurrets/PlagueTurretHead");
|
||||
Texture2D tex = GlowTexture.Value;
|
||||
|
||||
Vector2 screenOffset = Main.drawToScreen ? Vector2.Zero : new Vector2(Main.offScreenRange);
|
||||
Vector2 drawOffset = new Vector2(i * 16 - Main.screenPosition.X, j * 16 - Main.screenPosition.Y) + screenOffset;
|
||||
drawOffset.Y -= 2f;
|
||||
|
||||
@@ -3,6 +3,7 @@ using CalamityMod.Items.Materials;
|
||||
using CalamityMod.TileEntities;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using ReLogic.Content;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.GameContent.ObjectInteractions;
|
||||
@@ -21,6 +22,8 @@ namespace CalamityMod.Tiles.DraedonStructures
|
||||
public const int OriginOffsetY = 1;
|
||||
public const int SheetSquare = 18;
|
||||
|
||||
public Asset<Texture2D> GlowTexture;
|
||||
|
||||
public override string Texture => "CalamityMod/Tiles/PlayerTurrets/PlayerWaterTurret";
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
@@ -93,7 +96,9 @@ namespace CalamityMod.Tiles.DraedonStructures
|
||||
drawColor.B = 50;
|
||||
}
|
||||
|
||||
Texture2D tex = ModContent.Request<Texture2D>("CalamityMod/Tiles/PlayerTurrets/WaterTurretHead").Value;
|
||||
GlowTexture ??= ModContent.Request<Texture2D>("CalamityMod/Tiles/PlayerTurrets/WaterTurretHead");
|
||||
Texture2D tex = GlowTexture.Value;
|
||||
|
||||
Vector2 screenOffset = Main.drawToScreen ? Vector2.Zero : new Vector2(Main.offScreenRange);
|
||||
Vector2 drawOffset = new Vector2(i * 16 - Main.screenPosition.X, j * 16 - Main.screenPosition.Y) + screenOffset;
|
||||
drawOffset.Y -= 2f;
|
||||
|
||||
@@ -3,12 +3,12 @@ using CalamityMod.Items.Placeables.DraedonStructures;
|
||||
using CalamityMod.TileEntities;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using ReLogic.Content;
|
||||
using Terraria;
|
||||
using Terraria.Audio;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.Enums;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
using Terraria.ObjectData;
|
||||
|
||||
@@ -23,6 +23,8 @@ namespace CalamityMod.Tiles.DraedonStructures
|
||||
public const int TalkingFrames = 8;
|
||||
public const int FrameCount = IdleFrames + TalkingFrames;
|
||||
|
||||
public Asset<Texture2D> GlowTexture;
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.tileFrameImportant[Type] = true;
|
||||
@@ -131,7 +133,9 @@ namespace CalamityMod.Tiles.DraedonStructures
|
||||
int yPos = trackTile.TileFrameY;
|
||||
yPos += frame % 16 * 112;
|
||||
|
||||
Texture2D tileTexture = ModContent.Request<Texture2D>("CalamityMod/Tiles/DraedonStructures/LabHologramProjector").Value;
|
||||
GlowTexture ??= ModContent.Request<Texture2D>("CalamityMod/Tiles/DraedonStructures/LabHologramProjector");
|
||||
Texture2D tileTexture = GlowTexture.Value;
|
||||
|
||||
Vector2 offset = Main.drawToScreen ? Vector2.Zero : new Vector2(Main.offScreenRange);
|
||||
Vector2 drawOffset = new Vector2(i * 16 - Main.screenPosition.X, j * 16 - Main.screenPosition.Y) + offset;
|
||||
Color drawColor = Lighting.GetColor(i, j);
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
using CalamityMod.Items.Placeables.DraedonStructures;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using ReLogic.Content;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.Enums;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
using Terraria.ObjectData;
|
||||
|
||||
@@ -13,6 +11,8 @@ namespace CalamityMod.Tiles.DraedonStructures
|
||||
{
|
||||
public class LaboratoryConsole : ModTile
|
||||
{
|
||||
public Asset<Texture2D> GlowTexture;
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.tileLighted[Type] = true;
|
||||
@@ -58,7 +58,10 @@ namespace CalamityMod.Tiles.DraedonStructures
|
||||
|
||||
int xFrameOffset = Main.tile[i, j].TileFrameX;
|
||||
int yFrameOffset = Main.tile[i, j].TileFrameY;
|
||||
Texture2D glowmask = ModContent.Request<Texture2D>("CalamityMod/Tiles/DraedonStructures/LaboratoryConsoleGlow").Value;
|
||||
|
||||
GlowTexture ??= ModContent.Request<Texture2D>("CalamityMod/Tiles/DraedonStructures/LaboratoryConsoleGlow");
|
||||
Texture2D glowmask = GlowTexture.Value;
|
||||
|
||||
Vector2 drawOffest = Main.drawToScreen ? Vector2.Zero : new Vector2(Main.offScreenRange);
|
||||
Vector2 drawPosition = new Vector2(i * 16 - Main.screenPosition.X, j * 16 - Main.screenPosition.Y) + drawOffest;
|
||||
Color drawColour = Color.White;
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
using CalamityMod.Items.Placeables.DraedonStructures;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using ReLogic.Content;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.Enums;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
using Terraria.ObjectData;
|
||||
|
||||
@@ -13,6 +12,8 @@ namespace CalamityMod.Tiles.DraedonStructures
|
||||
{
|
||||
public class LaboratoryDisplay : ModTile
|
||||
{
|
||||
public Asset<Texture2D> GlowTexture;
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.tileLighted[Type] = true;
|
||||
@@ -61,7 +62,10 @@ namespace CalamityMod.Tiles.DraedonStructures
|
||||
|
||||
int xFrameOffset = Main.tile[i, j].TileFrameX;
|
||||
int yFrameOffset = Main.tile[i, j].TileFrameY;
|
||||
Texture2D glowmask = ModContent.Request<Texture2D>("CalamityMod/Tiles/DraedonStructures/LaboratoryDisplayGlow").Value;
|
||||
|
||||
GlowTexture ??= ModContent.Request<Texture2D>("CalamityMod/Tiles/DraedonStructures/LaboratoryDisplayGlow");
|
||||
Texture2D glowmask = GlowTexture.Value;
|
||||
|
||||
Vector2 drawOffest = Main.drawToScreen ? Vector2.Zero : new Vector2(Main.offScreenRange);
|
||||
Vector2 drawPosition = new Vector2(i * 16 - Main.screenPosition.X, j * 16 - Main.screenPosition.Y) + drawOffest;
|
||||
Color drawColour = Color.White;
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
using CalamityMod.Items.Placeables.DraedonStructures;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using ReLogic.Content;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
using Terraria.ObjectData;
|
||||
|
||||
@@ -12,6 +10,8 @@ namespace CalamityMod.Tiles.DraedonStructures
|
||||
{
|
||||
public class LaboratoryScreen : ModTile
|
||||
{
|
||||
public Asset<Texture2D> GlowTexture;
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.tileFrameImportant[Type] = true;
|
||||
@@ -41,7 +41,10 @@ namespace CalamityMod.Tiles.DraedonStructures
|
||||
|
||||
int xFrameOffset = Main.tile[i, j].TileFrameX;
|
||||
int yFrameOffset = Main.tile[i, j].TileFrameY;
|
||||
Texture2D glowmask = ModContent.Request<Texture2D>("CalamityMod/Tiles/DraedonStructures/LaboratoryScreenGlow").Value;
|
||||
|
||||
GlowTexture ??= ModContent.Request<Texture2D>("CalamityMod/Tiles/DraedonStructures/LaboratoryScreenGlow");
|
||||
Texture2D glowmask = GlowTexture.Value;
|
||||
|
||||
Vector2 drawOffest = Main.drawToScreen ? Vector2.Zero : new Vector2(Main.offScreenRange);
|
||||
Vector2 drawPosition = new Vector2(i * 16 - Main.screenPosition.X, j * 16 - Main.screenPosition.Y) + drawOffest;
|
||||
Color drawColour = Color.White;
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
using CalamityMod.Items.Placeables.DraedonStructures;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using ReLogic.Content;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.Enums;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
using Terraria.ObjectData;
|
||||
|
||||
@@ -13,6 +11,8 @@ namespace CalamityMod.Tiles.DraedonStructures
|
||||
{
|
||||
public class LaboratoryServer : ModTile
|
||||
{
|
||||
public Asset<Texture2D> GlowTexture;
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.tileLighted[Type] = true;
|
||||
@@ -58,7 +58,10 @@ namespace CalamityMod.Tiles.DraedonStructures
|
||||
|
||||
int xFrameOffset = Main.tile[i, j].TileFrameX;
|
||||
int yFrameOffset = Main.tile[i, j].TileFrameY;
|
||||
Texture2D glowmask = ModContent.Request<Texture2D>("CalamityMod/Tiles/DraedonStructures/LaboratoryServerGlow").Value;
|
||||
|
||||
GlowTexture ??= ModContent.Request<Texture2D>("CalamityMod/Tiles/DraedonStructures/LaboratoryServerGlow");
|
||||
Texture2D glowmask = GlowTexture.Value;
|
||||
|
||||
Vector2 drawOffest = Main.drawToScreen ? Vector2.Zero : new Vector2(Main.offScreenRange);
|
||||
Vector2 drawPosition = new Vector2(i * 16 - Main.screenPosition.X, j * 16 - Main.screenPosition.Y) + drawOffest;
|
||||
Color drawColour = Color.White;
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
using CalamityMod.Items.Placeables.DraedonStructures;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using ReLogic.Content;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.Enums;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
using Terraria.ObjectData;
|
||||
|
||||
@@ -13,6 +12,8 @@ namespace CalamityMod.Tiles.DraedonStructures
|
||||
{
|
||||
public class LaboratoryTerminal : ModTile
|
||||
{
|
||||
public Asset<Texture2D> GlowTexture;
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.tileLighted[Type] = true;
|
||||
@@ -61,7 +62,10 @@ namespace CalamityMod.Tiles.DraedonStructures
|
||||
|
||||
int xFrameOffset = Main.tile[i, j].TileFrameX;
|
||||
int yFrameOffset = Main.tile[i, j].TileFrameY;
|
||||
Texture2D glowmask = ModContent.Request<Texture2D>("CalamityMod/Tiles/DraedonStructures/LaboratoryTerminalGlow").Value;
|
||||
|
||||
GlowTexture ??= ModContent.Request<Texture2D>("CalamityMod/Tiles/DraedonStructures/LaboratoryTerminalGlow");
|
||||
Texture2D glowmask = GlowTexture.Value;
|
||||
|
||||
Vector2 drawOffest = Main.drawToScreen ? Vector2.Zero : new Vector2(Main.offScreenRange);
|
||||
Vector2 drawPosition = new Vector2(i * 16 - Main.screenPosition.X, j * 16 - Main.screenPosition.Y) + drawOffest;
|
||||
Color drawColour = Color.White;
|
||||
|
||||
@@ -4,6 +4,7 @@ using CalamityMod.Items.Placeables.DraedonStructures;
|
||||
using CalamityMod.TileEntities;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using ReLogic.Content;
|
||||
using Terraria;
|
||||
using Terraria.Audio;
|
||||
using Terraria.DataStructures;
|
||||
@@ -11,7 +12,6 @@ using Terraria.Enums;
|
||||
using Terraria.GameContent;
|
||||
using Terraria.GameContent.ObjectInteractions;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
using Terraria.ObjectData;
|
||||
|
||||
@@ -38,6 +38,8 @@ namespace CalamityMod.Tiles.DraedonStructures
|
||||
// With a delay of this many extra frames after that animation frame starts.
|
||||
public const int MagicFrameDelay = AnimationFramerate - 1;
|
||||
|
||||
public Asset<Texture2D> Highlight;
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.tileLighted[Type] = true;
|
||||
@@ -134,11 +136,12 @@ namespace CalamityMod.Tiles.DraedonStructures
|
||||
frameXPos += frameIndex / FramesPerColumn * (Width * SheetSquare);
|
||||
frameYPos += frameIndex % FramesPerColumn * (Height * SheetSquare);
|
||||
|
||||
Texture2D tex = ModContent.Request<Texture2D>("CalamityMod/Tiles/DraedonStructures/PowerCellFactory").Value;
|
||||
|
||||
Texture2D tex = TextureAssets.Tile[Type].Value;
|
||||
Vector2 offset = Main.drawToScreen ? Vector2.Zero : new Vector2(Main.offScreenRange);
|
||||
Vector2 drawOffset = new Vector2(i * 16 - Main.screenPosition.X, j * 16 - Main.screenPosition.Y) + offset;
|
||||
Color drawColor = Lighting.GetColor(i, j);
|
||||
|
||||
|
||||
|
||||
if (!t.IsHalfBlock && t.Slope == 0)
|
||||
spriteBatch.Draw(tex, drawOffset, new Rectangle(frameXPos, frameYPos, 16, 16), drawColor, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f);
|
||||
@@ -146,11 +149,10 @@ namespace CalamityMod.Tiles.DraedonStructures
|
||||
spriteBatch.Draw(tex, drawOffset + Vector2.UnitY * 8f, new Rectangle(frameXPos, frameYPos, 16, 16), drawColor, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f);
|
||||
|
||||
// Draws the Smart Cursor Highlight. Not 100% accurate, but its close enough
|
||||
bool actuallySelected;
|
||||
Color highlightColor;
|
||||
Texture2D texhighlight = ModContent.Request<Texture2D>(HighlightTexture).Value;
|
||||
if (Main.InSmartCursorHighlightArea(i, j, out actuallySelected))
|
||||
{
|
||||
Highlight ??= ModContent.Request<Texture2D>(HighlightTexture);
|
||||
if (Main.InSmartCursorHighlightArea(i, j, out var actuallySelected))
|
||||
{
|
||||
if (actuallySelected)
|
||||
{
|
||||
highlightColor = new Color(252, 252, 84);
|
||||
@@ -159,10 +161,10 @@ namespace CalamityMod.Tiles.DraedonStructures
|
||||
{
|
||||
highlightColor = new Color(125, 125, 125);
|
||||
}
|
||||
spriteBatch.Draw(texhighlight, drawOffset, new Rectangle(frameXPos, frameYPos, 16, 16), highlightColor, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f);
|
||||
spriteBatch.Draw(Highlight.Value, drawOffset, new Rectangle(frameXPos, frameYPos, 16, 16), highlightColor, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
using CalamityMod.Items.Placeables.DraedonStructures;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using ReLogic.Content;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
using Terraria.ObjectData;
|
||||
|
||||
@@ -12,6 +10,8 @@ namespace CalamityMod.Tiles.DraedonStructures
|
||||
{
|
||||
public class ReinforcedCrate : ModTile
|
||||
{
|
||||
public Asset<Texture2D> GlowTexture;
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.tileLighted[Type] = true;
|
||||
@@ -47,7 +47,10 @@ namespace CalamityMod.Tiles.DraedonStructures
|
||||
|
||||
int xFrameOffset = Main.tile[i, j].TileFrameX;
|
||||
int yFrameOffset = Main.tile[i, j].TileFrameY;
|
||||
Texture2D glowmask = ModContent.Request<Texture2D>("CalamityMod/Tiles/DraedonStructures/ReinforcedCrateGlow").Value;
|
||||
|
||||
GlowTexture ??= ModContent.Request<Texture2D>("CalamityMod/Tiles/DraedonStructures/ReinforcedCrateGlow");
|
||||
Texture2D glowmask = GlowTexture.Value;
|
||||
|
||||
Vector2 drawOffest = Main.drawToScreen ? Vector2.Zero : new Vector2(Main.offScreenRange);
|
||||
Vector2 drawPosition = new Vector2(i * 16 - Main.screenPosition.X, j * 16 - Main.screenPosition.Y) + drawOffest;
|
||||
Color drawColour = Color.White;
|
||||
|
||||
@@ -4,6 +4,7 @@ using CalamityMod.ILEditing;
|
||||
using CalamityMod.Tiles.BaseTiles;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using ReLogic.Content;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
@@ -36,6 +37,8 @@ namespace CalamityMod.Tiles.FloralParadise
|
||||
|
||||
public override int MaxCutoffBranchesPerBranch => 5;
|
||||
|
||||
public Asset<Texture2D> VineTexture;
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.tileAxe[Type] = true;
|
||||
@@ -50,7 +53,8 @@ namespace CalamityMod.Tiles.FloralParadise
|
||||
|
||||
public void DrawVine(Vector2 vineTop, Vector2 downwardBottom, int totalVinesToDraw, float swayFactor)
|
||||
{
|
||||
Texture2D vineTexture = ModContent.Request<Texture2D>("CalamityMod/Tiles/PerennialTreeVines").Value;
|
||||
VineTexture ??= ModContent.Request<Texture2D>("CalamityMod/Tiles/PerennialTreeVines");
|
||||
Texture2D vineTexture = VineTexture.Value;
|
||||
|
||||
// Determine the initial points for the vines.
|
||||
Vector2[] controlPoints = new Vector2[8];
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
using CalamityMod.ILEditing;
|
||||
using CalamityMod.Items.Placeables;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using ReLogic.Content;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
@@ -16,8 +16,12 @@ namespace CalamityMod.Tiles.FloralParadise
|
||||
|
||||
public const int WindPushLifetime = 45;
|
||||
|
||||
public Asset<Texture2D> StamenTexture;
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
StamenTexture = ModContent.Request<Texture2D>("CalamityMod/Tiles/FloralParadise/PinkFlowerStamen");
|
||||
|
||||
Main.tileFrameImportant[Type] = true;
|
||||
Main.tileNoFail[Type] = true;
|
||||
Main.tileObsidianKill[Type] = true;
|
||||
@@ -61,7 +65,7 @@ namespace CalamityMod.Tiles.FloralParadise
|
||||
|
||||
int frameX = Main.tile[i, j].TileFrameX;
|
||||
Color drawColor = Lighting.GetColor(i, j);
|
||||
Texture2D stamenTexture = ModContent.Request<Texture2D>("CalamityMod/Tiles/FloralParadise/PinkFlowerStamen").Value;
|
||||
Texture2D stamenTexture = StamenTexture.Value;
|
||||
Rectangle stamenFrame = stamenTexture.Frame(2, 1, frameX > 36 ? 1 : 0, 0);
|
||||
Vector2 stamenOrigin = stamenFrame.Size() * new Vector2(0.5f, 1f);
|
||||
Vector2 drawOffset = Main.drawToScreen ? Vector2.Zero : new Vector2(Main.offScreenRange);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
using System;
|
||||
using CalamityMod.ILEditing;
|
||||
using CalamityMod.ILEditing;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using ReLogic.Content;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
@@ -16,8 +16,12 @@ namespace CalamityMod.Tiles.FloralParadise
|
||||
|
||||
public const int WindPushLifetime = 48;
|
||||
|
||||
public Asset<Texture2D> StamenTexture;
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
StamenTexture = ModContent.Request<Texture2D>("CalamityMod/Tiles/FloralParadise/PinkFlowerBigStamen");
|
||||
|
||||
Main.tileFrameImportant[Type] = true;
|
||||
Main.tileNoFail[Type] = true;
|
||||
Main.tileObsidianKill[Type] = true;
|
||||
@@ -70,7 +74,7 @@ namespace CalamityMod.Tiles.FloralParadise
|
||||
|
||||
int frameX = Main.tile[i, j].TileFrameX;
|
||||
Color drawColor = Lighting.GetColor(i, j);
|
||||
Texture2D stamenTexture = ModContent.Request<Texture2D>("CalamityMod/Tiles/FloralParadise/PinkFlowerBigStamen").Value;
|
||||
Texture2D stamenTexture = StamenTexture.Value;
|
||||
Rectangle stamenFrame = stamenTexture.Frame(2, 1, frameX > 72 ? 1 : 0, 0);
|
||||
Vector2 stamenOrigin = stamenFrame.Size() * new Vector2(0.5f, 1f);
|
||||
Vector2 drawOffset = Main.drawToScreen ? Vector2.Zero : new Vector2(Main.offScreenRange);
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using CalamityMod.Buffs.Placeables;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using ReLogic.Content;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ModLoader;
|
||||
@@ -9,6 +10,8 @@ namespace CalamityMod.Tiles.Furniture
|
||||
{
|
||||
public class ChaosCandle : ModTile
|
||||
{
|
||||
public Asset<Texture2D> FlameTexture;
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
this.SetUpCandle(ModContent.ItemType<Items.Placeables.Furniture.ChaosCandle>(), false, false);
|
||||
@@ -61,7 +64,8 @@ namespace CalamityMod.Tiles.Furniture
|
||||
|
||||
public override void PostDraw(int i, int j, SpriteBatch spriteBatch)
|
||||
{
|
||||
CalamityUtils.DrawFlameEffect(ModContent.Request<Texture2D>("CalamityMod/Tiles/Furniture/ChaosCandleFlame").Value, i, j);
|
||||
FlameTexture ??= ModContent.Request<Texture2D>("CalamityMod/Tiles/Furniture/ChaosCandleFlame");
|
||||
CalamityUtils.DrawFlameEffect(FlameTexture.Value, i, j);
|
||||
}
|
||||
|
||||
public override bool RightClick(int i, int j)
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using ReLogic.Content;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
using Terraria.ObjectData;
|
||||
|
||||
@@ -11,6 +11,8 @@ namespace CalamityMod.Tiles.Furniture.CraftingStations
|
||||
{
|
||||
public class AshenAltar : ModTile
|
||||
{
|
||||
public Asset<Texture2D> FlameTexture;
|
||||
|
||||
int animationFrame = 0;
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
@@ -58,7 +60,8 @@ 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").Value, i, j, offsetY: animationFrame * AnimationFrameHeight);
|
||||
FlameTexture ??= ModContent.Request<Texture2D>("CalamityMod/Tiles/Furniture/CraftingStations/AshenAltarFlame");
|
||||
CalamityUtils.DrawStaticFlameEffect(FlameTexture.Value, i, j, offsetY: animationFrame * AnimationFrameHeight);
|
||||
}
|
||||
|
||||
public override void DrawEffects(int i, int j, SpriteBatch spriteBatch, ref TileDrawInfo drawData)
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using CalamityMod.Buffs.Placeables;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using ReLogic.Content;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ModLoader;
|
||||
@@ -9,6 +10,8 @@ namespace CalamityMod.Tiles.Furniture
|
||||
{
|
||||
public class TranquilityCandle : ModTile
|
||||
{
|
||||
public Asset<Texture2D> FlameTexture;
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
this.SetUpCandle(ModContent.ItemType<Items.Placeables.Furniture.TranquilityCandle>(), false, false);
|
||||
@@ -61,7 +64,8 @@ namespace CalamityMod.Tiles.Furniture
|
||||
|
||||
public override void PostDraw(int i, int j, SpriteBatch spriteBatch)
|
||||
{
|
||||
CalamityUtils.DrawFlameEffect(ModContent.Request<Texture2D>("CalamityMod/Tiles/Furniture/TranquilityCandleFlame").Value, i, j);
|
||||
FlameTexture ??= ModContent.Request<Texture2D>("CalamityMod/Tiles/Furniture/TranquilityCandleFlame");
|
||||
CalamityUtils.DrawFlameEffect(FlameTexture.Value, i, j);
|
||||
}
|
||||
|
||||
public override bool RightClick(int i, int j)
|
||||
|
||||
@@ -1,12 +1,7 @@
|
||||
using System.Linq;
|
||||
using CalamityMod.Dusts;
|
||||
using CalamityMod.Events;
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Items.Placeables.Furniture;
|
||||
using CalamityMod.Items.SummonItems;
|
||||
using CalamityMod.Items.Tools;
|
||||
using CalamityMod.NPCs.AstrumDeus;
|
||||
using CalamityMod.Projectiles.Boss;
|
||||
using CalamityMod.Projectiles.Typeless;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
@@ -15,7 +10,6 @@ using Terraria;
|
||||
using Terraria.Audio;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
using Terraria.ObjectData;
|
||||
|
||||
@@ -98,12 +92,10 @@ namespace CalamityMod.Tiles.Furniture
|
||||
return;
|
||||
}
|
||||
|
||||
if (CogTexture == null)
|
||||
CogTexture = ModContent.Request<Texture2D>("CalamityMod/Tiles/Furniture/WulfrumLureCog");
|
||||
CogTexture ??= ModContent.Request<Texture2D>("CalamityMod/Tiles/Furniture/WulfrumLureCog");
|
||||
Texture2D cogTexture = CogTexture.Value;
|
||||
|
||||
if (CoverTexture == null)
|
||||
CoverTexture = ModContent.Request<Texture2D>("CalamityMod/Tiles/Furniture/WulfrumLureCover");
|
||||
CoverTexture ??= ModContent.Request<Texture2D>("CalamityMod/Tiles/Furniture/WulfrumLureCover");
|
||||
Texture2D coverTex = CoverTexture.Value;
|
||||
|
||||
Vector2 worldPos = p.ToWorldCoordinates(16f, 16f);
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using CalamityMod.Items.Placeables.FurnitureAcidwood;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using ReLogic.Content;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
@@ -9,6 +10,8 @@ namespace CalamityMod.Tiles.FurnitureAcidwood
|
||||
{
|
||||
public class AcidwoodCandelabraTile : ModTile
|
||||
{
|
||||
public Asset<Texture2D> FlameTexture;
|
||||
|
||||
public override void SetStaticDefaults() => this.SetUpCandelabra(ModContent.ItemType<AcidwoodCandelabra>());
|
||||
|
||||
public override bool CreateDust(int i, int j, ref int type)
|
||||
@@ -45,7 +48,8 @@ namespace CalamityMod.Tiles.FurnitureAcidwood
|
||||
|
||||
public override void PostDraw(int i, int j, SpriteBatch spriteBatch)
|
||||
{
|
||||
CalamityUtils.DrawFlameEffect(ModContent.Request<Texture2D>("CalamityMod/Tiles/FurnitureAcidwood/AcidwoodCandelabraTileFlame").Value, i, j);
|
||||
FlameTexture ??= ModContent.Request<Texture2D>("CalamityMod/Tiles/FurnitureAcidwood/AcidwoodCandelabraTileFlame");
|
||||
CalamityUtils.DrawFlameEffect(FlameTexture.Value, i, j);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
using CalamityMod.Items.Placeables.FurnitureAcidwood;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using ReLogic.Content;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
@@ -9,6 +10,8 @@ namespace CalamityMod.Tiles.FurnitureAcidwood
|
||||
{
|
||||
public class AcidwoodCandleTile : ModTile
|
||||
{
|
||||
public Asset<Texture2D> FlameTexture;
|
||||
|
||||
public override void SetStaticDefaults() => this.SetUpCandle(ModContent.ItemType<AcidwoodCandle>());
|
||||
|
||||
public override bool CreateDust(int i, int j, ref int type)
|
||||
@@ -59,7 +62,8 @@ namespace CalamityMod.Tiles.FurnitureAcidwood
|
||||
|
||||
public override void PostDraw(int i, int j, SpriteBatch spriteBatch)
|
||||
{
|
||||
CalamityUtils.DrawFlameEffect(ModContent.Request<Texture2D>("CalamityMod/Tiles/FurnitureAcidwood/AcidwoodCandleTileFlame").Value, i, j);
|
||||
FlameTexture ??= ModContent.Request<Texture2D>("CalamityMod/Tiles/FurnitureAcidwood/AcidwoodCandleTileFlame");
|
||||
CalamityUtils.DrawFlameEffect(FlameTexture.Value, i, j);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
using CalamityMod.Items.Placeables.FurnitureAcidwood;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using ReLogic.Content;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
@@ -9,6 +10,8 @@ namespace CalamityMod.Tiles.FurnitureAcidwood
|
||||
{
|
||||
public class AcidwoodLampTile : ModTile
|
||||
{
|
||||
public Asset<Texture2D> FlameTexture;
|
||||
|
||||
public override void SetStaticDefaults() => this.SetUpLamp(ModContent.ItemType<AcidwoodLamp>());
|
||||
|
||||
public override bool CreateDust(int i, int j, ref int type)
|
||||
@@ -45,7 +48,8 @@ namespace CalamityMod.Tiles.FurnitureAcidwood
|
||||
|
||||
public override void PostDraw(int i, int j, SpriteBatch spriteBatch)
|
||||
{
|
||||
CalamityUtils.DrawFlameEffect(ModContent.Request<Texture2D>("CalamityMod/Tiles/FurnitureAcidwood/AcidwoodLampTileFlame").Value, i, j);
|
||||
FlameTexture ??= ModContent.Request<Texture2D>("CalamityMod/Tiles/FurnitureAcidwood/AcidwoodLampTileFlame");
|
||||
CalamityUtils.DrawFlameEffect(FlameTexture.Value, i, j);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,9 +1,9 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using ReLogic.Content;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
using Terraria.ObjectData;
|
||||
|
||||
@@ -11,7 +11,10 @@ namespace CalamityMod.Tiles.FurnitureAncient
|
||||
{
|
||||
public class AncientAltar : ModTile
|
||||
{
|
||||
public Asset<Texture2D> FlameTexture;
|
||||
|
||||
int animationFrame = 0;
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.tileLighted[Type] = true;
|
||||
@@ -58,7 +61,8 @@ namespace CalamityMod.Tiles.FurnitureAncient
|
||||
|
||||
public override void PostDraw(int i, int j, SpriteBatch spriteBatch)
|
||||
{
|
||||
CalamityUtils.DrawStaticFlameEffect(ModContent.Request<Texture2D>("CalamityMod/Tiles/FurnitureAncient/AncientAltarFlame").Value, i, j, offsetY: animationFrame * AnimationFrameHeight);
|
||||
FlameTexture ??= ModContent.Request<Texture2D>("CalamityMod/Tiles/FurnitureAncient/AncientAltarFlame");
|
||||
CalamityUtils.DrawStaticFlameEffect(FlameTexture.Value, i, j, offsetY: animationFrame * AnimationFrameHeight);
|
||||
}
|
||||
|
||||
public override void DrawEffects(int i, int j, SpriteBatch spriteBatch, ref TileDrawInfo drawData)
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using ReLogic.Content;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
using Terraria.ObjectData;
|
||||
|
||||
@@ -11,6 +11,8 @@ namespace CalamityMod.Tiles.FurnitureAncient
|
||||
{
|
||||
public class AncientBasin : ModTile
|
||||
{
|
||||
public Asset<Texture2D> FlameTexture;
|
||||
|
||||
int animationFrame = 0;
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
@@ -67,7 +69,8 @@ namespace CalamityMod.Tiles.FurnitureAncient
|
||||
|
||||
public override void PostDraw(int i, int j, SpriteBatch spriteBatch)
|
||||
{
|
||||
CalamityUtils.DrawStaticFlameEffect(ModContent.Request<Texture2D>("CalamityMod/Tiles/FurnitureAncient/AncientBasinFlame").Value, i, j, offsetY: animationFrame * AnimationFrameHeight);
|
||||
FlameTexture ??= ModContent.Request<Texture2D>("CalamityMod/Tiles/FurnitureAncient/AncientBasinFlame");
|
||||
CalamityUtils.DrawStaticFlameEffect(FlameTexture.Value, i, j, offsetY: animationFrame * AnimationFrameHeight);
|
||||
}
|
||||
|
||||
public override void DrawEffects(int i, int j, SpriteBatch spriteBatch, ref TileDrawInfo drawData)
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using ReLogic.Content;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
@@ -9,6 +10,8 @@ namespace CalamityMod.Tiles.FurnitureAncient
|
||||
{
|
||||
public class AncientLamp : ModTile
|
||||
{
|
||||
public Asset<Texture2D> FlameTexture;
|
||||
|
||||
public override void SetStaticDefaults() => this.SetUpLamp(ModContent.ItemType<Items.Placeables.FurnitureAncient.AncientLamp>(), true);
|
||||
|
||||
public override bool CreateDust(int i, int j, ref int type)
|
||||
@@ -37,7 +40,8 @@ namespace CalamityMod.Tiles.FurnitureAncient
|
||||
|
||||
public override void PostDraw(int i, int j, SpriteBatch spriteBatch)
|
||||
{
|
||||
CalamityUtils.DrawFlameEffect(ModContent.Request<Texture2D>("CalamityMod/Tiles/FurnitureAncient/AncientLampFlame").Value, i, j);
|
||||
FlameTexture ??= ModContent.Request<Texture2D>("CalamityMod/Tiles/FurnitureAncient/AncientLampFlame");
|
||||
CalamityUtils.DrawFlameEffect(FlameTexture.Value, i, j);
|
||||
}
|
||||
|
||||
public override void DrawEffects(int i, int j, SpriteBatch spriteBatch, ref TileDrawInfo drawData)
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using ReLogic.Content;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
@@ -10,6 +11,8 @@ namespace CalamityMod.Tiles.FurnitureAshen
|
||||
{
|
||||
public override string Texture => "CalamityMod/Tiles/FurnitureAshen/AshenSlab";
|
||||
|
||||
public Asset<Texture2D> GlowTexture;
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.tileSolid[Type] = true;
|
||||
@@ -514,7 +517,10 @@ namespace CalamityMod.Tiles.FurnitureAshen
|
||||
int yDrawPos = Main.tile[i, j].TileFrameY + (uniqueAnimationFrameY * AnimationFrameHeight);
|
||||
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;
|
||||
Texture2D glowmask = ModContent.Request<Texture2D>("CalamityMod/Tiles/FurnitureAshen/AshenSlabGlow").Value;
|
||||
|
||||
GlowTexture ??= ModContent.Request<Texture2D>("CalamityMod/Tiles/FurnitureAshen/AshenSlabGlow");
|
||||
Texture2D glowmask = GlowTexture.Value;
|
||||
|
||||
Color drawColour = CalamityUtils.ApplyPaint(Main.tile[i, j].TileColor, new Color(64, 64, 64, 64));
|
||||
Tile trackTile = Main.tile[i, j];
|
||||
if (!trackTile.IsHalfBlock && trackTile.Slope == 0)
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using ReLogic.Content;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
using Terraria.ObjectData;
|
||||
|
||||
@@ -11,6 +11,8 @@ namespace CalamityMod.Tiles.FurnitureAshen
|
||||
{
|
||||
public class AshenBasin : ModTile
|
||||
{
|
||||
public Asset<Texture2D> FlameTexture;
|
||||
|
||||
int animationFrame = 0;
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
@@ -68,7 +70,8 @@ namespace CalamityMod.Tiles.FurnitureAshen
|
||||
|
||||
public override void PostDraw(int i, int j, SpriteBatch spriteBatch)
|
||||
{
|
||||
CalamityUtils.DrawStaticFlameEffect(ModContent.Request<Texture2D>("CalamityMod/Tiles/FurnitureAshen/AshenBasinFlame").Value, i, j, offsetY: animationFrame * AnimationFrameHeight);
|
||||
FlameTexture ??= ModContent.Request<Texture2D>("CalamityMod/Tiles/FurnitureAshen/AshenBasinFlame");
|
||||
CalamityUtils.DrawStaticFlameEffect(FlameTexture.Value, i, j, offsetY: animationFrame * AnimationFrameHeight);
|
||||
}
|
||||
|
||||
public override void DrawEffects(int i, int j, SpriteBatch spriteBatch, ref TileDrawInfo drawData)
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using ReLogic.Content;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
@@ -9,6 +10,8 @@ namespace CalamityMod.Tiles.FurnitureAshen
|
||||
{
|
||||
public class AshenCandelabra : ModTile
|
||||
{
|
||||
public Asset<Texture2D> FlameTexture;
|
||||
|
||||
int animationFrame = 0;
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
@@ -63,7 +66,8 @@ namespace CalamityMod.Tiles.FurnitureAshen
|
||||
|
||||
public override void PostDraw(int i, int j, SpriteBatch spriteBatch)
|
||||
{
|
||||
CalamityUtils.DrawStaticFlameEffect(ModContent.Request<Texture2D>("CalamityMod/Tiles/FurnitureAshen/AshenCandelabraFlame").Value, i, j, offsetY: animationFrame * AnimationFrameHeight);
|
||||
FlameTexture ??= ModContent.Request<Texture2D>("CalamityMod/Tiles/FurnitureAshen/AshenCandelabraFlame");
|
||||
CalamityUtils.DrawStaticFlameEffect(FlameTexture.Value, i, j, offsetY: animationFrame * AnimationFrameHeight);
|
||||
}
|
||||
|
||||
public override void DrawEffects(int i, int j, SpriteBatch spriteBatch, ref TileDrawInfo drawData)
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using ReLogic.Content;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
@@ -9,6 +10,8 @@ namespace CalamityMod.Tiles.FurnitureAshen
|
||||
{
|
||||
public class AshenCandle : ModTile
|
||||
{
|
||||
public Asset<Texture2D> FlameTexture;
|
||||
|
||||
public override void SetStaticDefaults() => this.SetUpCandle(ModContent.ItemType<Items.Placeables.FurnitureAshen.AshenCandle>(), true);
|
||||
|
||||
public override bool CreateDust(int i, int j, ref int type)
|
||||
@@ -60,7 +63,8 @@ namespace CalamityMod.Tiles.FurnitureAshen
|
||||
|
||||
public override void PostDraw(int i, int j, SpriteBatch spriteBatch)
|
||||
{
|
||||
CalamityUtils.DrawFlameEffect(ModContent.Request<Texture2D>("CalamityMod/Tiles/FurnitureAshen/AshenCandleFlame").Value, i, j);
|
||||
FlameTexture ??= ModContent.Request<Texture2D>("CalamityMod/Tiles/FurnitureAshen/AshenCandleFlame");
|
||||
CalamityUtils.DrawFlameEffect(FlameTexture.Value, i, j);
|
||||
}
|
||||
|
||||
public override void DrawEffects(int i, int j, SpriteBatch spriteBatch, ref TileDrawInfo drawData)
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using ReLogic.Content;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
@@ -9,6 +10,8 @@ namespace CalamityMod.Tiles.FurnitureAshen
|
||||
{
|
||||
public class AshenLamp : ModTile
|
||||
{
|
||||
public Asset<Texture2D> FlameTexture;
|
||||
|
||||
public override void SetStaticDefaults() => this.SetUpLamp(ModContent.ItemType<Items.Placeables.FurnitureAshen.AshenLamp>(), true);
|
||||
|
||||
public override bool CreateDust(int i, int j, ref int type)
|
||||
@@ -46,7 +49,8 @@ namespace CalamityMod.Tiles.FurnitureAshen
|
||||
|
||||
public override void PostDraw(int i, int j, SpriteBatch spriteBatch)
|
||||
{
|
||||
CalamityUtils.DrawFlameEffect(ModContent.Request<Texture2D>("CalamityMod/Tiles/FurnitureAshen/AshenLampFlame").Value, i, j);
|
||||
FlameTexture ??= ModContent.Request<Texture2D>("CalamityMod/Tiles/FurnitureAshen/AshenLampFlame");
|
||||
CalamityUtils.DrawFlameEffect(FlameTexture.Value, i, j);
|
||||
}
|
||||
|
||||
public override void DrawEffects(int i, int j, SpriteBatch spriteBatch, ref TileDrawInfo drawData)
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using System;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using ReLogic.Content;
|
||||
using Terraria;
|
||||
using Terraria.GameContent.ObjectInteractions;
|
||||
using Terraria.ID;
|
||||
@@ -10,6 +11,8 @@ namespace CalamityMod.Tiles.FurnitureAshen
|
||||
{
|
||||
public class AshenMonolith : ModTile
|
||||
{
|
||||
public Asset<Texture2D> EyeTexture;
|
||||
|
||||
public int animationFrameWidth = 36;
|
||||
public override void SetStaticDefaults() => this.SetUpClock(ModContent.ItemType<Items.Placeables.FurnitureAshen.AshenMonolith>(), true);
|
||||
|
||||
@@ -122,7 +125,10 @@ namespace CalamityMod.Tiles.FurnitureAshen
|
||||
frameY *= 90;
|
||||
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;
|
||||
Texture2D eyeSheet = ModContent.Request<Texture2D>("CalamityMod/Tiles/FurnitureAshen/AshenMonolith_Eye").Value;
|
||||
|
||||
EyeTexture ??= ModContent.Request<Texture2D>("CalamityMod/Tiles/FurnitureAshen/AshenMonolith_Eye");
|
||||
Texture2D eyeSheet = EyeTexture.Value;
|
||||
|
||||
spriteBatch.Draw
|
||||
(
|
||||
eyeSheet,
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using CalamityMod.Tiles.Crags;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using ReLogic.Content;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
@@ -9,6 +10,8 @@ namespace CalamityMod.Tiles.FurnitureAshen
|
||||
{
|
||||
public class AshenSlab : ModTile
|
||||
{
|
||||
public Asset<Texture2D> GlowTexture;
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.tileSolid[Type] = true;
|
||||
@@ -514,7 +517,10 @@ namespace CalamityMod.Tiles.FurnitureAshen
|
||||
int yDrawPos = Main.tile[i, j].TileFrameY + (uniqueAnimationFrameY * AnimationFrameHeight);
|
||||
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;
|
||||
Texture2D glowmask = ModContent.Request<Texture2D>("CalamityMod/Tiles/FurnitureAshen/AshenSlabGlow").Value;
|
||||
|
||||
GlowTexture ??= ModContent.Request<Texture2D>("CalamityMod/Tiles/FurnitureAshen/AshenSlabGlow");
|
||||
Texture2D glowmask = GlowTexture.Value;
|
||||
|
||||
Color drawColour = CalamityUtils.ApplyPaint(Main.tile[i, j].TileColor, new Color(64, 64, 64, 64));
|
||||
Tile trackTile = Main.tile[i, j];
|
||||
if (!trackTile.IsHalfBlock && trackTile.Slope == 0)
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using ReLogic.Content;
|
||||
using Terraria;
|
||||
using Terraria.Enums;
|
||||
using Terraria.ID;
|
||||
@@ -10,6 +11,8 @@ namespace CalamityMod.Tiles.FurnitureAuric
|
||||
{
|
||||
public class AuricConsoleTile : ModTile
|
||||
{
|
||||
public Asset<Texture2D> GlowTexture;
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.tileLighted[Type] = true;
|
||||
@@ -55,7 +58,10 @@ namespace CalamityMod.Tiles.FurnitureAuric
|
||||
|
||||
int xFrameOffset = Main.tile[i, j].TileFrameX;
|
||||
int yFrameOffset = Main.tile[i, j].TileFrameY;
|
||||
Texture2D glowmask = ModContent.Request<Texture2D>("CalamityMod/Tiles/FurnitureAuric/AuricConsoleTile_Glow").Value;
|
||||
|
||||
GlowTexture ??= ModContent.Request<Texture2D>("CalamityMod/Tiles/FurnitureAuric/AuricConsoleTile_Glow");
|
||||
Texture2D glowmask = GlowTexture.Value;
|
||||
|
||||
Vector2 drawOffest = Main.drawToScreen ? Vector2.Zero : new Vector2(Main.offScreenRange);
|
||||
Vector2 drawPosition = new Vector2(i * 16 - Main.screenPosition.X, j * 16 - Main.screenPosition.Y) + drawOffest;
|
||||
Color drawColour = Color.White;
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using ReLogic.Content;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.Enums;
|
||||
@@ -11,6 +12,8 @@ namespace CalamityMod.Tiles.FurnitureAuric
|
||||
{
|
||||
public class AuricDisplayTile : ModTile
|
||||
{
|
||||
public Asset<Texture2D> GlowTexture;
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.tileLighted[Type] = true;
|
||||
@@ -59,7 +62,10 @@ namespace CalamityMod.Tiles.FurnitureAuric
|
||||
|
||||
int xFrameOffset = Main.tile[i, j].TileFrameX;
|
||||
int yFrameOffset = Main.tile[i, j].TileFrameY;
|
||||
Texture2D glowmask = ModContent.Request<Texture2D>("CalamityMod/Tiles/FurnitureAuric/AuricDisplayTile_Glow").Value;
|
||||
|
||||
GlowTexture ??= ModContent.Request<Texture2D>("CalamityMod/Tiles/FurnitureAuric/AuricDisplayTile_Glow");
|
||||
Texture2D glowmask = GlowTexture.Value;
|
||||
|
||||
Vector2 drawOffest = Main.drawToScreen ? Vector2.Zero : new Vector2(Main.offScreenRange);
|
||||
Vector2 drawPosition = new Vector2(i * 16 - Main.screenPosition.X, j * 16 - Main.screenPosition.Y) + drawOffest;
|
||||
Color drawColour = Color.White;
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using ReLogic.Content;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
@@ -9,6 +10,8 @@ namespace CalamityMod.Tiles.FurnitureAuric
|
||||
{
|
||||
public class AuricReinforcedCrateTile : ModTile
|
||||
{
|
||||
public Asset<Texture2D> GlowTexture;
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.tileLighted[Type] = true;
|
||||
@@ -44,7 +47,10 @@ namespace CalamityMod.Tiles.FurnitureAuric
|
||||
|
||||
int xFrameOffset = Main.tile[i, j].TileFrameX;
|
||||
int yFrameOffset = Main.tile[i, j].TileFrameY;
|
||||
Texture2D glowmask = ModContent.Request<Texture2D>("CalamityMod/Tiles/FurnitureAuric/AuricReinforcedCrateTile_Glow").Value;
|
||||
|
||||
GlowTexture ??= ModContent.Request<Texture2D>("CalamityMod/Tiles/FurnitureAuric/AuricReinforcedCrateTile_Glow");
|
||||
Texture2D glowmask = GlowTexture.Value;
|
||||
|
||||
Vector2 drawOffest = Main.drawToScreen ? Vector2.Zero : new Vector2(Main.offScreenRange);
|
||||
Vector2 drawPosition = new Vector2(i * 16 - Main.screenPosition.X, j * 16 - Main.screenPosition.Y) + drawOffest;
|
||||
Color drawColour = Color.White;
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using ReLogic.Content;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
@@ -9,6 +10,8 @@ namespace CalamityMod.Tiles.FurnitureAuric
|
||||
{
|
||||
public class AuricScreenTile : ModTile
|
||||
{
|
||||
public Asset<Texture2D> GlowTexture;
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.tileFrameImportant[Type] = true;
|
||||
@@ -39,7 +42,10 @@ namespace CalamityMod.Tiles.FurnitureAuric
|
||||
|
||||
int xFrameOffset = Main.tile[i, j].TileFrameX;
|
||||
int yFrameOffset = Main.tile[i, j].TileFrameY;
|
||||
Texture2D glowmask = ModContent.Request<Texture2D>("CalamityMod/Tiles/FurnitureAuric/AuricScreenTile_Glow").Value;
|
||||
|
||||
GlowTexture ??= ModContent.Request<Texture2D>("CalamityMod/Tiles/FurnitureAuric/AuricScreenTile_Glow");
|
||||
Texture2D glowmask = GlowTexture.Value;
|
||||
|
||||
Vector2 drawOffest = Main.drawToScreen ? Vector2.Zero : new Vector2(Main.offScreenRange);
|
||||
Vector2 drawPosition = new Vector2(i * 16 - Main.screenPosition.X, j * 16 - Main.screenPosition.Y) + drawOffest;
|
||||
Color drawColour = Color.White;
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
using CalamityMod.Items.Placeables.DraedonStructures;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using ReLogic.Content;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.Enums;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
using Terraria.ObjectData;
|
||||
|
||||
@@ -13,6 +11,8 @@ namespace CalamityMod.Tiles.FurnitureAuric
|
||||
{
|
||||
public class AuricServerTile : ModTile
|
||||
{
|
||||
public Asset<Texture2D> GlowTexture;
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.tileLighted[Type] = true;
|
||||
@@ -58,7 +58,10 @@ namespace CalamityMod.Tiles.FurnitureAuric
|
||||
|
||||
int xFrameOffset = Main.tile[i, j].TileFrameX;
|
||||
int yFrameOffset = Main.tile[i, j].TileFrameY;
|
||||
Texture2D glowmask = ModContent.Request<Texture2D>("CalamityMod/Tiles/FurnitureAuric/AuricServerTile_Glow").Value;
|
||||
|
||||
GlowTexture ??= ModContent.Request<Texture2D>("CalamityMod/Tiles/FurnitureAuric/AuricServerTile_Glow");
|
||||
Texture2D glowmask = GlowTexture.Value;
|
||||
|
||||
Vector2 drawOffest = Main.drawToScreen ? Vector2.Zero : new Vector2(Main.offScreenRange);
|
||||
Vector2 drawPosition = new Vector2(i * 16 - Main.screenPosition.X, j * 16 - Main.screenPosition.Y) + drawOffest;
|
||||
Color drawColour = Color.White;
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using ReLogic.Content;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.Enums;
|
||||
@@ -11,6 +12,8 @@ namespace CalamityMod.Tiles.FurnitureAuric
|
||||
{
|
||||
public class AuricTerminalTile : ModTile
|
||||
{
|
||||
public Asset<Texture2D> GlowTexture;
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.tileLighted[Type] = true;
|
||||
@@ -59,7 +62,10 @@ namespace CalamityMod.Tiles.FurnitureAuric
|
||||
|
||||
int xFrameOffset = Main.tile[i, j].TileFrameX;
|
||||
int yFrameOffset = Main.tile[i, j].TileFrameY;
|
||||
Texture2D glowmask = ModContent.Request<Texture2D>("CalamityMod/Tiles/FurnitureAuric/AuricTerminalTile_Glow").Value;
|
||||
|
||||
GlowTexture ??= ModContent.Request<Texture2D>("CalamityMod/Tiles/FurnitureAuric/AuricTerminalTile_Glow");
|
||||
Texture2D glowmask = GlowTexture.Value;
|
||||
|
||||
Vector2 drawOffest = Main.drawToScreen ? Vector2.Zero : new Vector2(Main.offScreenRange);
|
||||
Vector2 drawPosition = new Vector2(i * 16 - Main.screenPosition.X, j * 16 - Main.screenPosition.Y) + drawOffest;
|
||||
Color drawColour = Color.White;
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
using CalamityMod.Dusts;
|
||||
using CalamityMod.Items.Placeables.FurnitureCosmilite;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using ReLogic.Content;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
using Terraria.ObjectData;
|
||||
|
||||
@@ -13,6 +12,8 @@ namespace CalamityMod.Tiles.FurnitureCosmilite
|
||||
{
|
||||
public class CosmiliteBasinTile : ModTile
|
||||
{
|
||||
public Asset<Texture2D> FlameTexture;
|
||||
|
||||
int animationFrame = 0;
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
@@ -72,7 +73,8 @@ namespace CalamityMod.Tiles.FurnitureCosmilite
|
||||
|
||||
public override void PostDraw(int i, int j, SpriteBatch spriteBatch)
|
||||
{
|
||||
CalamityUtils.DrawStaticFlameEffect(ModContent.Request<Texture2D>("CalamityMod/Tiles/FurnitureCosmilite/CosmiliteBasinFlame").Value, i, j, offsetY: animationFrame * AnimationFrameHeight);
|
||||
FlameTexture ??= ModContent.Request<Texture2D>("CalamityMod/Tiles/FurnitureCosmilite/CosmiliteBasinFlame");
|
||||
CalamityUtils.DrawStaticFlameEffect(FlameTexture.Value, i, j, offsetY: animationFrame * AnimationFrameHeight);
|
||||
}
|
||||
|
||||
public override void DrawEffects(int i, int j, SpriteBatch spriteBatch, ref TileDrawInfo drawData)
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using CalamityMod.Items.Placeables.FurnitureExo;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using ReLogic.Content;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
@@ -9,6 +10,8 @@ namespace CalamityMod.Tiles.FurnitureExo
|
||||
{
|
||||
public class ExoBathtubTile : ModTile
|
||||
{
|
||||
public Asset<Texture2D> GlowTexture;
|
||||
|
||||
public override void SetStaticDefaults() => this.SetUpBathtub(ModContent.ItemType<ExoBathtub>());
|
||||
|
||||
public override bool CanExplode(int i, int j) => false;
|
||||
@@ -31,7 +34,10 @@ namespace CalamityMod.Tiles.FurnitureExo
|
||||
|
||||
int xFrameOffset = Main.tile[i, j].TileFrameX;
|
||||
int yFrameOffset = Main.tile[i, j].TileFrameY;
|
||||
Texture2D glowmask = ModContent.Request<Texture2D>("CalamityMod/Tiles/FurnitureExo/ExoBathtubGlow").Value;
|
||||
|
||||
GlowTexture ??= ModContent.Request<Texture2D>("CalamityMod/Tiles/FurnitureExo/ExoBathtubGlow");
|
||||
Texture2D glowmask = GlowTexture.Value;
|
||||
|
||||
Vector2 drawOffest = Main.drawToScreen ? Vector2.Zero : new Vector2(Main.offScreenRange);
|
||||
Vector2 drawPosition = new Vector2(i * 16 - Main.screenPosition.X, j * 16 - Main.screenPosition.Y) + drawOffest;
|
||||
Color drawColour = Color.White;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using CalamityMod.Items.Placeables.FurnitureExo;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using ReLogic.Content;
|
||||
using Terraria;
|
||||
using Terraria.GameContent.ObjectInteractions;
|
||||
using Terraria.ID;
|
||||
@@ -10,6 +11,8 @@ namespace CalamityMod.Tiles.FurnitureExo
|
||||
{
|
||||
public class ExoBedTile : ModTile
|
||||
{
|
||||
public Asset<Texture2D> GlowTexture;
|
||||
|
||||
public override void SetStaticDefaults() => this.SetUpBed(ModContent.ItemType<ExoBed>(), true);
|
||||
|
||||
public override bool CanExplode(int i, int j) => false;
|
||||
@@ -38,7 +41,10 @@ namespace CalamityMod.Tiles.FurnitureExo
|
||||
|
||||
int xFrameOffset = Main.tile[i, j].TileFrameX;
|
||||
int yFrameOffset = Main.tile[i, j].TileFrameY;
|
||||
Texture2D glowmask = ModContent.Request<Texture2D>("CalamityMod/Tiles/FurnitureExo/ExoBedGlow").Value;
|
||||
|
||||
GlowTexture ??= ModContent.Request<Texture2D>("CalamityMod/Tiles/FurnitureExo/ExoBedGlow")
|
||||
Texture2D glowmask = GlowTexture.Value;
|
||||
|
||||
Vector2 drawOffest = Main.drawToScreen ? Vector2.Zero : new Vector2(Main.offScreenRange);
|
||||
Vector2 drawPosition = new Vector2(i * 16 - Main.screenPosition.X, j * 16 - Main.screenPosition.Y) + drawOffest;
|
||||
Color drawColour = Color.White;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using CalamityMod.Items.Placeables.FurnitureExo;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using ReLogic.Content;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
@@ -9,6 +10,8 @@ namespace CalamityMod.Tiles.FurnitureExo
|
||||
{
|
||||
public class ExoBookcaseTile : ModTile
|
||||
{
|
||||
public Asset<Texture2D> GlowTexture;
|
||||
|
||||
public override void SetStaticDefaults() => this.SetUpBookcase(ModContent.ItemType<ExoBookcase>(), true);
|
||||
|
||||
public override bool CanExplode(int i, int j) => false;
|
||||
@@ -31,7 +34,10 @@ namespace CalamityMod.Tiles.FurnitureExo
|
||||
|
||||
int xFrameOffset = Main.tile[i, j].TileFrameX;
|
||||
int yFrameOffset = Main.tile[i, j].TileFrameY;
|
||||
Texture2D glowmask = ModContent.Request<Texture2D>("CalamityMod/Tiles/FurnitureExo/ExoBookcaseGlow").Value;
|
||||
|
||||
GlowTexture ??= ModContent.Request<Texture2D>("CalamityMod/Tiles/FurnitureExo/ExoBookcaseGlow");
|
||||
Texture2D glowmask = GlowTexture.Value;
|
||||
|
||||
Vector2 drawOffest = Main.drawToScreen ? Vector2.Zero : new Vector2(Main.offScreenRange);
|
||||
Vector2 drawPosition = new Vector2(i * 16 - Main.screenPosition.X, j * 16 - Main.screenPosition.Y) + drawOffest;
|
||||
Color drawColour = Color.White;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using CalamityMod.Items.Placeables.FurnitureExo;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using ReLogic.Content;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
@@ -9,6 +10,8 @@ namespace CalamityMod.Tiles.FurnitureExo
|
||||
{
|
||||
public class ExoCandelabraTile : ModTile
|
||||
{
|
||||
public Asset<Texture2D> FlameTexture;
|
||||
|
||||
public override void SetStaticDefaults() => this.SetUpCandelabra(ModContent.ItemType<ExoCandelabra>(), true);
|
||||
|
||||
public override bool CanExplode(int i, int j) => false;
|
||||
@@ -47,7 +50,8 @@ namespace CalamityMod.Tiles.FurnitureExo
|
||||
|
||||
public override void PostDraw(int i, int j, SpriteBatch spriteBatch)
|
||||
{
|
||||
CalamityUtils.DrawFlameEffect(ModContent.Request<Texture2D>("CalamityMod/Tiles/FurnitureExo/ExoCandelabraTileFlame").Value, i, j);
|
||||
FlameTexture ??= ModContent.Request<Texture2D>("CalamityMod/Tiles/FurnitureExo/ExoCandelabraTileFlame");
|
||||
CalamityUtils.DrawFlameEffect(FlameTexture.Value, i, j);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
using CalamityMod.Items.Placeables.FurnitureExo;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using ReLogic.Content;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
@@ -9,6 +10,8 @@ namespace CalamityMod.Tiles.FurnitureExo
|
||||
{
|
||||
public class ExoCandleTile : ModTile
|
||||
{
|
||||
public Asset<Texture2D> FlameTexture;
|
||||
|
||||
public override void SetStaticDefaults() => this.SetUpCandle(ModContent.ItemType<ExoCandle>(), true);
|
||||
|
||||
public override bool CanExplode(int i, int j) => false;
|
||||
@@ -61,7 +64,8 @@ namespace CalamityMod.Tiles.FurnitureExo
|
||||
|
||||
public override void PostDraw(int i, int j, SpriteBatch spriteBatch)
|
||||
{
|
||||
CalamityUtils.DrawFlameEffect(ModContent.Request<Texture2D>("CalamityMod/Tiles/FurnitureExo/ExoCandleTileFlame").Value, i, j);
|
||||
FlameTexture ??= ModContent.Request<Texture2D>("CalamityMod/Tiles/FurnitureExo/ExoCandleTileFlame");
|
||||
CalamityUtils.DrawFlameEffect(FlameTexture.Value, i, j);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
using CalamityMod.Items.Placeables.FurnitureExo;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using ReLogic.Content;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.Enums;
|
||||
@@ -15,6 +16,8 @@ namespace CalamityMod.Tiles.FurnitureExo
|
||||
{
|
||||
public class ExoChairTile : ModTile
|
||||
{
|
||||
public Asset<Texture2D> GlowTexture;
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.tileFrameImportant[Type] = true;
|
||||
@@ -66,7 +69,10 @@ namespace CalamityMod.Tiles.FurnitureExo
|
||||
|
||||
int xFrameOffset = Main.tile[i, j].TileFrameX;
|
||||
int yFrameOffset = Main.tile[i, j].TileFrameY;
|
||||
Texture2D glowmask = ModContent.Request<Texture2D>("CalamityMod/Tiles/FurnitureExo/ExoChairGlow").Value;
|
||||
|
||||
GlowTexture ??= ModContent.Request<Texture2D>("CalamityMod/Tiles/FurnitureExo/ExoChairGlow");
|
||||
Texture2D glowmask = GlowTexture.Value;
|
||||
|
||||
Vector2 drawOffest = Main.drawToScreen ? Vector2.Zero : new Vector2(Main.offScreenRange);
|
||||
Vector2 drawPosition = new Vector2(i * 16 - Main.screenPosition.X, j * 16 - Main.screenPosition.Y) + drawOffest;
|
||||
Color drawColour = Color.White;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using CalamityMod.Items.Placeables.FurnitureExo;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using ReLogic.Content;
|
||||
using Terraria;
|
||||
using Terraria.GameContent.ObjectInteractions;
|
||||
using Terraria.ID;
|
||||
@@ -12,6 +13,8 @@ namespace CalamityMod.Tiles.FurnitureExo
|
||||
{
|
||||
public class ExoChestTile : ModTile
|
||||
{
|
||||
public Asset<Texture2D> GlowTexture;
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
this.SetUpChest(ModContent.ItemType<ExoChest>(), true, 2);
|
||||
@@ -46,7 +49,10 @@ namespace CalamityMod.Tiles.FurnitureExo
|
||||
return;
|
||||
|
||||
int yOffset = TileObjectData.GetTileData(tile).DrawYOffset;
|
||||
Texture2D glowmask = ModContent.Request<Texture2D>("CalamityMod/Tiles/FurnitureExo/ExoChestGlow").Value;
|
||||
|
||||
GlowTexture ??= ModContent.Request<Texture2D>("CalamityMod/Tiles/FurnitureExo/ExoChestGlow");
|
||||
Texture2D glowmask = GlowTexture.Value;
|
||||
|
||||
Color drawColour = Color.White;
|
||||
Vector2 drawPosition = new Vector2(i * 16 - Main.screenPosition.X, j * 16 - Main.screenPosition.Y + yOffset) + (Main.drawToScreen ? Vector2.Zero : new Vector2(Main.offScreenRange));
|
||||
Rectangle frame = new Rectangle(xPos, yPos + Main.chest[chestIndex].frame * 38, 18, 18);
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using CalamityMod.Items.Placeables.FurnitureExo;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using ReLogic.Content;
|
||||
using Terraria;
|
||||
using Terraria.GameContent.ObjectInteractions;
|
||||
using Terraria.ID;
|
||||
@@ -10,6 +11,8 @@ namespace CalamityMod.Tiles.FurnitureExo
|
||||
{
|
||||
public class ExoClockTile : ModTile
|
||||
{
|
||||
public Asset<Texture2D> GlowTexture;
|
||||
|
||||
public override void SetStaticDefaults() => this.SetUpClock(ModContent.ItemType<ExoClock>(), true);
|
||||
|
||||
public override bool CanExplode(int i, int j) => false;
|
||||
@@ -46,7 +49,10 @@ namespace CalamityMod.Tiles.FurnitureExo
|
||||
|
||||
int xFrameOffset = Main.tile[i, j].TileFrameX;
|
||||
int yFrameOffset = Main.tile[i, j].TileFrameY;
|
||||
Texture2D glowmask = ModContent.Request<Texture2D>("CalamityMod/Tiles/FurnitureExo/ExoClockGlow").Value;
|
||||
|
||||
GlowTexture ??= ModContent.Request<Texture2D>("CalamityMod/Tiles/FurnitureExo/ExoClockGlow");
|
||||
Texture2D glowmask = GlowTexture.Value;
|
||||
|
||||
Vector2 drawOffest = Main.drawToScreen ? Vector2.Zero : new Vector2(Main.offScreenRange);
|
||||
Vector2 drawPosition = new Vector2(i * 16 - Main.screenPosition.X, j * 16 - Main.screenPosition.Y) + drawOffest;
|
||||
Color drawColour = Color.White;
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
using CalamityMod.Items.Placeables.FurnitureExo;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using ReLogic.Content;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.Enums;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
using Terraria.ObjectData;
|
||||
|
||||
@@ -13,6 +11,8 @@ namespace CalamityMod.Tiles.FurnitureExo
|
||||
{
|
||||
public class ExoConsoleTile : ModTile
|
||||
{
|
||||
public Asset<Texture2D> GlowTexture;
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.tileLighted[Type] = true;
|
||||
@@ -58,7 +58,10 @@ namespace CalamityMod.Tiles.FurnitureExo
|
||||
|
||||
int xFrameOffset = Main.tile[i, j].TileFrameX;
|
||||
int yFrameOffset = Main.tile[i, j].TileFrameY;
|
||||
Texture2D glowmask = ModContent.Request<Texture2D>("CalamityMod/Tiles/FurnitureExo/ExoConsoleGlow").Value;
|
||||
|
||||
GlowTexture ??= ModContent.Request<Texture2D>("CalamityMod/Tiles/FurnitureExo/ExoConsoleGlow");
|
||||
Texture2D glowmask = GlowTexture.Value;
|
||||
|
||||
Vector2 drawOffest = Main.drawToScreen ? Vector2.Zero : new Vector2(Main.offScreenRange);
|
||||
Vector2 drawPosition = new Vector2(i * 16 - Main.screenPosition.X, j * 16 - Main.screenPosition.Y) + drawOffest;
|
||||
Color drawColour = Color.White;
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
using CalamityMod.Items.Placeables.FurnitureExo;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using ReLogic.Content;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.Enums;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
using Terraria.ObjectData;
|
||||
|
||||
@@ -13,6 +12,8 @@ namespace CalamityMod.Tiles.FurnitureExo
|
||||
{
|
||||
public class ExoDisplayTile : ModTile
|
||||
{
|
||||
public Asset<Texture2D> GlowTexture;
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.tileLighted[Type] = true;
|
||||
@@ -61,7 +62,10 @@ namespace CalamityMod.Tiles.FurnitureExo
|
||||
|
||||
int xFrameOffset = Main.tile[i, j].TileFrameX;
|
||||
int yFrameOffset = Main.tile[i, j].TileFrameY;
|
||||
Texture2D glowmask = ModContent.Request<Texture2D>("CalamityMod/Tiles/FurnitureExo/ExoDisplayGlow").Value;
|
||||
|
||||
GlowTexture ??= ModContent.Request<Texture2D>("CalamityMod/Tiles/FurnitureExo/ExoDisplayGlow");
|
||||
Texture2D glowmask = GlowTexture.Value;
|
||||
|
||||
Vector2 drawOffest = Main.drawToScreen ? Vector2.Zero : new Vector2(Main.offScreenRange);
|
||||
Vector2 drawPosition = new Vector2(i * 16 - Main.screenPosition.X, j * 16 - Main.screenPosition.Y) + drawOffest;
|
||||
Color drawColour = Color.White;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using CalamityMod.Items.Placeables.FurnitureExo;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using ReLogic.Content;
|
||||
using Terraria;
|
||||
using Terraria.GameContent.ObjectInteractions;
|
||||
using Terraria.ID;
|
||||
@@ -11,6 +12,8 @@ namespace CalamityMod.Tiles.FurnitureExo
|
||||
{
|
||||
public class ExoDresserTile : ModTile
|
||||
{
|
||||
public Asset<Texture2D> GlowTexture;
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
this.SetUpDresser(ModContent.ItemType<ExoDresser>());
|
||||
@@ -39,7 +42,10 @@ namespace CalamityMod.Tiles.FurnitureExo
|
||||
|
||||
int xFrameOffset = Main.tile[i, j].TileFrameX;
|
||||
int yFrameOffset = Main.tile[i, j].TileFrameY;
|
||||
Texture2D glowmask = ModContent.Request<Texture2D>("CalamityMod/Tiles/FurnitureExo/ExoDresserGlow").Value;
|
||||
|
||||
GlowTexture ??= ModContent.Request<Texture2D>("CalamityMod/Tiles/FurnitureExo/ExoDresserGlow");
|
||||
Texture2D glowmask = GlowTexture.Value;
|
||||
|
||||
Vector2 drawOffest = Main.drawToScreen ? Vector2.Zero : new Vector2(Main.offScreenRange);
|
||||
Vector2 drawPosition = new Vector2(i * 16 - Main.screenPosition.X, j * 16 - Main.screenPosition.Y) + drawOffest;
|
||||
Color drawColour = Color.White;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using CalamityMod.Items.Placeables.FurnitureExo;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using ReLogic.Content;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
@@ -9,6 +10,8 @@ namespace CalamityMod.Tiles.FurnitureExo
|
||||
{
|
||||
public class ExoKeyboardTile : ModTile
|
||||
{
|
||||
public Asset<Texture2D> GlowTexture;
|
||||
|
||||
public override void SetStaticDefaults() => this.SetUpPiano(ModContent.ItemType<ExoKeyboard>(), true);
|
||||
|
||||
public override bool CanExplode(int i, int j) => false;
|
||||
@@ -31,7 +34,10 @@ namespace CalamityMod.Tiles.FurnitureExo
|
||||
|
||||
int xFrameOffset = Main.tile[i, j].TileFrameX;
|
||||
int yFrameOffset = Main.tile[i, j].TileFrameY;
|
||||
Texture2D glowmask = ModContent.Request<Texture2D>("CalamityMod/Tiles/FurnitureExo/ExoKeyboardGlow").Value;
|
||||
|
||||
GlowTexture ??= ModContent.Request<Texture2D>("CalamityMod/Tiles/FurnitureExo/ExoKeyboardGlow");
|
||||
Texture2D glowmask = GlowTexture.Value;
|
||||
|
||||
Vector2 drawOffest = Main.drawToScreen ? Vector2.Zero : new Vector2(Main.offScreenRange);
|
||||
Vector2 drawPosition = new Vector2(i * 16 - Main.screenPosition.X, j * 16 - Main.screenPosition.Y) + drawOffest;
|
||||
Color drawColour = Color.White;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using CalamityMod.Items.Placeables.FurnitureExo;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using ReLogic.Content;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
@@ -9,6 +10,8 @@ namespace CalamityMod.Tiles.FurnitureExo
|
||||
{
|
||||
public class ExoLampTile : ModTile
|
||||
{
|
||||
public Asset<Texture2D> FlameTexture;
|
||||
|
||||
public override void SetStaticDefaults() => this.SetUpLamp(ModContent.ItemType<ExoLamp>(), true);
|
||||
|
||||
public override bool CanExplode(int i, int j) => false;
|
||||
@@ -47,7 +50,8 @@ namespace CalamityMod.Tiles.FurnitureExo
|
||||
|
||||
public override void PostDraw(int i, int j, SpriteBatch spriteBatch)
|
||||
{
|
||||
CalamityUtils.DrawFlameEffect(ModContent.Request<Texture2D>("CalamityMod/Tiles/FurnitureExo/ExoLampTileFlame").Value, i, j);
|
||||
FlameTexture ??= ModContent.Request<Texture2D>("CalamityMod/Tiles/FurnitureExo/ExoLampTileFlame");
|
||||
CalamityUtils.DrawFlameEffect(FlameTexture.Value, i, j);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,10 +1,8 @@
|
||||
using CalamityMod.Items.Placeables.FurnitureExo;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using ReLogic.Content;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
using Terraria.ObjectData;
|
||||
|
||||
@@ -12,6 +10,8 @@ namespace CalamityMod.Tiles.FurnitureExo
|
||||
{
|
||||
public class ExoScreenTile : ModTile
|
||||
{
|
||||
public Asset<Texture2D> GlowTexture;
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.tileFrameImportant[Type] = true;
|
||||
@@ -60,7 +60,10 @@ namespace CalamityMod.Tiles.FurnitureExo
|
||||
return;
|
||||
|
||||
int yOffset = TileObjectData.GetTileData(tile).DrawYOffset;
|
||||
Texture2D glowmask = ModContent.Request<Texture2D>("CalamityMod/Tiles/FurnitureExo/ExoScreenGlow").Value;
|
||||
|
||||
GlowTexture ??= ModContent.Request<Texture2D>("CalamityMod/Tiles/FurnitureExo/ExoScreenGlow");
|
||||
Texture2D glowmask = GlowTexture.Value;
|
||||
|
||||
Vector2 drawOffset = Main.drawToScreen ? Vector2.Zero : new Vector2(Main.offScreenRange, Main.offScreenRange);
|
||||
Vector2 drawPosition = new Vector2(i * 16 - (int)Main.screenPosition.X / 2f, j * 16 - (int)Main.screenPosition.Y + yOffset) + drawOffset;
|
||||
Color drawColour = Color.White;
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
using CalamityMod.Items.Placeables.FurnitureExo;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using ReLogic.Content;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.Enums;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
using Terraria.ObjectData;
|
||||
|
||||
@@ -13,6 +11,8 @@ namespace CalamityMod.Tiles.FurnitureExo
|
||||
{
|
||||
public class ExoServerTile : ModTile
|
||||
{
|
||||
public Asset<Texture2D> GlowTexture;
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.tileLighted[Type] = true;
|
||||
@@ -58,7 +58,10 @@ namespace CalamityMod.Tiles.FurnitureExo
|
||||
|
||||
int xFrameOffset = Main.tile[i, j].TileFrameX;
|
||||
int yFrameOffset = Main.tile[i, j].TileFrameY;
|
||||
Texture2D glowmask = ModContent.Request<Texture2D>("CalamityMod/Tiles/FurnitureExo/ExoServerGlow").Value;
|
||||
|
||||
GlowTexture ??= ModContent.Request<Texture2D>("CalamityMod/Tiles/FurnitureExo/ExoServerGlow");
|
||||
Texture2D glowmask = GlowTexture.Value;
|
||||
|
||||
Vector2 drawOffest = Main.drawToScreen ? Vector2.Zero : new Vector2(Main.offScreenRange);
|
||||
Vector2 drawPosition = new Vector2(i * 16 - Main.screenPosition.X, j * 16 - Main.screenPosition.Y) + drawOffest;
|
||||
Color drawColour = Color.White;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using CalamityMod.Items.Placeables.FurnitureExo;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using ReLogic.Content;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
@@ -9,6 +10,8 @@ namespace CalamityMod.Tiles.FurnitureExo
|
||||
{
|
||||
public class ExoSinkTile : ModTile
|
||||
{
|
||||
public Asset<Texture2D> GlowTexture;
|
||||
|
||||
public override void SetStaticDefaults() => this.SetUpSink(ModContent.ItemType<ExoSink>(), true, true, true, true);
|
||||
|
||||
public override bool CanExplode(int i, int j) => false;
|
||||
@@ -31,7 +34,10 @@ namespace CalamityMod.Tiles.FurnitureExo
|
||||
|
||||
int xFrameOffset = Main.tile[i, j].TileFrameX;
|
||||
int yFrameOffset = Main.tile[i, j].TileFrameY;
|
||||
Texture2D glowmask = ModContent.Request<Texture2D>("CalamityMod/Tiles/FurnitureExo/ExoSinkGlow").Value;
|
||||
|
||||
GlowTexture ??= ModContent.Request<Texture2D>("CalamityMod/Tiles/FurnitureExo/ExoSinkGlow");
|
||||
Texture2D glowmask = GlowTexture.Value;
|
||||
|
||||
Vector2 drawOffest = Main.drawToScreen ? Vector2.Zero : new Vector2(Main.offScreenRange);
|
||||
Vector2 drawPosition = new Vector2(i * 16 - Main.screenPosition.X, j * 16 - Main.screenPosition.Y) + drawOffest;
|
||||
Color drawColour = Color.White;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using CalamityMod.Items.Placeables.FurnitureExo;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using ReLogic.Content;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.GameContent;
|
||||
@@ -12,6 +13,8 @@ namespace CalamityMod.Tiles.FurnitureExo
|
||||
{
|
||||
public class ExoSofaTile : ModTile
|
||||
{
|
||||
public Asset<Texture2D> GlowTexture;
|
||||
|
||||
public override void SetStaticDefaults() => this.SetUpSofa(ModContent.ItemType<ExoSofa>(), true);
|
||||
|
||||
public override bool CanExplode(int i, int j) => false;
|
||||
@@ -45,7 +48,10 @@ namespace CalamityMod.Tiles.FurnitureExo
|
||||
|
||||
int xFrameOffset = Main.tile[i, j].TileFrameX;
|
||||
int yFrameOffset = Main.tile[i, j].TileFrameY;
|
||||
Texture2D glowmask = ModContent.Request<Texture2D>("CalamityMod/Tiles/FurnitureExo/ExoSofaGlow").Value;
|
||||
|
||||
GlowTexture ??= ModContent.Request<Texture2D>("CalamityMod/Tiles/FurnitureExo/ExoSofaGlow");
|
||||
Texture2D glowmask = GlowTexture.Value;
|
||||
|
||||
Vector2 drawOffest = Main.drawToScreen ? Vector2.Zero : new Vector2(Main.offScreenRange);
|
||||
Vector2 drawPosition = new Vector2(i * 16 - Main.screenPosition.X, j * 16 - Main.screenPosition.Y) + drawOffest;
|
||||
Color drawColour = Color.White;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using CalamityMod.Items.Placeables.FurnitureExo;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using ReLogic.Content;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
@@ -9,6 +10,8 @@ namespace CalamityMod.Tiles.FurnitureExo
|
||||
{
|
||||
public class ExoTableTile : ModTile
|
||||
{
|
||||
public Asset<Texture2D> GlowTexture;
|
||||
|
||||
public override void SetStaticDefaults() => this.SetUpTable(ModContent.ItemType<ExoTable>(), true);
|
||||
|
||||
public override bool CanExplode(int i, int j) => false;
|
||||
@@ -31,7 +34,10 @@ namespace CalamityMod.Tiles.FurnitureExo
|
||||
|
||||
int xFrameOffset = Main.tile[i, j].TileFrameX;
|
||||
int yFrameOffset = Main.tile[i, j].TileFrameY;
|
||||
Texture2D glowmask = ModContent.Request<Texture2D>("CalamityMod/Tiles/FurnitureExo/ExoTableGlow").Value;
|
||||
|
||||
GlowTexture ??= ModContent.Request<Texture2D>("CalamityMod/Tiles/FurnitureExo/ExoTableGlow");
|
||||
Texture2D glowmask = GlowTexture.Value;
|
||||
|
||||
Vector2 drawOffest = Main.drawToScreen ? Vector2.Zero : new Vector2(Main.offScreenRange);
|
||||
Vector2 drawPosition = new Vector2(i * 16 - Main.screenPosition.X, j * 16 - Main.screenPosition.Y) + drawOffest;
|
||||
Color drawColour = Color.White;
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
using CalamityMod.Items.Placeables.FurnitureExo;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using ReLogic.Content;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.Enums;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
using Terraria.ObjectData;
|
||||
|
||||
@@ -13,6 +12,8 @@ namespace CalamityMod.Tiles.FurnitureExo
|
||||
{
|
||||
public class ExoTerminalTile : ModTile
|
||||
{
|
||||
public Asset<Texture2D> GlowTexture;
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.tileLighted[Type] = true;
|
||||
@@ -61,7 +62,10 @@ namespace CalamityMod.Tiles.FurnitureExo
|
||||
|
||||
int xFrameOffset = Main.tile[i, j].TileFrameX;
|
||||
int yFrameOffset = Main.tile[i, j].TileFrameY;
|
||||
Texture2D glowmask = ModContent.Request<Texture2D>("CalamityMod/Tiles/FurnitureExo/ExoTerminalGlow").Value;
|
||||
|
||||
GlowTexture ??= ModContent.Request<Texture2D>("CalamityMod/Tiles/FurnitureExo/ExoTerminalGlow");
|
||||
Texture2D glowmask = GlowTexture.Value;
|
||||
|
||||
Vector2 drawOffest = Main.drawToScreen ? Vector2.Zero : new Vector2(Main.offScreenRange);
|
||||
Vector2 drawPosition = new Vector2(i * 16 - Main.screenPosition.X, j * 16 - Main.screenPosition.Y) + drawOffest;
|
||||
Color drawColour = Color.White;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using CalamityMod.Items.Placeables.FurnitureExo;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using ReLogic.Content;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.Enums;
|
||||
@@ -15,6 +16,8 @@ namespace CalamityMod.Tiles.FurnitureExo
|
||||
{
|
||||
public class ExoToiletTile : ModTile
|
||||
{
|
||||
public Asset<Texture2D> GlowTexture;
|
||||
|
||||
public const int NextStyleHeight = 40;
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
@@ -67,7 +70,10 @@ namespace CalamityMod.Tiles.FurnitureExo
|
||||
|
||||
int xFrameOffset = Main.tile[i, j].TileFrameX;
|
||||
int yFrameOffset = Main.tile[i, j].TileFrameY;
|
||||
Texture2D glowmask = ModContent.Request<Texture2D>("CalamityMod/Tiles/FurnitureExo/ExoToiletGlow").Value;
|
||||
|
||||
GlowTexture ??= ModContent.Request<Texture2D>("CalamityMod/Tiles/FurnitureExo/ExoToiletGlow");
|
||||
Texture2D glowmask = GlowTexture.Value;
|
||||
|
||||
Vector2 drawOffest = Main.drawToScreen ? Vector2.Zero : new Vector2(Main.offScreenRange);
|
||||
Vector2 drawPosition = new Vector2(i * 16 - Main.screenPosition.X, j * 16 - Main.screenPosition.Y) + drawOffest;
|
||||
Color drawColour = Color.White;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using CalamityMod.Items.Placeables.FurnitureExo;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using ReLogic.Content;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
@@ -11,6 +12,8 @@ namespace CalamityMod.Tiles.FurnitureExo
|
||||
[LegacyName("ExoWorkbenchTile")]
|
||||
public class ExoWorkBenchTile : ModTile
|
||||
{
|
||||
public Asset<Texture2D> GlowTexture;
|
||||
|
||||
public override void SetStaticDefaults() => this.SetUpWorkBench(ModContent.ItemType<ExoWorkBench>(), true);
|
||||
|
||||
public override bool CanExplode(int i, int j) => false;
|
||||
@@ -38,7 +41,10 @@ namespace CalamityMod.Tiles.FurnitureExo
|
||||
|
||||
int xFrameOffset = Main.tile[i, j].TileFrameX;
|
||||
int yFrameOffset = Main.tile[i, j].TileFrameY;
|
||||
Texture2D glowmask = ModContent.Request<Texture2D>(Texture + "Glow").Value;
|
||||
|
||||
GlowTexture ??= ModContent.Request<Texture2D>(Texture + "Glow");
|
||||
Texture2D glowmask = GlowTexture.Value;
|
||||
|
||||
Vector2 drawOffest = Main.drawToScreen ? Vector2.Zero : new Vector2(Main.offScreenRange);
|
||||
Vector2 drawPosition = new Vector2(i * 16 - Main.screenPosition.X, j * 16 - Main.screenPosition.Y) + drawOffest;
|
||||
Color drawColour = Color.White;
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using ReLogic.Content;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
@@ -9,6 +10,8 @@ namespace CalamityMod.Tiles.FurnitureMarnite
|
||||
{
|
||||
public class MarniteLight : ModTile
|
||||
{
|
||||
public Asset<Texture2D> FlameTexture;
|
||||
|
||||
public override void SetStaticDefaults() => this.SetUpTorch(ModContent.ItemType<Items.Placeables.FurnitureMarnite.MarniteLight>(), true, true);
|
||||
|
||||
public override bool CreateDust(int i, int j, ref int type)
|
||||
@@ -56,7 +59,8 @@ namespace CalamityMod.Tiles.FurnitureMarnite
|
||||
|
||||
public override void PostDraw(int i, int j, SpriteBatch spriteBatch)
|
||||
{
|
||||
CalamityUtils.DrawFlameEffect(ModContent.Request<Texture2D>("CalamityMod/Tiles/FurnitureMarnite/MarniteLightFlame").Value, i, j, 2);
|
||||
FlameTexture ??= ModContent.Request<Texture2D>("CalamityMod/Tiles/FurnitureMarnite/MarniteLightFlame");
|
||||
CalamityUtils.DrawFlameEffect(FlameTexture.Value, i, j, 2);
|
||||
}
|
||||
|
||||
public override void DrawEffects(int i, int j, SpriteBatch spriteBatch, ref TileDrawInfo drawData)
|
||||
|
||||
@@ -3,6 +3,7 @@ using CalamityMod.Systems;
|
||||
using CalamityMod.Tiles.Astral;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using ReLogic.Content;
|
||||
using Terraria;
|
||||
using Terraria.GameContent.Metadata;
|
||||
using Terraria.ID;
|
||||
@@ -15,6 +16,8 @@ namespace CalamityMod.Tiles.FurnitureMonolith
|
||||
private static int sheetWidth = 216;
|
||||
private static int sheetHeight = 72;
|
||||
|
||||
public Asset<Texture2D> GlowTexture;
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.tileSolid[Type] = true;
|
||||
@@ -75,7 +78,10 @@ namespace CalamityMod.Tiles.FurnitureMonolith
|
||||
int yPos = tile.TileFrameY;
|
||||
xPos += xOffset;
|
||||
yPos += yOffset;
|
||||
Texture2D glowmask = ModContent.Request<Texture2D>("CalamityMod/Tiles/FurnitureMonolith/AstralMonolithGlow").Value;
|
||||
|
||||
GlowTexture ??= ModContent.Request<Texture2D>("CalamityMod/Tiles/FurnitureMonolith/AstralMonolithGlow");
|
||||
Texture2D glowmask = GlowTexture.Value;
|
||||
|
||||
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 = CalamityUtils.ApplyPaint(Main.tile[i, j].TileColor, new Color(50, 50, 50, 50));
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using CalamityMod.Dusts;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using ReLogic.Content;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
@@ -9,6 +10,8 @@ namespace CalamityMod.Tiles.FurnitureMonolith
|
||||
[LegacyName("MonolithCrafting")]
|
||||
public class MonolithAmalgam : ModTile
|
||||
{
|
||||
public Asset<Texture2D> GlowTexture;
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
this.SetUpBookcase(ModContent.ItemType<Items.Placeables.FurnitureMonolith.MonolithAmalgam>(), true, false, false);
|
||||
@@ -33,7 +36,10 @@ namespace CalamityMod.Tiles.FurnitureMonolith
|
||||
|
||||
int xPos = Main.tile[i, j].TileFrameX;
|
||||
int yPos = Main.tile[i, j].TileFrameY;
|
||||
Texture2D glowmask = ModContent.Request<Texture2D>("CalamityMod/Tiles/FurnitureMonolith/MonolithAmalgamGlow").Value;
|
||||
|
||||
GlowTexture ??= ModContent.Request<Texture2D>("CalamityMod/Tiles/FurnitureMonolith/MonolithAmalgamGlow");
|
||||
Texture2D glowmask = GlowTexture.Value;
|
||||
|
||||
Color drawColour = CalamityUtils.ApplyPaint(Main.tile[i, j].TileColor, new Color(100, 100, 100, 100));
|
||||
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;
|
||||
|
||||
@@ -1,12 +1,15 @@
|
||||
using CalamityMod.Dusts;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using ReLogic.Content;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
namespace CalamityMod.Tiles.FurnitureMonolith
|
||||
{
|
||||
public class MonolithBathtub : ModTile
|
||||
{
|
||||
public Asset<Texture2D> GlowTexture;
|
||||
|
||||
public override void SetStaticDefaults() => this.SetUpBathtub(ModContent.ItemType<Items.Placeables.FurnitureMonolith.MonolithBathtub>());
|
||||
|
||||
public override bool CreateDust(int i, int j, ref int type)
|
||||
@@ -27,7 +30,10 @@ namespace CalamityMod.Tiles.FurnitureMonolith
|
||||
|
||||
int xPos = Main.tile[i, j].TileFrameX;
|
||||
int yPos = Main.tile[i, j].TileFrameY;
|
||||
Texture2D glowmask = ModContent.Request<Texture2D>("CalamityMod/Tiles/FurnitureMonolith/MonolithBathtubGlow").Value;
|
||||
|
||||
GlowTexture ??= ModContent.Request<Texture2D>("CalamityMod/Tiles/FurnitureMonolith/MonolithBathtubGlow");
|
||||
Texture2D glowmask = GlowTexture.Value;
|
||||
|
||||
Color drawColour = CalamityUtils.ApplyPaint(Main.tile[i, j].TileColor, new Color(100, 100, 100, 100));
|
||||
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;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using CalamityMod.Dusts;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using ReLogic.Content;
|
||||
using Terraria;
|
||||
using Terraria.GameContent.ObjectInteractions;
|
||||
using Terraria.ModLoader;
|
||||
@@ -9,6 +10,8 @@ namespace CalamityMod.Tiles.FurnitureMonolith
|
||||
{
|
||||
public class MonolithBed : ModTile
|
||||
{
|
||||
public Asset<Texture2D> GlowTexture;
|
||||
|
||||
public override void SetStaticDefaults() => this.SetUpBed(ModContent.ItemType<Items.Placeables.FurnitureMonolith.MonolithBed>(), true);
|
||||
|
||||
public override bool CreateDust(int i, int j, ref int type)
|
||||
@@ -29,7 +32,10 @@ namespace CalamityMod.Tiles.FurnitureMonolith
|
||||
|
||||
int xPos = Main.tile[i, j].TileFrameX;
|
||||
int yPos = Main.tile[i, j].TileFrameY;
|
||||
Texture2D glowmask = ModContent.Request<Texture2D>("CalamityMod/Tiles/FurnitureMonolith/MonolithBedGlow").Value;
|
||||
|
||||
GlowTexture ??= ModContent.Request<Texture2D>("CalamityMod/Tiles/FurnitureMonolith/MonolithBedGlow");
|
||||
Texture2D glowmask = GlowTexture.Value;
|
||||
|
||||
Color drawColour = CalamityUtils.ApplyPaint(Main.tile[i, j].TileColor, new Color(100, 100, 100, 100));
|
||||
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;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using CalamityMod.Dusts;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using ReLogic.Content;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.GameContent;
|
||||
@@ -10,6 +11,8 @@ namespace CalamityMod.Tiles.FurnitureMonolith
|
||||
{
|
||||
public class MonolithBench : ModTile
|
||||
{
|
||||
public Asset<Texture2D> GlowTexture;
|
||||
|
||||
public override void SetStaticDefaults() => this.SetUpSofa(ModContent.ItemType<Items.Placeables.FurnitureMonolith.MonolithBench>(), true, true);
|
||||
|
||||
public override bool CreateDust(int i, int j, ref int type)
|
||||
@@ -30,7 +33,10 @@ namespace CalamityMod.Tiles.FurnitureMonolith
|
||||
|
||||
int xPos = Main.tile[i, j].TileFrameX;
|
||||
int yPos = Main.tile[i, j].TileFrameY;
|
||||
Texture2D glowmask = ModContent.Request<Texture2D>("CalamityMod/Tiles/FurnitureMonolith/MonolithBenchGlow").Value;
|
||||
|
||||
GlowTexture ??= ModContent.Request<Texture2D>("CalamityMod/Tiles/FurnitureMonolith/MonolithBenchGlow");
|
||||
Texture2D glowmask = GlowTexture.Value;
|
||||
|
||||
Color drawColour = CalamityUtils.ApplyPaint(Main.tile[i, j].TileColor, new Color(100, 100, 100, 100));
|
||||
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;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using CalamityMod.Dusts;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using ReLogic.Content;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
@@ -8,6 +9,8 @@ namespace CalamityMod.Tiles.FurnitureMonolith
|
||||
{
|
||||
public class MonolithBookcase : ModTile
|
||||
{
|
||||
public Asset<Texture2D> GlowTexture;
|
||||
|
||||
public override void SetStaticDefaults() => this.SetUpBookcase(ModContent.ItemType<Items.Placeables.FurnitureMonolith.MonolithBookcase>(), true, false);
|
||||
|
||||
public override bool CreateDust(int i, int j, ref int type)
|
||||
@@ -28,7 +31,10 @@ namespace CalamityMod.Tiles.FurnitureMonolith
|
||||
|
||||
int xPos = Main.tile[i, j].TileFrameX;
|
||||
int yPos = Main.tile[i, j].TileFrameY;
|
||||
Texture2D glowmask = ModContent.Request<Texture2D>("CalamityMod/Tiles/FurnitureMonolith/MonolithBookcaseGlow").Value;
|
||||
|
||||
GlowTexture ??= ModContent.Request<Texture2D>("CalamityMod/Tiles/FurnitureMonolith/MonolithBookcaseGlow");
|
||||
Texture2D glowmask = GlowTexture.Value;
|
||||
|
||||
Color drawColour = CalamityUtils.ApplyPaint(Main.tile[i, j].TileColor, new Color(100, 100, 100, 100));
|
||||
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;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using CalamityMod.Dusts;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using ReLogic.Content;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
@@ -8,6 +9,9 @@ namespace CalamityMod.Tiles.FurnitureMonolith
|
||||
{
|
||||
public class MonolithCandelabra : ModTile
|
||||
{
|
||||
public Asset<Texture2D> GlowTexture;
|
||||
public Asset<Texture2D> FlameTexture;
|
||||
|
||||
public override void SetStaticDefaults() => this.SetUpCandelabra(ModContent.ItemType<Items.Placeables.FurnitureMonolith.MonolithCandelabra>(), true);
|
||||
|
||||
public override bool CreateDust(int i, int j, ref int type)
|
||||
@@ -28,14 +32,15 @@ namespace CalamityMod.Tiles.FurnitureMonolith
|
||||
|
||||
int xPos = Main.tile[i, j].TileFrameX;
|
||||
int yPos = Main.tile[i, j].TileFrameY;
|
||||
Texture2D glowmask = ModContent.Request<Texture2D>("CalamityMod/Tiles/FurnitureMonolith/MonolithCandelabraGlow").Value;
|
||||
|
||||
GlowTexture ??= ModContent.Request<Texture2D>("CalamityMod/Tiles/FurnitureMonolith/MonolithCandelabraGlow");
|
||||
Color drawColour = CalamityUtils.ApplyPaint(Main.tile[i, j].TileColor, new Color(100, 100, 100, 100));
|
||||
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;
|
||||
Main.spriteBatch.Draw(glowmask, drawOffset, new Rectangle?(new Rectangle(xPos, yPos, 18, 18)), drawColour, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f);
|
||||
Main.spriteBatch.Draw(GlowTexture.Value, drawOffset, new Rectangle?(new Rectangle(xPos, yPos, 18, 18)), drawColour, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f);
|
||||
|
||||
Texture2D glowmaskBright = ModContent.Request<Texture2D>("CalamityMod/Tiles/FurnitureMonolith/MonolithCandelabraFlame").Value;
|
||||
Main.spriteBatch.Draw(glowmaskBright, drawOffset, new Rectangle?(new Rectangle(xPos, yPos, 18, 18)), Color.White, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f);
|
||||
FlameTexture ??= ModContent.Request<Texture2D>("CalamityMod/Tiles/FurnitureMonolith/MonolithCandelabraFlame");
|
||||
Main.spriteBatch.Draw(FlameTexture.Value, drawOffset, new Rectangle?(new Rectangle(xPos, yPos, 18, 18)), Color.White, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f);
|
||||
}
|
||||
|
||||
public override void ModifyLight(int i, int j, ref float r, ref float g, ref float b)
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using CalamityMod.Dusts;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using ReLogic.Content;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
@@ -8,6 +9,9 @@ namespace CalamityMod.Tiles.FurnitureMonolith
|
||||
{
|
||||
public class MonolithCandle : ModTile
|
||||
{
|
||||
public Asset<Texture2D> GlowTexture;
|
||||
public Asset<Texture2D> FlameTexture;
|
||||
|
||||
public override void SetStaticDefaults() => this.SetUpCandle(ModContent.ItemType<Items.Placeables.FurnitureMonolith.MonolithCandle>(), true);
|
||||
|
||||
public override bool CreateDust(int i, int j, ref int type)
|
||||
@@ -28,14 +32,15 @@ namespace CalamityMod.Tiles.FurnitureMonolith
|
||||
|
||||
int xPos = Main.tile[i, j].TileFrameX;
|
||||
int yPos = Main.tile[i, j].TileFrameY;
|
||||
Texture2D glowmask = ModContent.Request<Texture2D>("CalamityMod/Tiles/FurnitureMonolith/MonolithCandleGlow").Value;
|
||||
|
||||
GlowTexture ??= ModContent.Request<Texture2D>("CalamityMod/Tiles/FurnitureMonolith/MonolithCandleGlow");
|
||||
Color drawColour = CalamityUtils.ApplyPaint(Main.tile[i, j].TileColor, new Color(100, 100, 100, 100));
|
||||
Vector2 zero = Main.drawToScreen ? Vector2.Zero : new Vector2(Main.offScreenRange);
|
||||
Vector2 drawOffset = new Vector2(i * 16 - Main.screenPosition.X, j * 16 - Main.screenPosition.Y - 4) + zero;
|
||||
Main.spriteBatch.Draw(glowmask, drawOffset, new Rectangle?(new Rectangle(xPos, yPos, 18, 20)), drawColour, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f);
|
||||
Main.spriteBatch.Draw(GlowTexture.Value, drawOffset, new Rectangle?(new Rectangle(xPos, yPos, 18, 20)), drawColour, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f);
|
||||
|
||||
Texture2D glowmaskBright = ModContent.Request<Texture2D>("CalamityMod/Tiles/FurnitureMonolith/MonolithCandleFlame").Value;
|
||||
Main.spriteBatch.Draw(glowmaskBright, drawOffset, new Rectangle?(new Rectangle(xPos, yPos, 18, 20)), Color.White, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f);
|
||||
FlameTexture ??= ModContent.Request<Texture2D>("CalamityMod/Tiles/FurnitureMonolith/MonolithCandleFlame");
|
||||
Main.spriteBatch.Draw(FlameTexture.Value, drawOffset, new Rectangle?(new Rectangle(xPos, yPos, 18, 20)), Color.White, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f);
|
||||
}
|
||||
|
||||
public override void ModifyLight(int i, int j, ref float r, ref float g, ref float b)
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using CalamityMod.Dusts;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using ReLogic.Content;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.GameContent;
|
||||
@@ -11,6 +12,8 @@ namespace CalamityMod.Tiles.FurnitureMonolith
|
||||
{
|
||||
public class MonolithChair : ModTile
|
||||
{
|
||||
public Asset<Texture2D> GlowTexture;
|
||||
|
||||
public override void SetStaticDefaults() => this.SetUpChair(ModContent.ItemType<Items.Placeables.FurnitureMonolith.MonolithChair>(), true);
|
||||
|
||||
public override bool CreateDust(int i, int j, ref int type)
|
||||
@@ -31,11 +34,11 @@ namespace CalamityMod.Tiles.FurnitureMonolith
|
||||
|
||||
int xPos = Main.tile[i, j].TileFrameX;
|
||||
int yPos = Main.tile[i, j].TileFrameY;
|
||||
Texture2D glowmask = ModContent.Request<Texture2D>("CalamityMod/Tiles/FurnitureMonolith/MonolithChairGlow").Value;
|
||||
GlowTexture ??= ModContent.Request<Texture2D>("CalamityMod/Tiles/FurnitureMonolith/MonolithChairGlow");
|
||||
Color drawColour = CalamityUtils.ApplyPaint(Main.tile[i, j].TileColor, new Color(100, 100, 100, 100));
|
||||
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;
|
||||
Main.spriteBatch.Draw(glowmask, drawOffset, new Rectangle?(new Rectangle(xPos, yPos, 18, 18)), drawColour, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f);
|
||||
Main.spriteBatch.Draw(GlowTexture.Value, drawOffset, new Rectangle?(new Rectangle(xPos, yPos, 18, 18)), drawColour, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f);
|
||||
}
|
||||
|
||||
public override void ModifySittingTargetInfo(int i, int j, ref TileRestingInfo info) => CalamityUtils.ChairSitInfo(i, j, ref info);
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using CalamityMod.Dusts;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using ReLogic.Content;
|
||||
using Terraria;
|
||||
using Terraria.Audio;
|
||||
using Terraria.GameContent.ObjectInteractions;
|
||||
@@ -13,6 +14,8 @@ namespace CalamityMod.Tiles.FurnitureMonolith
|
||||
{
|
||||
public class MonolithChest : ModTile
|
||||
{
|
||||
public Asset<Texture2D> GlowTexture;
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
this.SetUpChest(ModContent.ItemType<Items.Placeables.FurnitureMonolith.MonolithChest>());
|
||||
@@ -75,11 +78,11 @@ namespace CalamityMod.Tiles.FurnitureMonolith
|
||||
return;
|
||||
|
||||
int yOffset = TileObjectData.GetTileData(tile).DrawYOffset;
|
||||
Texture2D glowmask = ModContent.Request<Texture2D>("CalamityMod/Tiles/FurnitureMonolith/MonolithChestGlow").Value;
|
||||
GlowTexture ??= ModContent.Request<Texture2D>("CalamityMod/Tiles/FurnitureMonolith/MonolithChestGlow");
|
||||
Color drawColour = CalamityUtils.ApplyPaint(Main.tile[i, j].TileColor, new Color(100, 100, 100, 100));
|
||||
Vector2 drawOffset = new Vector2(i * 16 - Main.screenPosition.X, j * 16 - Main.screenPosition.Y + yOffset) + (Main.drawToScreen ? Vector2.Zero : new Vector2(Main.offScreenRange));
|
||||
Rectangle frame = new Rectangle(xPos, yPos + Main.chest[chestIndex].frame * 38, 18, 18);
|
||||
Main.spriteBatch.Draw(glowmask, drawOffset, frame, drawColour, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f);
|
||||
Main.spriteBatch.Draw(GlowTexture.Value, drawOffset, frame, drawColour, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
using CalamityMod.Dusts;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using ReLogic.Content;
|
||||
using Terraria;
|
||||
using Terraria.GameContent.ObjectInteractions;
|
||||
using Terraria.ModLoader;
|
||||
@@ -9,6 +10,8 @@ namespace CalamityMod.Tiles.FurnitureMonolith
|
||||
{
|
||||
public class MonolithClock : ModTile
|
||||
{
|
||||
public Asset<Texture2D> GlowTexture;
|
||||
|
||||
public override void SetStaticDefaults() => this.SetUpClock(ModContent.ItemType<Items.Placeables.FurnitureMonolith.MonolithClock>(), true);
|
||||
|
||||
public override bool HasSmartInteract(int i, int j, SmartInteractScanSettings settings) => true;
|
||||
@@ -31,11 +34,11 @@ namespace CalamityMod.Tiles.FurnitureMonolith
|
||||
|
||||
int xPos = Main.tile[i, j].TileFrameX;
|
||||
int yPos = Main.tile[i, j].TileFrameY;
|
||||
Texture2D glowmask = ModContent.Request<Texture2D>("CalamityMod/Tiles/FurnitureMonolith/MonolithClockGlow").Value;
|
||||
GlowTexture ??= ModContent.Request<Texture2D>("CalamityMod/Tiles/FurnitureMonolith/MonolithClockGlow");
|
||||
Color drawColour = CalamityUtils.ApplyPaint(Main.tile[i, j].TileColor, new Color(100, 100, 100, 100));
|
||||
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;
|
||||
Main.spriteBatch.Draw(glowmask, drawOffset, new Rectangle?(new Rectangle(xPos, yPos, 18, 18)), drawColour, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f);
|
||||
Main.spriteBatch.Draw(GlowTexture.Value, drawOffset, new Rectangle?(new Rectangle(xPos, yPos, 18, 18)), drawColour, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f);
|
||||
}
|
||||
|
||||
public override bool RightClick(int x, int y)
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using CalamityMod.Dusts;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using ReLogic.Content;
|
||||
using Terraria;
|
||||
using Terraria.GameContent.ObjectInteractions;
|
||||
using Terraria.ID;
|
||||
@@ -10,6 +11,8 @@ namespace CalamityMod.Tiles.FurnitureMonolith
|
||||
{
|
||||
public class MonolithDoorClosed : ModTile
|
||||
{
|
||||
public Asset<Texture2D> GlowTexture;
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
this.SetUpDoorClosed(ModContent.ItemType<Items.Placeables.FurnitureMonolith.MonolithDoor>(), true);
|
||||
@@ -34,11 +37,11 @@ namespace CalamityMod.Tiles.FurnitureMonolith
|
||||
|
||||
int xPos = Main.tile[i, j].TileFrameX;
|
||||
int yPos = Main.tile[i, j].TileFrameY;
|
||||
Texture2D glowmask = ModContent.Request<Texture2D>("CalamityMod/Tiles/FurnitureMonolith/MonolithDoorClosedGlow").Value;
|
||||
GlowTexture ??= ModContent.Request<Texture2D>("CalamityMod/Tiles/FurnitureMonolith/MonolithDoorClosedGlow");
|
||||
Color drawColour = CalamityUtils.ApplyPaint(Main.tile[i, j].TileColor, new Color(100, 100, 100, 100));
|
||||
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;
|
||||
Main.spriteBatch.Draw(glowmask, drawOffset, new Rectangle?(new Rectangle(xPos, yPos, 18, 18)), drawColour, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f);
|
||||
Main.spriteBatch.Draw(GlowTexture.Value, drawOffset, new Rectangle?(new Rectangle(xPos, yPos, 18, 18)), drawColour, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f);
|
||||
}
|
||||
|
||||
public override bool HasSmartInteract(int i, int j, SmartInteractScanSettings settings) => true;
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
using CalamityMod.Items.Placeables.FurnitureMonolith;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using ReLogic.Content;
|
||||
using Terraria;
|
||||
using Terraria.GameContent.ObjectInteractions;
|
||||
using Terraria.ID;
|
||||
@@ -11,6 +12,8 @@ namespace CalamityMod.Tiles.FurnitureMonolith
|
||||
{
|
||||
public class MonolithDoorOpen : ModTile
|
||||
{
|
||||
public Asset<Texture2D> GlowTexture;
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
this.SetUpDoorOpen(ModContent.ItemType<MonolithDoor>(), true);
|
||||
@@ -35,11 +38,11 @@ namespace CalamityMod.Tiles.FurnitureMonolith
|
||||
|
||||
int xPos = Main.tile[i, j].TileFrameX;
|
||||
int yPos = Main.tile[i, j].TileFrameY;
|
||||
Texture2D glowmask = ModContent.Request<Texture2D>("CalamityMod/Tiles/FurnitureMonolith/MonolithDoorOpenGlow").Value;
|
||||
GlowTexture ??= ModContent.Request<Texture2D>("CalamityMod/Tiles/FurnitureMonolith/MonolithDoorOpenGlow");
|
||||
Color drawColour = CalamityUtils.ApplyPaint(Main.tile[i, j].TileColor, new Color(100, 100, 100, 100));
|
||||
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;
|
||||
Main.spriteBatch.Draw(glowmask, drawOffset, new Rectangle?(new Rectangle(xPos, yPos, 18, 18)), drawColour, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f);
|
||||
Main.spriteBatch.Draw(GlowTexture.Value, drawOffset, new Rectangle?(new Rectangle(xPos, yPos, 18, 18)), drawColour, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f);
|
||||
}
|
||||
|
||||
public override bool HasSmartInteract(int i, int j, SmartInteractScanSettings settings) => true;
|
||||
|
||||
Loaded 100 of 176 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user