swaying town
This commit is contained in:
1 parent
cc2b967f1a
commit
ea26a2faa0
28 files changed
+71
-36
No files matched your search
@@ -1,7 +1,9 @@
|
||||
using System;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.GameContent.Drawing;
|
||||
using Terraria.GameContent.Metadata;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
@@ -29,6 +31,12 @@ namespace CalamityMod.Tiles.Abyss
|
||||
TileMaterials.SetForTileId(Type, TileMaterials._materialsByName["Plant"]);
|
||||
}
|
||||
|
||||
public override bool PreDraw(int i, int j, SpriteBatch spriteBatch)
|
||||
{
|
||||
Main.instance.TilesRenderer.CrawlToTopOfVineAndAddSpecialPoint(j, i);
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void NumDust(int i, int j, bool fail, ref int num)
|
||||
{
|
||||
num = fail ? 1 : 3;
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.GameContent.Drawing;
|
||||
using Terraria.GameContent.Metadata;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
@@ -21,6 +23,12 @@ namespace CalamityMod.Tiles.Abyss
|
||||
DustType = 2;
|
||||
}
|
||||
|
||||
public override bool PreDraw(int i, int j, SpriteBatch spriteBatch)
|
||||
{
|
||||
Main.instance.TilesRenderer.CrawlToTopOfVineAndAddSpecialPoint(j, i);
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void NumDust(int i, int j, bool fail, ref int num)
|
||||
{
|
||||
num = fail ? 1 : 3;
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
using System;
|
||||
using CalamityMod.Dusts;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.GameContent.Drawing;
|
||||
using Terraria.GameContent.Metadata;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
@@ -32,6 +34,12 @@ namespace CalamityMod.Tiles.Astral
|
||||
AddMapEntry(new Color(65, 56, 83));
|
||||
}
|
||||
|
||||
public override bool PreDraw(int i, int j, SpriteBatch spriteBatch)
|
||||
{
|
||||
Main.instance.TilesRenderer.CrawlToTopOfVineAndAddSpecialPoint(j, i);
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void KillTile(int i, int j, ref bool fail, ref bool effectOnly, ref bool noItem)
|
||||
{
|
||||
//GIVE VINE ROPE IF SPECIAL VINE BOOK
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using CalamityMod.Items.Placeables.Furniture;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
@@ -16,7 +17,7 @@ namespace CalamityMod.Tiles.Furniture
|
||||
AdjTiles = new int[] { TileID.HangingLanterns, TileID.FireflyinaBottle, TileID.LightningBuginaBottle };
|
||||
}
|
||||
|
||||
public override void SetDrawPositions(int i, int j, ref int width, ref int offsetY, ref int height, ref short tileFrameX, ref short tileFrameY) => CalamityUtils.PlatformHangOffset(i, j, ref offsetY);
|
||||
public override bool PreDraw(int i, int j, SpriteBatch spriteBatch) => CalamityUtils.DrawSwayingMultiTile(i, j);
|
||||
|
||||
public override void AnimateTile(ref int frame, ref int frameCounter)
|
||||
{
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
@@ -8,7 +9,7 @@ namespace CalamityMod.Tiles.FurnitureAbyss
|
||||
public class AbyssLantern : ModTile
|
||||
{
|
||||
public override void SetStaticDefaults() => this.SetUpLantern(ModContent.ItemType<Items.Placeables.FurnitureAbyss.AbyssLantern>(), true);
|
||||
public override void SetDrawPositions(int i, int j, ref int width, ref int offsetY, ref int height, ref short tileFrameX, ref short tileFrameY) => CalamityUtils.PlatformHangOffset(i, j, ref offsetY);
|
||||
public override bool PreDraw(int i, int j, SpriteBatch spriteBatch) => CalamityUtils.DrawSwayingMultiTile(i, j);
|
||||
|
||||
public override bool CreateDust(int i, int j, ref int type)
|
||||
{
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace CalamityMod.Tiles.FurnitureAcidwood
|
||||
public class AcidwoodLanternTile : ModTile
|
||||
{
|
||||
public override void SetStaticDefaults() => this.SetUpLantern(ModContent.ItemType<AcidwoodLantern>());
|
||||
public override void SetDrawPositions(int i, int j, ref int width, ref int offsetY, ref int height, ref short tileFrameX, ref short tileFrameY) => CalamityUtils.PlatformHangOffset(i, j, ref offsetY);
|
||||
public override bool PreDraw(int i, int j, SpriteBatch spriteBatch) => CalamityUtils.DrawSwayingMultiTile(i, j);
|
||||
|
||||
public override bool CreateDust(int i, int j, ref int type)
|
||||
{
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace CalamityMod.Tiles.FurnitureAncient
|
||||
public class AncientLantern : ModTile
|
||||
{
|
||||
public override void SetStaticDefaults() => this.SetUpLantern(ModContent.ItemType<Items.Placeables.FurnitureAncient.AncientLantern>(), true);
|
||||
public override void SetDrawPositions(int i, int j, ref int width, ref int offsetY, ref int height, ref short tileFrameX, ref short tileFrameY) => CalamityUtils.PlatformHangOffset(i, j, ref offsetY);
|
||||
public override bool PreDraw(int i, int j, SpriteBatch spriteBatch) => CalamityUtils.DrawSwayingMultiTile(i, j);
|
||||
|
||||
public override bool CreateDust(int i, int j, ref int type)
|
||||
{
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace CalamityMod.Tiles.FurnitureAshen
|
||||
public class AshenLantern : ModTile
|
||||
{
|
||||
public override void SetStaticDefaults() => this.SetUpLantern(ModContent.ItemType<Items.Placeables.FurnitureAshen.AshenLantern>(), true);
|
||||
public override void SetDrawPositions(int i, int j, ref int width, ref int offsetY, ref int height, ref short tileFrameX, ref short tileFrameY) => CalamityUtils.PlatformHangOffset(i, j, ref offsetY);
|
||||
public override bool PreDraw(int i, int j, SpriteBatch spriteBatch) => CalamityUtils.DrawSwayingMultiTile(i, j);
|
||||
|
||||
public override bool CreateDust(int i, int j, ref int type)
|
||||
{
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using CalamityMod.Dusts.Furniture;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
@@ -8,7 +9,7 @@ namespace CalamityMod.Tiles.FurnitureBotanic
|
||||
public class BotanicLantern : ModTile
|
||||
{
|
||||
public override void SetStaticDefaults() => this.SetUpLantern(ModContent.ItemType<Items.Placeables.FurnitureBotanic.BotanicLantern>(), true);
|
||||
public override void SetDrawPositions(int i, int j, ref int width, ref int offsetY, ref int height, ref short tileFrameX, ref short tileFrameY) => CalamityUtils.PlatformHangOffset(i, j, ref offsetY);
|
||||
public override bool PreDraw(int i, int j, SpriteBatch spriteBatch) => CalamityUtils.DrawSwayingMultiTile(i, j);
|
||||
|
||||
public override bool CreateDust(int i, int j, ref int type)
|
||||
{
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
@@ -8,7 +9,7 @@ namespace CalamityMod.Tiles.FurnitureCosmilite
|
||||
public class CosmiliteLantern : ModTile
|
||||
{
|
||||
public override void SetStaticDefaults() => this.SetUpLantern(ModContent.ItemType<Items.Placeables.FurnitureCosmilite.CosmiliteLantern>(), true);
|
||||
public override void SetDrawPositions(int i, int j, ref int width, ref int offsetY, ref int height, ref short tileFrameX, ref short tileFrameY) => CalamityUtils.PlatformHangOffset(i, j, ref offsetY);
|
||||
public override bool PreDraw(int i, int j, SpriteBatch spriteBatch) => CalamityUtils.DrawSwayingMultiTile(i, j);
|
||||
|
||||
public override bool CreateDust(int i, int j, ref int type)
|
||||
{
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
@@ -8,7 +9,7 @@ namespace CalamityMod.Tiles.FurnitureEutrophic
|
||||
public class EutrophicLantern : ModTile
|
||||
{
|
||||
public override void SetStaticDefaults() => this.SetUpLantern(ModContent.ItemType<Items.Placeables.FurnitureEutrophic.EutrophicLantern>());
|
||||
public override void SetDrawPositions(int i, int j, ref int width, ref int offsetY, ref int height, ref short tileFrameX, ref short tileFrameY) => CalamityUtils.PlatformHangOffset(i, j, ref offsetY);
|
||||
public override bool PreDraw(int i, int j, SpriteBatch spriteBatch) => CalamityUtils.DrawSwayingMultiTile(i, j);
|
||||
|
||||
public override bool CreateDust(int i, int j, ref int type)
|
||||
{
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace CalamityMod.Tiles.FurnitureExo
|
||||
public class ExoLanternTile : ModTile
|
||||
{
|
||||
public override void SetStaticDefaults() => this.SetUpLantern(ModContent.ItemType<ExoLantern>(), true);
|
||||
public override void SetDrawPositions(int i, int j, ref int width, ref int offsetY, ref int height, ref short tileFrameX, ref short tileFrameY) => CalamityUtils.PlatformHangOffset(i, j, ref offsetY);
|
||||
public override bool PreDraw(int i, int j, SpriteBatch spriteBatch) => CalamityUtils.DrawSwayingMultiTile(i, j);
|
||||
|
||||
public override bool CanExplode(int i, int j) => false;
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
@@ -8,7 +9,7 @@ namespace CalamityMod.Tiles.FurnitureMarnite
|
||||
public class MarniteLantern : ModTile
|
||||
{
|
||||
public override void SetStaticDefaults() => this.SetUpLantern(ModContent.ItemType<Items.Placeables.FurnitureMarnite.MarniteLantern>(), true);
|
||||
public override void SetDrawPositions(int i, int j, ref int width, ref int offsetY, ref int height, ref short tileFrameX, ref short tileFrameY) => CalamityUtils.PlatformHangOffset(i, j, ref offsetY);
|
||||
public override bool PreDraw(int i, int j, SpriteBatch spriteBatch) => CalamityUtils.DrawSwayingMultiTile(i, j);
|
||||
|
||||
public override bool CreateDust(int i, int j, ref int type)
|
||||
{
|
||||
|
||||
@@ -9,7 +9,7 @@ namespace CalamityMod.Tiles.FurnitureMonolith
|
||||
public class MonolithLantern : ModTile
|
||||
{
|
||||
public override void SetStaticDefaults() => this.SetUpLantern(ModContent.ItemType<Items.Placeables.FurnitureMonolith.MonolithLantern>(), true);
|
||||
public override void SetDrawPositions(int i, int j, ref int width, ref int offsetY, ref int height, ref short tileFrameX, ref short tileFrameY) => CalamityUtils.PlatformHangOffset(i, j, ref offsetY);
|
||||
public override bool PreDraw(int i, int j, SpriteBatch spriteBatch) => CalamityUtils.DrawSwayingMultiTile(i, j);
|
||||
|
||||
public override bool CreateDust(int i, int j, ref int type)
|
||||
{
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using CalamityMod.Dusts.Furniture;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
@@ -10,7 +11,7 @@ namespace CalamityMod.Tiles.FurnitureOtherworldly
|
||||
public class OtherworldlyLantern : ModTile
|
||||
{
|
||||
public override void SetStaticDefaults() => this.SetUpLantern(ModContent.ItemType<Items.Placeables.FurnitureOtherworldly.OtherworldlyLantern>(), true);
|
||||
public override void SetDrawPositions(int i, int j, ref int width, ref int offsetY, ref int height, ref short tileFrameX, ref short tileFrameY) => CalamityUtils.PlatformHangOffset(i, j, ref offsetY);
|
||||
public override bool PreDraw(int i, int j, SpriteBatch spriteBatch) => CalamityUtils.DrawSwayingMultiTile(i, j);
|
||||
|
||||
public override bool CreateDust(int i, int j, ref int type)
|
||||
{
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
@@ -8,7 +9,7 @@ namespace CalamityMod.Tiles.FurniturePlaguedPlate
|
||||
public class PlaguedPlateLantern : ModTile
|
||||
{
|
||||
public override void SetStaticDefaults() => this.SetUpLantern(ModContent.ItemType<Items.Placeables.FurniturePlagued.PlaguedPlateLantern>(), true);
|
||||
public override void SetDrawPositions(int i, int j, ref int width, ref int offsetY, ref int height, ref short tileFrameX, ref short tileFrameY) => CalamityUtils.PlatformHangOffset(i, j, ref offsetY);
|
||||
public override bool PreDraw(int i, int j, SpriteBatch spriteBatch) => CalamityUtils.DrawSwayingMultiTile(i, j);
|
||||
|
||||
public override bool CreateDust(int i, int j, ref int type)
|
||||
{
|
||||
|
||||
@@ -11,7 +11,7 @@ namespace CalamityMod.Tiles.FurnitureProfaned
|
||||
public class ProfanedLantern : ModTile
|
||||
{
|
||||
public override void SetStaticDefaults() => this.SetUpLantern(ModContent.ItemType<Items.Placeables.FurnitureProfaned.ProfanedLantern>(), true);
|
||||
public override void SetDrawPositions(int i, int j, ref int width, ref int offsetY, ref int height, ref short tileFrameX, ref short tileFrameY) => CalamityUtils.PlatformHangOffset(i, j, ref offsetY);
|
||||
public override bool PreDraw(int i, int j, SpriteBatch spriteBatch) => CalamityUtils.DrawSwayingMultiTile(i, j);
|
||||
|
||||
public override bool CreateDust(int i, int j, ref int type)
|
||||
{
|
||||
|
||||
@@ -18,6 +18,7 @@ namespace CalamityMod.Tiles.FurnitureSacrilegious
|
||||
Main.tileFrameImportant[Type] = true;
|
||||
Main.tileNoAttach[Type] = true;
|
||||
Main.tileLavaDeath[Type] = false;
|
||||
TileID.Sets.MultiTileSway[Type] = true;
|
||||
|
||||
TileObjectData.newTile.CopyFrom(TileObjectData.Style2xX);
|
||||
TileObjectData.newTile.LavaDeath = false;
|
||||
@@ -37,6 +38,6 @@ namespace CalamityMod.Tiles.FurnitureSacrilegious
|
||||
AddMapEntry(new Color(43, 19, 42), Language.GetText("MapObject.Banner"));
|
||||
}
|
||||
|
||||
public override void SetDrawPositions(int i, int j, ref int width, ref int offsetY, ref int height, ref short tileFrameX, ref short tileFrameY) => CalamityUtils.PlatformHangOffset(i, j, ref offsetY);
|
||||
public override bool PreDraw(int i, int j, SpriteBatch spriteBatch) => CalamityUtils.DrawSwayingMultiTile(i, j);
|
||||
}
|
||||
}
|
||||
@@ -18,6 +18,7 @@ namespace CalamityMod.Tiles.FurnitureSacrilegious
|
||||
Main.tileFrameImportant[Type] = true;
|
||||
Main.tileNoAttach[Type] = true;
|
||||
Main.tileLavaDeath[Type] = false;
|
||||
TileID.Sets.MultiTileSway[Type] = true;
|
||||
|
||||
TileObjectData.newTile.CopyFrom(TileObjectData.Style2xX);
|
||||
TileObjectData.newTile.LavaDeath = false;
|
||||
@@ -37,6 +38,6 @@ namespace CalamityMod.Tiles.FurnitureSacrilegious
|
||||
AddMapEntry(new Color(43, 19, 42), Language.GetText("MapObject.Banner"));
|
||||
}
|
||||
|
||||
public override void SetDrawPositions(int i, int j, ref int width, ref int offsetY, ref int height, ref short tileFrameX, ref short tileFrameY) => CalamityUtils.PlatformHangOffset(i, j, ref offsetY);
|
||||
public override bool PreDraw(int i, int j, SpriteBatch spriteBatch) => CalamityUtils.DrawSwayingMultiTile(i, j);
|
||||
}
|
||||
}
|
||||
@@ -10,7 +10,7 @@ namespace CalamityMod.Tiles.FurnitureSacrilegious
|
||||
public class SacrilegiousLanternTile : ModTile
|
||||
{
|
||||
public override void SetStaticDefaults() => this.SetUpLantern(ModContent.ItemType<SacrilegiousLantern>(), true);
|
||||
public override void SetDrawPositions(int i, int j, ref int width, ref int offsetY, ref int height, ref short tileFrameX, ref short tileFrameY) => CalamityUtils.PlatformHangOffset(i, j, ref offsetY);
|
||||
public override bool PreDraw(int i, int j, SpriteBatch spriteBatch) => CalamityUtils.DrawSwayingMultiTile(i, j);
|
||||
|
||||
public override bool CreateDust(int i, int j, ref int type)
|
||||
{
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using CalamityMod.Dusts.Furniture;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
@@ -9,7 +10,7 @@ namespace CalamityMod.Tiles.FurnitureSilva
|
||||
public class SilvaLantern : ModTile
|
||||
{
|
||||
public override void SetStaticDefaults() => this.SetUpLantern(ModContent.ItemType<Items.Placeables.FurnitureSilva.SilvaLantern>(), true);
|
||||
public override void SetDrawPositions(int i, int j, ref int width, ref int offsetY, ref int height, ref short tileFrameX, ref short tileFrameY) => CalamityUtils.PlatformHangOffset(i, j, ref offsetY);
|
||||
public override bool PreDraw(int i, int j, SpriteBatch spriteBatch) => CalamityUtils.DrawSwayingMultiTile(i, j);
|
||||
|
||||
public override bool CreateDust(int i, int j, ref int type)
|
||||
{
|
||||
|
||||
@@ -9,7 +9,7 @@ namespace CalamityMod.Tiles.FurnitureStatigel
|
||||
public class StatigelLantern : ModTile
|
||||
{
|
||||
public override void SetStaticDefaults() => this.SetUpLantern(ModContent.ItemType<Items.Placeables.FurnitureStatigel.StatigelLantern>());
|
||||
public override void SetDrawPositions(int i, int j, ref int width, ref int offsetY, ref int height, ref short tileFrameX, ref short tileFrameY) => CalamityUtils.PlatformHangOffset(i, j, ref offsetY);
|
||||
public override bool PreDraw(int i, int j, SpriteBatch spriteBatch) => CalamityUtils.DrawSwayingMultiTile(i, j);
|
||||
|
||||
public override bool CreateDust(int i, int j, ref int type)
|
||||
{
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
@@ -8,7 +9,7 @@ namespace CalamityMod.Tiles.FurnitureStratus
|
||||
public class StratusLantern : ModTile
|
||||
{
|
||||
public override void SetStaticDefaults() => this.SetUpLantern(ModContent.ItemType<Items.Placeables.FurnitureStratus.StratusLantern>(), true);
|
||||
public override void SetDrawPositions(int i, int j, ref int width, ref int offsetY, ref int height, ref short tileFrameX, ref short tileFrameY) => CalamityUtils.PlatformHangOffset(i, j, ref offsetY);
|
||||
public override bool PreDraw(int i, int j, SpriteBatch spriteBatch) => CalamityUtils.DrawSwayingMultiTile(i, j);
|
||||
|
||||
public override bool CreateDust(int i, int j, ref int type)
|
||||
{
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
@@ -8,7 +9,7 @@ namespace CalamityMod.Tiles.FurnitureVoid
|
||||
public class VoidLantern : ModTile
|
||||
{
|
||||
public override void SetStaticDefaults() => this.SetUpLantern(ModContent.ItemType<Items.Placeables.FurnitureVoid.VoidLantern>(), true);
|
||||
public override void SetDrawPositions(int i, int j, ref int width, ref int offsetY, ref int height, ref short tileFrameX, ref short tileFrameY) => CalamityUtils.PlatformHangOffset(i, j, ref offsetY);
|
||||
public override bool PreDraw(int i, int j, SpriteBatch spriteBatch) => CalamityUtils.DrawSwayingMultiTile(i, j);
|
||||
|
||||
public override bool CreateDust(int i, int j, ref int type)
|
||||
{
|
||||
|
||||
@@ -27,7 +27,7 @@ namespace CalamityMod.Tiles.FurnitureWulfrum
|
||||
AdjTiles = new int[] { TileID.HangingLanterns };
|
||||
}
|
||||
|
||||
public override void SetDrawPositions(int i, int j, ref int width, ref int offsetY, ref int height, ref short tileFrameX, ref short tileFrameY) => CalamityUtils.PlatformHangOffset(i, j, ref offsetY);
|
||||
public override bool PreDraw(int i, int j, SpriteBatch spriteBatch) => CalamityUtils.DrawSwayingMultiTile(i, j);
|
||||
|
||||
public override bool CanExplode(int i, int j) => false;
|
||||
|
||||
|
||||
@@ -29,6 +29,7 @@ namespace CalamityMod.Tiles
|
||||
Main.tileFrameImportant[Type] = true;
|
||||
Main.tileNoAttach[Type] = true;
|
||||
Main.tileLavaDeath[Type] = true;
|
||||
TileID.Sets.MultiTileSway[Type] = true;
|
||||
TileObjectData.newTile.CopyFrom(TileObjectData.Style1x2Top);
|
||||
TileObjectData.newTile.Height = 3;
|
||||
TileObjectData.newTile.CoordinateHeights = new int[] { 16, 16, 16 };
|
||||
@@ -62,7 +63,7 @@ namespace CalamityMod.Tiles
|
||||
}
|
||||
}
|
||||
|
||||
public override void SetDrawPositions(int i, int j, ref int width, ref int offsetY, ref int height, ref short tileFrameX, ref short tileFrameY) => CalamityUtils.PlatformHangOffset(i, j, ref offsetY);
|
||||
public override bool PreDraw(int i, int j, SpriteBatch spriteBatch) => CalamityUtils.DrawSwayingMultiTile(i, j);
|
||||
|
||||
public static int GetBannerNPC(int style)
|
||||
{
|
||||
|
||||
@@ -1251,6 +1251,7 @@ namespace CalamityMod
|
||||
Main.tileLavaDeath[mt.Type] = !lavaImmune;
|
||||
Main.tileWaterDeath[mt.Type] = false;
|
||||
TileID.Sets.DisableSmartCursor[mt.Type] = true;
|
||||
TileID.Sets.MultiTileSway[mt.Type] = true;
|
||||
TileObjectData.newTile.CopyFrom(TileObjectData.Style1x2Top);
|
||||
TileObjectData.newTile.LavaDeath = !lavaImmune;
|
||||
TileObjectData.newTile.LavaPlacement = lavaImmune ? LiquidPlacement.Allowed : LiquidPlacement.NotAllowed;
|
||||
@@ -1270,19 +1271,6 @@ namespace CalamityMod
|
||||
mt.AdjTiles = new int[] { TileID.HangingLanterns };
|
||||
}
|
||||
|
||||
// Allow hanging lanterns to move up when hung on platforms
|
||||
internal static void PlatformHangOffset(int i, int j, ref int offsetY)
|
||||
{
|
||||
Tile tile = Main.tile[i, j];
|
||||
TileObjectData data = TileObjectData.GetTileData(tile);
|
||||
int topLeftX = i - tile.TileFrameX / 18 % data.Width;
|
||||
int topLeftY = j - tile.TileFrameY / 18 % data.Height;
|
||||
if (WorldGen.IsBelowANonHammeredPlatform(topLeftX, topLeftY))
|
||||
{
|
||||
offsetY -= 8;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Extension which initializes a ModTile to be a piano.
|
||||
/// </summary>
|
||||
|
||||
@@ -22,6 +22,7 @@ using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.GameContent;
|
||||
using Terraria.GameContent.Drawing;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using Terraria.ObjectData;
|
||||
@@ -112,6 +113,14 @@ namespace CalamityMod
|
||||
NetMessage.SendTileSquare(-1, x, y, tileX, tileY);
|
||||
}
|
||||
|
||||
public static bool DrawSwayingMultiTile(int i, int j)
|
||||
{
|
||||
Tile tile = Main.tile[i, j];
|
||||
if (TileObjectData.IsTopLeft(tile))
|
||||
Main.instance.TilesRenderer.AddSpecialPoint(i, j, TileDrawing.TileCounterType.MultiTileVine);
|
||||
return false;
|
||||
}
|
||||
|
||||
public static void DrawFlameEffect(Texture2D flameTexture, int i, int j, int offsetX = 0, int offsetY = 0)
|
||||
{
|
||||
Tile tile = Main.tile[i, j];
|
||||
|
||||
Reference in new issue
Block a user