gemspark framing and plat glowmask
This commit is contained in:
1 parent
6677811e14
commit
db55a05eac
7 files changed
+54
-2
No files matched your search
@@ -1364,7 +1364,7 @@ AuricPlatform: {
|
||||
|
||||
AuricRepulserPanel: {
|
||||
DisplayName: Auric Repulser Panel
|
||||
Tooltip: "Repels players that come in contact with it"
|
||||
Tooltip: Repels players that come in contact with it
|
||||
}
|
||||
|
||||
ExoAuricPanel: {
|
||||
|
||||
@@ -55,5 +55,9 @@ namespace CalamityMod.Tiles.FurnitureAuric
|
||||
}
|
||||
return colour;
|
||||
}
|
||||
public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak)
|
||||
{
|
||||
return TileFraming.BetterGemsparkFraming(i, j, resetFrame);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -46,5 +46,9 @@ namespace CalamityMod.Tiles.FurnitureAuric
|
||||
}
|
||||
return colour;
|
||||
}
|
||||
public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak)
|
||||
{
|
||||
return TileFraming.BetterGemsparkFraming(i, j, resetFrame);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -19,5 +19,9 @@ namespace CalamityMod.Tiles.FurnitureAuric
|
||||
DustType = 55;
|
||||
AddMapEntry(new Color(204, 224, 25));
|
||||
}
|
||||
public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak)
|
||||
{
|
||||
return TileFraming.BetterGemsparkFraming(i, j, resetFrame);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,7 @@
|
||||
using CalamityMod.Items.Placeables.FurnitureAuric;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using ReLogic.Content;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
@@ -8,7 +10,15 @@ namespace CalamityMod.Tiles.FurnitureAuric
|
||||
{
|
||||
public class AuricPlatformTile : ModTile
|
||||
{
|
||||
public override void SetStaticDefaults() => this.SetUpPlatform(ModContent.ItemType<AuricPlatform>(), true);
|
||||
internal static Texture2D GlowTexture;
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
if (!Main.dedServ)
|
||||
{
|
||||
GlowTexture = ModContent.Request<Texture2D>("CalamityMod/Tiles/FurnitureAuric/AuricPlatformTile_Glow", AssetRequestMode.ImmediateLoad).Value;
|
||||
}
|
||||
this.SetUpPlatform(ModContent.ItemType<AuricPlatform>(), true);
|
||||
}
|
||||
|
||||
public override bool CanExplode(int i, int j) => false;
|
||||
|
||||
@@ -27,5 +37,27 @@ namespace CalamityMod.Tiles.FurnitureAuric
|
||||
{
|
||||
num = fail ? 1 : 3;
|
||||
}
|
||||
|
||||
public override void PostDraw(int i, int j, SpriteBatch spriteBatch)
|
||||
{
|
||||
// If the cached textures don't exist for some reason, don't bother using them.
|
||||
if (GlowTexture is null)
|
||||
return;
|
||||
|
||||
Tile tile = CalamityUtils.ParanoidTileRetrieval(i, j);
|
||||
int xPos = tile.TileFrameX;
|
||||
int yPos = tile.TileFrameY;
|
||||
Vector2 drawOffset = Main.drawToScreen ? Vector2.Zero : new Vector2(Main.offScreenRange);
|
||||
Vector2 drawPosition = new Vector2(i * 16 - Main.screenPosition.X, j * 16 - Main.screenPosition.Y) + drawOffset;
|
||||
|
||||
if (!tile.IsHalfBlock)
|
||||
{
|
||||
spriteBatch.Draw(GlowTexture, drawPosition, new Rectangle?(new Rectangle(xPos, yPos, 18, 18)), Color.White, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0f);
|
||||
}
|
||||
else if (tile.IsHalfBlock)
|
||||
{
|
||||
spriteBatch.Draw(GlowTexture, drawPosition + new Vector2(0f, 8f), new Rectangle?(new Rectangle(xPos, yPos, 18, 8)), Color.White, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -55,5 +55,9 @@ namespace CalamityMod.Tiles.FurnitureAuric
|
||||
}
|
||||
return colour;
|
||||
}
|
||||
public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak)
|
||||
{
|
||||
return TileFraming.BetterGemsparkFraming(i, j, resetFrame);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -55,5 +55,9 @@ namespace CalamityMod.Tiles.FurnitureAuric
|
||||
}
|
||||
return colour;
|
||||
}
|
||||
public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak)
|
||||
{
|
||||
return TileFraming.BetterGemsparkFraming(i, j, resetFrame);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user