Merge branch '1.4.4' of https://github.com/CalamityTeam/CalamityMod into 1.4.4
This commit is contained in:
commit
ababf70830
51 files changed
+100
-175
No files matched your search
@@ -97,13 +97,10 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
if (target.knockBackResist <= 0f)
|
||||
return;
|
||||
|
||||
// 12AUG2023: Ozzatron: TML was giving NaN knockback, probably due to 0 base knockback. Do not use hit.Knockback
|
||||
if (CalamityGlobalNPC.ShouldAffectNPC(target))
|
||||
{
|
||||
float knockbackMultiplier = hit.Knockback - (1f - target.knockBackResist);
|
||||
if (knockbackMultiplier < 0)
|
||||
{
|
||||
knockbackMultiplier = 0;
|
||||
}
|
||||
float knockbackMultiplier = MathHelper.Clamp(1f - target.knockBackResist, 0f, 1f);
|
||||
Vector2 trueKnockback = target.Center - Projectile.Center;
|
||||
trueKnockback.Normalize();
|
||||
target.velocity = trueKnockback * knockbackMultiplier;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using CalamityMod.NPCs;
|
||||
using CalamityMod.NPCs;
|
||||
using CalamityMod.NPCs.AcidRain;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
@@ -73,13 +73,10 @@ namespace CalamityMod.Projectiles.Typeless
|
||||
if (target.knockBackResist <= 0f)
|
||||
return;
|
||||
|
||||
// 12AUG2023: Ozzatron: TML was giving NaN knockback, probably due to 0 base knockback. Do not use hit.Knockback
|
||||
if (CalamityGlobalNPC.ShouldAffectNPC(target))
|
||||
{
|
||||
float knockbackMultiplier = hit.Knockback - (1f - target.knockBackResist);
|
||||
if (knockbackMultiplier < 0)
|
||||
{
|
||||
knockbackMultiplier = 0;
|
||||
}
|
||||
float knockbackMultiplier = MathHelper.Clamp(1f - target.knockBackResist, 0f, 1f);
|
||||
Vector2 trueKnockback = target.Center - Projectile.Center;
|
||||
trueKnockback.Normalize();
|
||||
target.velocity = trueKnockback * knockbackMultiplier;
|
||||
|
||||
@@ -67,13 +67,12 @@ namespace CalamityMod.Projectiles.Typeless
|
||||
if (target.knockBackResist <= 0f)
|
||||
return;
|
||||
|
||||
// 12AUG2023: Ozzatron: TML was giving NaN knockback, probably due to 0 base knockback. Do not use hit.Knockback
|
||||
if (CalamityGlobalNPC.ShouldAffectNPC(target))
|
||||
{
|
||||
float knockbackMultiplier = hit.Knockback - (1f - target.knockBackResist);
|
||||
if (knockbackMultiplier < 0)
|
||||
knockbackMultiplier = 0;
|
||||
|
||||
Vector2 trueKnockback = Projectile.SafeDirectionTo(target.Center);
|
||||
float knockbackMultiplier = MathHelper.Clamp(1f - target.knockBackResist, 0f, 1f);
|
||||
Vector2 trueKnockback = target.Center - Projectile.Center;
|
||||
trueKnockback.Normalize();
|
||||
target.velocity = trueKnockback * knockbackMultiplier;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using CalamityMod.DataStructures;
|
||||
using CalamityMod.DataStructures;
|
||||
using CalamityMod.NPCs;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
@@ -91,13 +91,10 @@ namespace CalamityMod.Projectiles.Typeless
|
||||
if (target.knockBackResist <= 0f)
|
||||
return;
|
||||
|
||||
// 12AUG2023: Ozzatron: TML was giving NaN knockback, probably due to 0 base knockback. Do not use hit.Knockback
|
||||
if (CalamityGlobalNPC.ShouldAffectNPC(target))
|
||||
{
|
||||
float knockbackMultiplier = hit.Knockback - (1f - target.knockBackResist);
|
||||
if (knockbackMultiplier < 0)
|
||||
{
|
||||
knockbackMultiplier = 0;
|
||||
}
|
||||
float knockbackMultiplier = MathHelper.Clamp(1f - target.knockBackResist, 0f, 1f);
|
||||
Vector2 trueKnockback = target.Center - Projectile.Center;
|
||||
trueKnockback.Normalize();
|
||||
target.velocity = trueKnockback * knockbackMultiplier;
|
||||
|
||||
@@ -41,10 +41,5 @@ namespace CalamityMod.Tiles.Abyss
|
||||
{
|
||||
num = fail ? 1 : 3;
|
||||
}
|
||||
|
||||
public override void KillMultiTile(int i, int j, int frameX, int frameY)
|
||||
{
|
||||
Item.NewItem(new EntitySource_TileBreak(i, j), i * 16, j * 16, 16, 32, ModContent.ItemType<SulphurousCrate>());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,15 +1,14 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using System;
|
||||
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;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria.Enums;
|
||||
using System;
|
||||
using ReLogic.Content;
|
||||
using Terraria.Localization;
|
||||
using CalamityMod.ForegroundDrawing;
|
||||
|
||||
namespace CalamityMod.Tiles.BaseTiles
|
||||
{
|
||||
@@ -54,6 +53,8 @@ namespace CalamityMod.Tiles.BaseTiles
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
RegisterItemDrop(AssociatedItem);
|
||||
|
||||
Main.tileShine[Type] = 400; // Responsible for golden particles
|
||||
Main.tileFrameImportant[Type] = true; // Any multitile requires this
|
||||
TileID.Sets.InteractibleByNPCs[Type] = true; // Town NPCs will palm their hand at this tile
|
||||
|
||||
@@ -14,6 +14,8 @@ namespace CalamityMod.Tiles.Furniture
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
RegisterItemDrop(ModContent.ItemType<AuricToilet>());
|
||||
|
||||
Main.tileFrameImportant[Type] = true;
|
||||
Main.tileLavaDeath[Type] = false;
|
||||
Main.tileWaterDeath[Type] = false;
|
||||
@@ -22,7 +24,7 @@ namespace CalamityMod.Tiles.Furniture
|
||||
TileObjectData.newTile.CoordinateHeights = new int[] { 16, 16, 16 };
|
||||
TileObjectData.newTile.CoordinateWidth = 16;
|
||||
TileObjectData.newTile.CoordinatePadding = 2;
|
||||
TileObjectData.newTile.DrawYOffset = 4;
|
||||
TileObjectData.newTile.DrawYOffset = 4;
|
||||
TileObjectData.newTile.Direction = TileObjectDirection.PlaceLeft;
|
||||
TileObjectData.newTile.StyleHorizontal = true;
|
||||
TileObjectData.newTile.Origin = new Point16(1, 1);
|
||||
|
||||
@@ -3,7 +3,6 @@ using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.Enums;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
using Terraria.ObjectData;
|
||||
|
||||
@@ -19,6 +18,11 @@ namespace CalamityMod.Tiles.Furniture.CraftingStations
|
||||
//
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
// 12AUG2023: Ozzatron: I had to touch this code
|
||||
// It was absolutely necessary to allow for right-facing Eutrophic Shelves to drop following the TML 1.4.4 change:
|
||||
// https://github.com/tModLoader/tModLoader/pull/3420
|
||||
RegisterItemDrop(ModContent.ItemType<Items.Placeables.Furniture.CraftingStations.EutrophicShelf>());
|
||||
|
||||
Main.tileLighted[Type] = true;
|
||||
Main.tileFrameImportant[Type] = true;
|
||||
Main.tileLavaDeath[Type] = true;
|
||||
|
||||
@@ -1,13 +1,11 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
namespace CalamityMod.Tiles.FurnitureAbyss
|
||||
{
|
||||
public class AbyssBathtub : ModTile
|
||||
{
|
||||
public override void SetStaticDefaults() => this.SetUpBathtub(true);
|
||||
public override void SetStaticDefaults() => this.SetUpBathtub(ModContent.ItemType<Items.Placeables.FurnitureAbyss.AbyssBathtub>());
|
||||
|
||||
public override bool CreateDust(int i, int j, ref int type)
|
||||
{
|
||||
|
||||
@@ -1,16 +1,13 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.GameContent.ObjectInteractions;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Tiles.FurnitureAbyss
|
||||
{
|
||||
public class AbyssBed : ModTile
|
||||
{
|
||||
public override void SetStaticDefaults() => this.SetUpBed(true);
|
||||
public override void SetStaticDefaults() => this.SetUpBed(ModContent.ItemType<Items.Placeables.FurnitureAbyss.AbyssBed>(), true);
|
||||
|
||||
public override bool CreateDust(int i, int j, ref int type)
|
||||
{
|
||||
|
||||
@@ -1,14 +1,12 @@
|
||||
using CalamityMod.Items.Placeables.FurnitureAcidwood;
|
||||
using CalamityMod.Items.Placeables.FurnitureAcidwood;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
namespace CalamityMod.Tiles.FurnitureAcidwood
|
||||
{
|
||||
public class AcidwoodBathTile : ModTile
|
||||
{
|
||||
public override void SetStaticDefaults() => this.SetUpBathtub();
|
||||
public override void SetStaticDefaults() => this.SetUpBathtub(ModContent.ItemType<AcidwoodBathtub>());
|
||||
|
||||
public override bool CreateDust(int i, int j, ref int type)
|
||||
{
|
||||
|
||||
@@ -1,17 +1,14 @@
|
||||
using CalamityMod.Items.Placeables.FurnitureAcidwood;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.GameContent.ObjectInteractions;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Tiles.FurnitureAcidwood
|
||||
{
|
||||
public class AcidwoodBedTile : ModTile
|
||||
{
|
||||
public override void SetStaticDefaults() => this.SetUpBed();
|
||||
public override void SetStaticDefaults() => this.SetUpBed(ModContent.ItemType<AcidwoodBed>());
|
||||
|
||||
public override bool CreateDust(int i, int j, ref int type)
|
||||
{
|
||||
|
||||
@@ -16,6 +16,8 @@ namespace CalamityMod.Tiles.FurnitureAcidwood
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
RegisterItemDrop(ModContent.ItemType<AcidwoodChair>());
|
||||
|
||||
Main.tileFrameImportant[Type] = true;
|
||||
Main.tileLavaDeath[Type] = true;
|
||||
Main.tileWaterDeath[Type] = false;
|
||||
|
||||
@@ -1,13 +1,11 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
namespace CalamityMod.Tiles.FurnitureAncient
|
||||
{
|
||||
public class AncientBathtub : ModTile
|
||||
{
|
||||
public override void SetStaticDefaults() => this.SetUpBathtub(true);
|
||||
public override void SetStaticDefaults() => this.SetUpBathtub(ModContent.ItemType<Items.Placeables.FurnitureAncient.AncientBathtub>());
|
||||
|
||||
public override bool CreateDust(int i, int j, ref int type)
|
||||
{
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.GameContent;
|
||||
using Terraria.GameContent.ObjectInteractions;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
@@ -11,7 +9,7 @@ namespace CalamityMod.Tiles.FurnitureAncient
|
||||
{
|
||||
public class AncientBed : ModTile
|
||||
{
|
||||
public override void SetStaticDefaults() => this.SetUpBed(true);
|
||||
public override void SetStaticDefaults() => this.SetUpBed(ModContent.ItemType<Items.Placeables.FurnitureAncient.AncientBed>(), true);
|
||||
|
||||
public override bool CreateDust(int i, int j, ref int type)
|
||||
{
|
||||
|
||||
@@ -1,13 +1,11 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
namespace CalamityMod.Tiles.FurnitureAshen
|
||||
{
|
||||
public class AshenBathtub : ModTile
|
||||
{
|
||||
public override void SetStaticDefaults() => this.SetUpBathtub(true);
|
||||
public override void SetStaticDefaults() => this.SetUpBathtub(ModContent.ItemType<Items.Placeables.FurnitureAshen.AshenBathtub>());
|
||||
|
||||
public override bool CreateDust(int i, int j, ref int type)
|
||||
{
|
||||
|
||||
@@ -1,16 +1,13 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.GameContent.ObjectInteractions;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Tiles.FurnitureAshen
|
||||
{
|
||||
public class AshenBed : ModTile
|
||||
{
|
||||
public override void SetStaticDefaults() => this.SetUpBed(true);
|
||||
public override void SetStaticDefaults() => this.SetUpBed(ModContent.ItemType<Items.Placeables.FurnitureAshen.AshenBed>(), true);
|
||||
|
||||
public override bool CreateDust(int i, int j, ref int type)
|
||||
{
|
||||
|
||||
@@ -1,14 +1,12 @@
|
||||
using CalamityMod.Dusts.Furniture;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
namespace CalamityMod.Tiles.FurnitureBotanic
|
||||
{
|
||||
public class BotanicBathtub : ModTile
|
||||
{
|
||||
public override void SetStaticDefaults() => this.SetUpBathtub(true);
|
||||
public override void SetStaticDefaults() => this.SetUpBathtub(ModContent.ItemType<Items.Placeables.FurnitureBotanic.BotanicBathtub>());
|
||||
|
||||
public override bool CreateDust(int i, int j, ref int type)
|
||||
{
|
||||
|
||||
@@ -1,17 +1,14 @@
|
||||
using CalamityMod.Dusts.Furniture;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.GameContent.ObjectInteractions;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Tiles.FurnitureBotanic
|
||||
{
|
||||
public class BotanicBed : ModTile
|
||||
{
|
||||
public override void SetStaticDefaults() => this.SetUpBed(true);
|
||||
public override void SetStaticDefaults() => this.SetUpBed(ModContent.ItemType<Items.Placeables.FurnitureBotanic.BotanicBed>(), true);
|
||||
|
||||
public override bool CreateDust(int i, int j, ref int type)
|
||||
{
|
||||
|
||||
@@ -1,13 +1,11 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
namespace CalamityMod.Tiles.FurnitureCosmilite
|
||||
{
|
||||
public class CosmiliteBathtub : ModTile
|
||||
{
|
||||
public override void SetStaticDefaults() => this.SetUpBathtub(true);
|
||||
public override void SetStaticDefaults() => this.SetUpBathtub(ModContent.ItemType<Items.Placeables.FurnitureCosmilite.CosmiliteBathtub>());
|
||||
|
||||
public override bool CreateDust(int i, int j, ref int type)
|
||||
{
|
||||
|
||||
@@ -1,16 +1,13 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.GameContent.ObjectInteractions;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Tiles.FurnitureCosmilite
|
||||
{
|
||||
public class CosmiliteBed : ModTile
|
||||
{
|
||||
public override void SetStaticDefaults() => this.SetUpBed(true);
|
||||
public override void SetStaticDefaults() => this.SetUpBed(ModContent.ItemType<Items.Placeables.FurnitureCosmilite.CosmiliteBed>(), true);
|
||||
|
||||
public override bool CreateDust(int i, int j, ref int type)
|
||||
{
|
||||
|
||||
@@ -1,15 +1,12 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
using Terraria.ObjectData;
|
||||
|
||||
namespace CalamityMod.Tiles.FurnitureEutrophic
|
||||
{
|
||||
public class EutrophicBathtub : ModTile
|
||||
{
|
||||
public override void SetStaticDefaults() => this.SetUpBathtub();
|
||||
public override void SetStaticDefaults() => this.SetUpBathtub(ModContent.ItemType<Items.Placeables.FurnitureEutrophic.EutrophicBathtub>());
|
||||
|
||||
public override bool CreateDust(int i, int j, ref int type)
|
||||
{
|
||||
|
||||
@@ -1,16 +1,13 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.GameContent.ObjectInteractions;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Tiles.FurnitureEutrophic
|
||||
{
|
||||
public class EutrophicBed : ModTile
|
||||
{
|
||||
public override void SetStaticDefaults() => this.SetUpBed();
|
||||
public override void SetStaticDefaults() => this.SetUpBed(ModContent.ItemType<Items.Placeables.FurnitureEutrophic.EutrophicBed>());
|
||||
|
||||
public override bool CreateDust(int i, int j, ref int type)
|
||||
{
|
||||
|
||||
@@ -2,14 +2,12 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
namespace CalamityMod.Tiles.FurnitureExo
|
||||
{
|
||||
public class ExoBathtubTile : ModTile
|
||||
{
|
||||
public override void SetStaticDefaults() => this.SetUpBathtub(true);
|
||||
public override void SetStaticDefaults() => this.SetUpBathtub(ModContent.ItemType<ExoBathtub>());
|
||||
|
||||
public override bool CanExplode(int i, int j) => false;
|
||||
|
||||
|
||||
@@ -2,17 +2,14 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.GameContent.ObjectInteractions;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Tiles.FurnitureExo
|
||||
{
|
||||
public class ExoBedTile : ModTile
|
||||
{
|
||||
public override void SetStaticDefaults() => this.SetUpBed(true);
|
||||
public override void SetStaticDefaults() => this.SetUpBed(ModContent.ItemType<ExoBed>(), true);
|
||||
|
||||
public override bool CanExplode(int i, int j) => false;
|
||||
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.Enums;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.Enums;
|
||||
using Terraria.GameContent;
|
||||
using Terraria.GameContent.ObjectInteractions;
|
||||
using Terraria.ID;
|
||||
@@ -17,6 +17,8 @@ namespace CalamityMod.Tiles.FurnitureExo
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
RegisterItemDrop(ModContent.ItemType<ExoChair>());
|
||||
|
||||
Main.tileFrameImportant[Type] = true;
|
||||
Main.tileLavaDeath[Type] = false;
|
||||
Main.tileWaterDeath[Type] = false;
|
||||
|
||||
@@ -15,9 +15,11 @@ namespace CalamityMod.Tiles.FurnitureExo
|
||||
{
|
||||
public class ExoToiletTile : ModTile
|
||||
{
|
||||
public const int NextStyleHeight = 40;
|
||||
public const int NextStyleHeight = 40;
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
RegisterItemDrop(ModContent.ItemType<ExoToilet>());
|
||||
|
||||
Main.tileFrameImportant[Type] = true;
|
||||
Main.tileLavaDeath[Type] = false;
|
||||
Main.tileWaterDeath[Type] = false;
|
||||
|
||||
@@ -2,14 +2,12 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
namespace CalamityMod.Tiles.FurnitureMonolith
|
||||
{
|
||||
public class MonolithBathtub : ModTile
|
||||
{
|
||||
public override void SetStaticDefaults() => this.SetUpBathtub(true);
|
||||
public override void SetStaticDefaults() => this.SetUpBathtub(ModContent.ItemType<Items.Placeables.FurnitureMonolith.MonolithBathtub>());
|
||||
|
||||
public override bool CreateDust(int i, int j, ref int type)
|
||||
{
|
||||
|
||||
@@ -2,17 +2,14 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.GameContent.ObjectInteractions;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Tiles.FurnitureMonolith
|
||||
{
|
||||
public class MonolithBed : ModTile
|
||||
{
|
||||
public override void SetStaticDefaults() => this.SetUpBed(true);
|
||||
public override void SetStaticDefaults() => this.SetUpBed(ModContent.ItemType<Items.Placeables.FurnitureMonolith.MonolithBed>(), true);
|
||||
|
||||
public override bool CreateDust(int i, int j, ref int type)
|
||||
{
|
||||
|
||||
@@ -1,15 +1,13 @@
|
||||
using CalamityMod.Dusts.Furniture;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
namespace CalamityMod.Tiles.FurnitureOtherworldly
|
||||
{
|
||||
[LegacyName("OccultBathtub")]
|
||||
public class OtherworldlyBathtub : ModTile
|
||||
{
|
||||
public override void SetStaticDefaults() => this.SetUpBathtub(true);
|
||||
public override void SetStaticDefaults() => this.SetUpBathtub(ModContent.ItemType<Items.Placeables.FurnitureOtherworldly.OtherworldlyBathtub>());
|
||||
|
||||
public override bool CreateDust(int i, int j, ref int type)
|
||||
{
|
||||
|
||||
@@ -1,10 +1,7 @@
|
||||
using CalamityMod.Dusts.Furniture;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.GameContent.ObjectInteractions;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Tiles.FurnitureOtherworldly
|
||||
@@ -12,7 +9,7 @@ namespace CalamityMod.Tiles.FurnitureOtherworldly
|
||||
[LegacyName("OccultBed")]
|
||||
public class OtherworldlyBed : ModTile
|
||||
{
|
||||
public override void SetStaticDefaults() => this.SetUpBed(true);
|
||||
public override void SetStaticDefaults() => this.SetUpBed(ModContent.ItemType<Items.Placeables.FurnitureOtherworldly.OtherworldlyBed>(), true);
|
||||
|
||||
public override bool CreateDust(int i, int j, ref int type)
|
||||
{
|
||||
|
||||
@@ -1,13 +1,11 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
namespace CalamityMod.Tiles.FurniturePlaguedPlate
|
||||
{
|
||||
public class PlaguedPlateBathtub : ModTile
|
||||
{
|
||||
public override void SetStaticDefaults() => this.SetUpBathtub(true);
|
||||
public override void SetStaticDefaults() => this.SetUpBathtub(ModContent.ItemType<Items.Placeables.FurniturePlagued.PlaguedPlateBathtub>());
|
||||
|
||||
public override bool CreateDust(int i, int j, ref int type)
|
||||
{
|
||||
|
||||
@@ -1,14 +1,12 @@
|
||||
using CalamityMod.Dusts.Furniture;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
namespace CalamityMod.Tiles.FurnitureProfaned
|
||||
{
|
||||
public class ProfanedBath : ModTile
|
||||
{
|
||||
public override void SetStaticDefaults() => this.SetUpBathtub(true);
|
||||
public override void SetStaticDefaults() => this.SetUpBathtub(ModContent.ItemType<Items.Placeables.FurnitureProfaned.ProfanedBathtub>());
|
||||
|
||||
public override bool CreateDust(int i, int j, ref int type)
|
||||
{
|
||||
|
||||
@@ -1,17 +1,14 @@
|
||||
using CalamityMod.Dusts.Furniture;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.GameContent.ObjectInteractions;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Tiles.FurnitureProfaned
|
||||
{
|
||||
public class ProfanedBed : ModTile
|
||||
{
|
||||
public override void SetStaticDefaults() => this.SetUpBed(true);
|
||||
public override void SetStaticDefaults() => this.SetUpBed(ModContent.ItemType<Items.Placeables.FurnitureProfaned.ProfanedBed>(), true);
|
||||
|
||||
public override bool CreateDust(int i, int j, ref int type)
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using CalamityMod.Items.Placeables.FurnitureSacrilegious;
|
||||
using CalamityMod.Items.Placeables.FurnitureSacrilegious;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
@@ -14,6 +14,8 @@ namespace CalamityMod.Tiles.FurnitureSacrilegious
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
RegisterItemDrop(ModContent.ItemType<LargeRitualCandle>());
|
||||
|
||||
Main.tileFrameImportant[Type] = true;
|
||||
Main.tileNoAttach[Type] = true;
|
||||
Main.tileLavaDeath[Type] = false;
|
||||
@@ -26,7 +28,7 @@ namespace CalamityMod.Tiles.FurnitureSacrilegious
|
||||
16,
|
||||
16,
|
||||
16,
|
||||
16
|
||||
16
|
||||
};
|
||||
TileObjectData.newTile.Origin = new Point16(0, 4);
|
||||
TileObjectData.newTile.UsesCustomCanPlace = true;
|
||||
@@ -34,7 +36,7 @@ namespace CalamityMod.Tiles.FurnitureSacrilegious
|
||||
TileObjectData.newTile.StyleLineSkip = 4;
|
||||
TileObjectData.addTile(Type);
|
||||
|
||||
AddToArray(ref TileID.Sets.RoomNeeds.CountsAsTorch);
|
||||
AddToArray(ref TileID.Sets.RoomNeeds.CountsAsTorch);
|
||||
AddMapEntry(new Color(43, 19, 42), Language.GetText("Large Ritual Candle"));
|
||||
|
||||
TileID.Sets.DisableSmartCursor[Type] = true;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using CalamityMod.Items.Placeables.FurnitureSacrilegious;
|
||||
using CalamityMod.Items.Placeables.FurnitureSacrilegious;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
@@ -15,6 +15,8 @@ namespace CalamityMod.Tiles.FurnitureSacrilegious
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
RegisterItemDrop(ModContent.ItemType<RitualCandle>());
|
||||
|
||||
Main.tileFrameImportant[Type] = true;
|
||||
Main.tileNoAttach[Type] = true;
|
||||
Main.tileLavaDeath[Type] = false;
|
||||
@@ -26,13 +28,13 @@ namespace CalamityMod.Tiles.FurnitureSacrilegious
|
||||
16
|
||||
};
|
||||
TileObjectData.newTile.Origin = new Point16(0, 1);
|
||||
TileObjectData.newTile.AnchorBottom = new AnchorData(AnchorType.SolidTile | AnchorType.SolidWithTop | AnchorType.Table | AnchorType.SolidSide, TileObjectData.newTile.Width, 0);
|
||||
TileObjectData.newTile.AnchorBottom = new AnchorData(AnchorType.SolidTile | AnchorType.SolidWithTop | AnchorType.Table | AnchorType.SolidSide, TileObjectData.newTile.Width, 0);
|
||||
TileObjectData.newTile.UsesCustomCanPlace = true;
|
||||
TileObjectData.newTile.LavaDeath = false;
|
||||
TileObjectData.newTile.StyleLineSkip = 4;
|
||||
TileObjectData.addTile(Type);
|
||||
|
||||
AddToArray(ref TileID.Sets.RoomNeeds.CountsAsTorch);
|
||||
AddToArray(ref TileID.Sets.RoomNeeds.CountsAsTorch);
|
||||
AddMapEntry(new Color(43, 19, 42), Language.GetText("Ritual Candle"));
|
||||
|
||||
TileID.Sets.DisableSmartCursor[Type] = true;
|
||||
|
||||
@@ -1,14 +1,12 @@
|
||||
using CalamityMod.Items.Placeables.FurnitureSacrilegious;
|
||||
using CalamityMod.Items.Placeables.FurnitureSacrilegious;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
namespace CalamityMod.Tiles.FurnitureSacrilegious
|
||||
{
|
||||
public class SacrilegiousBathtubTile : ModTile
|
||||
{
|
||||
public override void SetStaticDefaults() => this.SetUpBathtub(true);
|
||||
public override void SetStaticDefaults() => this.SetUpBathtub(ModContent.ItemType<SacrilegiousBathtub>());
|
||||
|
||||
public override bool CreateDust(int i, int j, ref int type)
|
||||
{
|
||||
|
||||
@@ -1,17 +1,14 @@
|
||||
using CalamityMod.Items.Placeables.FurnitureSacrilegious;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.GameContent.ObjectInteractions;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Tiles.FurnitureSacrilegious
|
||||
{
|
||||
public class SacrilegiousBedTile : ModTile
|
||||
{
|
||||
public override void SetStaticDefaults() => this.SetUpBed(true);
|
||||
public override void SetStaticDefaults() => this.SetUpBed(ModContent.ItemType<SacrilegiousBed>(), true);
|
||||
|
||||
public override bool CreateDust(int i, int j, ref int type)
|
||||
{
|
||||
|
||||
@@ -1,14 +1,12 @@
|
||||
using CalamityMod.Dusts.Furniture;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
namespace CalamityMod.Tiles.FurnitureSilva
|
||||
{
|
||||
public class SilvaBathtub : ModTile
|
||||
{
|
||||
public override void SetStaticDefaults() => this.SetUpBathtub(true);
|
||||
public override void SetStaticDefaults() => this.SetUpBathtub(ModContent.ItemType<Items.Placeables.FurnitureSilva.SilvaBathtub>());
|
||||
|
||||
public override bool CreateDust(int i, int j, ref int type)
|
||||
{
|
||||
|
||||
@@ -1,17 +1,14 @@
|
||||
using CalamityMod.Dusts.Furniture;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.GameContent.ObjectInteractions;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Tiles.FurnitureSilva
|
||||
{
|
||||
public class SilvaBed : ModTile
|
||||
{
|
||||
public override void SetStaticDefaults() => this.SetUpBed(true);
|
||||
public override void SetStaticDefaults() => this.SetUpBed(ModContent.ItemType<Items.Placeables.FurnitureSilva.SilvaBed>(), true);
|
||||
|
||||
public override bool CreateDust(int i, int j, ref int type)
|
||||
{
|
||||
|
||||
@@ -1,13 +1,11 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
namespace CalamityMod.Tiles.FurnitureStatigel
|
||||
{
|
||||
public class StatigelBath : ModTile
|
||||
{
|
||||
public override void SetStaticDefaults() => this.SetUpBathtub();
|
||||
public override void SetStaticDefaults() => this.SetUpBathtub(ModContent.ItemType<Items.Placeables.FurnitureStatigel.StatigelBathtub>());
|
||||
|
||||
public override bool CreateDust(int i, int j, ref int type)
|
||||
{
|
||||
|
||||
@@ -1,16 +1,13 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.GameContent.ObjectInteractions;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Tiles.FurnitureStatigel
|
||||
{
|
||||
public class StatigelBed : ModTile
|
||||
{
|
||||
public override void SetStaticDefaults() => this.SetUpBed();
|
||||
public override void SetStaticDefaults() => this.SetUpBed(ModContent.ItemType<Items.Placeables.FurnitureStatigel.StatigelBed>());
|
||||
|
||||
public override bool CreateDust(int i, int j, ref int type)
|
||||
{
|
||||
|
||||
@@ -1,13 +1,11 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
namespace CalamityMod.Tiles.FurnitureStratus
|
||||
{
|
||||
public class StratusBathtub : ModTile
|
||||
{
|
||||
public override void SetStaticDefaults() => this.SetUpBathtub(true);
|
||||
public override void SetStaticDefaults() => this.SetUpBathtub(ModContent.ItemType<Items.Placeables.FurnitureStratus.StratusBathtub>());
|
||||
|
||||
public override bool CreateDust(int i, int j, ref int type)
|
||||
{
|
||||
|
||||
@@ -1,16 +1,13 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.GameContent.ObjectInteractions;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Tiles.FurnitureStratus
|
||||
{
|
||||
public class StratusBed : ModTile
|
||||
{
|
||||
public override void SetStaticDefaults() => this.SetUpBed(true);
|
||||
public override void SetStaticDefaults() => this.SetUpBed(ModContent.ItemType<Items.Placeables.FurnitureStratus.StratusBed>(), true);
|
||||
|
||||
public override bool CreateDust(int i, int j, ref int type)
|
||||
{
|
||||
|
||||
@@ -1,13 +1,11 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
namespace CalamityMod.Tiles.FurnitureVoid
|
||||
{
|
||||
public class VoidBath : ModTile
|
||||
{
|
||||
public override void SetStaticDefaults() => this.SetUpBathtub(true);
|
||||
public override void SetStaticDefaults() => this.SetUpBathtub(ModContent.ItemType<Items.Placeables.FurnitureVoid.VoidBathtub>());
|
||||
|
||||
public override bool CreateDust(int i, int j, ref int type)
|
||||
{
|
||||
|
||||
@@ -1,16 +1,13 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.GameContent.ObjectInteractions;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Tiles.FurnitureVoid
|
||||
{
|
||||
public class VoidBed : ModTile
|
||||
{
|
||||
public override void SetStaticDefaults() => this.SetUpBed(true);
|
||||
public override void SetStaticDefaults() => this.SetUpBed(ModContent.ItemType<Items.Placeables.FurnitureVoid.VoidBed>(), true);
|
||||
|
||||
public override bool CreateDust(int i, int j, ref int type)
|
||||
{
|
||||
|
||||
@@ -1,14 +1,12 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
namespace CalamityMod.Tiles.FurnitureWulfrum
|
||||
{
|
||||
public class WulfrumBathtub : ModTile
|
||||
{
|
||||
public override void SetStaticDefaults() => this.SetUpBathtub();
|
||||
public override void SetStaticDefaults() => this.SetUpBathtub(ModContent.ItemType<Items.Placeables.FurnitureWulfrum.WulfrumBathtub>());
|
||||
|
||||
public override bool CanExplode(int i, int j) => false;
|
||||
|
||||
|
||||
@@ -1,17 +1,14 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.GameContent.ObjectInteractions;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Tiles.FurnitureWulfrum
|
||||
{
|
||||
public class WulfrumBed : ModTile
|
||||
{
|
||||
public override void SetStaticDefaults() => this.SetUpBed();
|
||||
public override void SetStaticDefaults() => this.SetUpBed(ModContent.ItemType<Items.Placeables.FurnitureWulfrum.WulfrumBed>());
|
||||
|
||||
public override bool CanExplode(int i, int j) => false;
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.Enums;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.Enums;
|
||||
using Terraria.GameContent;
|
||||
using Terraria.GameContent.ObjectInteractions;
|
||||
using Terraria.ID;
|
||||
@@ -16,6 +16,8 @@ namespace CalamityMod.Tiles.FurnitureWulfrum
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
RegisterItemDrop(ModContent.ItemType<Items.Placeables.FurnitureWulfrum.WulfrumChair>());
|
||||
|
||||
Main.tileFrameImportant[Type] = true;
|
||||
Main.tileLavaDeath[Type] = false;
|
||||
Main.tileWaterDeath[Type] = false;
|
||||
|
||||
@@ -14,9 +14,11 @@ namespace CalamityMod.Tiles.FurnitureWulfrum
|
||||
{
|
||||
public class WulfrumToilet : ModTile
|
||||
{
|
||||
public const int NextStyleHeight = 40;
|
||||
public const int NextStyleHeight = 40;
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
RegisterItemDrop(ModContent.ItemType<Items.Placeables.FurnitureWulfrum.WulfrumToilet>());
|
||||
|
||||
Main.tileFrameImportant[Type] = true;
|
||||
Main.tileLavaDeath[Type] = false;
|
||||
Main.tileWaterDeath[Type] = false;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using System;
|
||||
using System;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.Audio;
|
||||
using Terraria.DataStructures;
|
||||
@@ -683,9 +683,12 @@ namespace CalamityMod
|
||||
/// Extension which initializes a ModTile to be a bathtub.
|
||||
/// </summary>
|
||||
/// <param name="mt">The ModTile which is being initialized.</param>
|
||||
/// <param name="itemDropID">The ID of the item this tile drops when broken.</param>
|
||||
/// <param name="lavaImmune">Whether this tile is supposed to be immune to lava. Defaults to false.</param>
|
||||
internal static void SetUpBathtub(this ModTile mt, bool lavaImmune = false)
|
||||
internal static void SetUpBathtub(this ModTile mt, int itemDropID, bool lavaImmune = false)
|
||||
{
|
||||
mt.RegisterItemDrop(itemDropID);
|
||||
|
||||
Main.tileLighted[mt.Type] = true;
|
||||
Main.tileFrameImportant[mt.Type] = true;
|
||||
Main.tileLavaDeath[mt.Type] = !lavaImmune;
|
||||
@@ -717,9 +720,12 @@ namespace CalamityMod
|
||||
/// Extension which initializes a ModTile to be a bed.
|
||||
/// </summary>
|
||||
/// <param name="mt">The ModTile which is being initialized.</param>
|
||||
/// <param name="itemDropID">The ID of the item this tile drops when broken.</param>
|
||||
/// <param name="lavaImmune">Whether this tile is supposed to be immune to lava. Defaults to false.</param>
|
||||
internal static void SetUpBed(this ModTile mt, bool lavaImmune = false)
|
||||
internal static void SetUpBed(this ModTile mt, int itemDropID, bool lavaImmune = false)
|
||||
{
|
||||
mt.RegisterItemDrop(itemDropID);
|
||||
|
||||
Main.tileFrameImportant[mt.Type] = true;
|
||||
Main.tileLavaDeath[mt.Type] = !lavaImmune;
|
||||
Main.tileWaterDeath[mt.Type] = false;
|
||||
|
||||
Reference in new issue
Block a user