Implemented Gram's old Scoria Bricks

This commit is contained in:
GinYuH authored and Cameron Ewell committed 2022-09-24 16:51:49 -04:00
1 parent 2d88b39e2c
commit 8dee94495e
12 files changed
+64 -42

No files matched your search

Binary file not shown.

Before

Width:  |  Height:  |  Size: 326 B

@@ -4,7 +4,8 @@ using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Placeables
{
public class ChaoticBrick : ModItem
[LegacyName("ChaoticBrick")]
public class ScoriaBrick : ModItem
{
public override void SetStaticDefaults() => SacrificeTotal = 100;
@@ -21,7 +22,7 @@ namespace CalamityMod.Items.Placeables
Item.useTime = 10;
Item.useStyle = ItemUseStyleID.Swing;
Item.consumable = true;
Item.createTile = ModContent.TileType<Tiles.ChaoticBrick>();
Item.createTile = ModContent.TileType<Tiles.ScoriaBrick>();
}
public override void AddRecipes()
@@ -33,7 +34,7 @@ namespace CalamityMod.Items.Placeables
Register();
CreateRecipe().
AddIngredient<ChaoticBrickWall>(4).
AddIngredient<ScoriaBrickWall>(4).
AddTile(TileID.WorkBenches).
Register();
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 284 B

@@ -4,12 +4,13 @@ using Terraria.ID;
namespace CalamityMod.Items.Placeables.Walls
{
public class ChaoticBrickWall : ModItem
[LegacyName("ChaoticBrickWall")]
public class ScoriaBrickWall : ModItem
{
public override void SetStaticDefaults()
{
SacrificeTotal = 400;
DisplayName.SetDefault("Chaotic Brick Wall");
DisplayName.SetDefault("Scoria Brick Wall");
}
public override void SetDefaults()
{
@@ -22,12 +23,12 @@ namespace CalamityMod.Items.Placeables.Walls
Item.useTime = 7;
Item.useStyle = ItemUseStyleID.Swing;
Item.consumable = true;
Item.createWall = ModContent.WallType<WallTiles.ChaoticBrickWall>();
Item.createWall = ModContent.WallType<WallTiles.ScoriaBrickWall>();
}
public override void AddRecipes()
{
CreateRecipe(4).AddIngredient(ModContent.ItemType<ChaoticBrick>(), 1).AddTile(TileID.WorkBenches).Register();
CreateRecipe(4).AddIngredient(ModContent.ItemType<ScoriaBrick>(), 1).AddTile(TileID.WorkBenches).Register();
}
}
}
File renamed without changes.

Before

Width:  |  Height:  |  Size: 280 B

After

Width:  |  Height:  |  Size: 280 B

-33
View File
@@ -1,33 +0,0 @@
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ModLoader;
using Terraria.ID;
namespace CalamityMod.Tiles
{
public class ChaoticBrick : ModTile
{
public override void SetStaticDefaults()
{
Main.tileLighted[Type] = true;
Main.tileSolid[Type] = true;
Main.tileBlockLight[Type] = true;
DustType = 105;
ItemDrop = ModContent.ItemType<Items.Placeables.ChaoticBrick>();
AddMapEntry(new Color(255, 0, 0));
HitSound = SoundID.Tink;
}
public override void NumDust(int i, int j, bool fail, ref int num)
{
num = fail ? 1 : 3;
}
public override void ModifyLight(int i, int j, ref float r, ref float g, ref float b)
{
r = 0.04f;
g = 0.00f;
b = 0.00f;
}
}
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.4 KiB

+52
View File
@@ -0,0 +1,52 @@
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.GameContent.Metadata;
using Terraria.ModLoader;
using Terraria.ID;
namespace CalamityMod.Tiles
{
[LegacyName("ChaoticBrick")]
public class ScoriaBrick : ModTile
{
int subsheetHeight = 72;
int subsheetWidth = 216;
public override void SetStaticDefaults()
{
Main.tileLighted[Type] = true;
Main.tileSolid[Type] = true;
Main.tileBlockLight[Type] = true;
DustType = 105;
ItemDrop = ModContent.ItemType<Items.Placeables.ScoriaBrick>();
AddMapEntry(new Color(255, 0, 0));
HitSound = SoundID.Tink;
}
public override void NumDust(int i, int j, bool fail, ref int num)
{
num = fail ? 1 : 3;
}
public override void ModifyLight(int i, int j, ref float r, ref float g, ref float b)
{
r = 0.04f;
g = 0.00f;
b = 0.00f;
}
public override void AnimateIndividualTile(int type, int i, int j, ref int frameXOffset, ref int frameYOffset)
{
int xPos = i % 1;
int yPos = j % 2;
frameXOffset = xPos * subsheetWidth;
frameYOffset = yPos * subsheetHeight;
}
public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak)
{
TileFraming.CompactFraming(i, j, resetFrame);
return false;
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

@@ -4,12 +4,13 @@ using Terraria.ModLoader;
namespace CalamityMod.Walls
{
public class ChaoticBrickWall : ModWall
[LegacyName("ChaoticBrickWall")]
public class ScoriaBrickWall : ModWall
{
public override void SetStaticDefaults()
{
Main.wallHouse[Type] = true;
ItemDrop = ModContent.ItemType<Items.Placeables.Walls.ChaoticBrickWall>();
ItemDrop = ModContent.ItemType<Items.Placeables.Walls.ScoriaBrickWall>();
AddMapEntry(new Color(255, 0, 0));
DustType = 105;
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB