Walls and bulbs
No files matched your search
@@ -0,0 +1,30 @@
|
||||
using CalamityMod.Items.DraedonMisc;
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Items.Placeables.Plates;
|
||||
using CalamityMod.Tiles.DraedonStructures.CagedLights;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Placeables.FurnitureWulfrum
|
||||
{
|
||||
public class ChargedWulfrumWallMountedBulb : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Placeables";
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.DefaultToPlaceableTile(ModContent.TileType<Tiles.FurnitureWulfrum.ChargedWulfrumWallMountedBulb> ());
|
||||
Item.value = Item.sellPrice(silver: 1);
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
CreateRecipe(10).
|
||||
AddIngredient<AnodizedWulfrumMetal>().
|
||||
AddIngredient<WulfrumMetalScrap>().
|
||||
AddIngredient<EnergyCore>().
|
||||
AddTile(TileID.Anvils).
|
||||
Register();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 650 B |
@@ -0,0 +1,30 @@
|
||||
using CalamityMod.Items.DraedonMisc;
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Items.Placeables.Plates;
|
||||
using CalamityMod.Tiles.DraedonStructures.CagedLights;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Placeables.FurnitureWulfrum
|
||||
{
|
||||
public class WulfrumWallMountedBulb : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Placeables";
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.DefaultToPlaceableTile(ModContent.TileType<Tiles.FurnitureWulfrum.WulfrumWallMountedBulb> ());
|
||||
Item.value = Item.sellPrice(silver: 1);
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
CreateRecipe(10).
|
||||
AddIngredient<AnodizedWulfrumMetal>().
|
||||
AddIngredient<WulfrumMetalScrap>().
|
||||
AddIngredient<EnergyCore>().
|
||||
AddTile(TileID.Anvils).
|
||||
Register();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 668 B |
@@ -1,5 +1,6 @@
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Items.Placeables.FurnitureWulfrum;
|
||||
using CalamityMod.Tiles.FurnitureWulfrum;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using WallTiles = CalamityMod.Walls;
|
||||
@@ -19,8 +20,7 @@ namespace CalamityMod.Items.Placeables.Walls
|
||||
public override void AddRecipes()
|
||||
{
|
||||
CreateRecipe(8).
|
||||
AddIngredient<WulfrumMetalScrap>().
|
||||
AddIngredient<AnodizedWulfrumMetal>().
|
||||
AddIngredient<Items.Placeables.FurnitureWulfrum.RoundedAnodizedWulfrumPanels>().
|
||||
AddTile(TileID.WorkBenches).
|
||||
Register();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
using CalamityMod.Items.Placeables.FurnitureWulfrum;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using WallTiles = CalamityMod.Walls;
|
||||
|
||||
namespace CalamityMod.Items.Placeables.Walls
|
||||
{
|
||||
public class WulfrumSheetWall : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Placeables";
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Item.ResearchUnlockCount = 400;
|
||||
}
|
||||
|
||||
public override void SetDefaults() => Item.DefaultToPlaceableWall(ModContent.WallType<WallTiles.WulfrumSheetWall>());
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
CreateRecipe(4).
|
||||
AddIngredient<WulfrumSheets>().
|
||||
AddTile(TileID.WorkBenches).
|
||||
Register();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 460 B |
@@ -0,0 +1,26 @@
|
||||
using CalamityMod.Items.Placeables.FurnitureWulfrum;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using WallTiles = CalamityMod.Walls;
|
||||
|
||||
namespace CalamityMod.Items.Placeables.Walls
|
||||
{
|
||||
public class WulfrumSidingWall : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Placeables";
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Item.ResearchUnlockCount = 400;
|
||||
}
|
||||
|
||||
public override void SetDefaults() => Item.DefaultToPlaceableWall(ModContent.WallType<WallTiles.WulfrumSidingWall>());
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
CreateRecipe(4).
|
||||
AddIngredient<WulfrumSiding>().
|
||||
AddTile(TileID.WorkBenches).
|
||||
Register();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 320 B |
@@ -12,7 +12,6 @@ namespace CalamityMod.Tiles.FurnitureMarnite
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.tileSolid[Type] = true;
|
||||
Main.tileMergeDirt[Type] = true;
|
||||
Main.tileBlockLight[Type] = true;
|
||||
TileID.Sets.HasSlopeFrames[Type] = true;
|
||||
Main.tileShine[Type] = 3500;
|
||||
|
||||
@@ -0,0 +1,124 @@
|
||||
using System;
|
||||
using CalamityMod.Items.Placeables.DraedonStructures.CagedLights;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.Enums;
|
||||
using Terraria.ObjectData;
|
||||
using Terraria.Audio;
|
||||
using CalamityMod.Systems;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
|
||||
namespace CalamityMod.Tiles.FurnitureWulfrum
|
||||
{
|
||||
public class ChargedWulfrumWallMountedBulb : ModTile
|
||||
{
|
||||
public static readonly SoundStyle MinePlatingSound = new("CalamityMod/Sounds/Custom/PlatingMine", 3);
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.tileLighted[Type] = true;
|
||||
Main.tileNoFail[Type] = true;
|
||||
Main.tileFrameImportant[Type] = true;
|
||||
Main.tileObsidianKill[Type] = false;
|
||||
|
||||
HitSound = MinePlatingSound;
|
||||
DustType = 299;
|
||||
|
||||
AddToArray(ref TileID.Sets.RoomNeeds.CountsAsTorch);
|
||||
AddMapEntry(new Color(48, 201, 214), CalamityUtils.GetItemName<Items.Placeables.FurnitureWulfrum.ChargedWulfrumWallMountedBulb>());
|
||||
|
||||
|
||||
// Attach to ground
|
||||
TileObjectData.newTile.CopyFrom(TileObjectData.Style2x2);
|
||||
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);
|
||||
|
||||
// Attach to side (right)
|
||||
TileObjectData.newAlternate.CopyFrom(TileObjectData.newTile);
|
||||
TileObjectData.newAlternate.AnchorRight = new AnchorData(AnchorType.SolidTile | AnchorType.SolidSide, TileObjectData.newTile.Width, 0);
|
||||
TileObjectData.newAlternate.AnchorBottom = AnchorData.Empty;
|
||||
TileObjectData.newAlternate.Origin = new Point16(1, 0);
|
||||
TileObjectData.addAlternate(2);
|
||||
|
||||
// Attach to ceiling
|
||||
TileObjectData.newAlternate.CopyFrom(TileObjectData.newTile);
|
||||
TileObjectData.newAlternate.AnchorTop = new AnchorData(AnchorType.SolidTile | AnchorType.SolidBottom, TileObjectData.newTile.Width, 0);
|
||||
TileObjectData.newAlternate.AnchorBottom = AnchorData.Empty;
|
||||
TileObjectData.newAlternate.Origin = new Point16(0, 0);
|
||||
TileObjectData.addAlternate(4);
|
||||
|
||||
// Attach to side (left)
|
||||
TileObjectData.newAlternate.CopyFrom(TileObjectData.newTile);
|
||||
TileObjectData.newAlternate.AnchorLeft = new AnchorData(AnchorType.SolidTile | AnchorType.SolidSide, TileObjectData.newTile.Width, 0);
|
||||
TileObjectData.newAlternate.AnchorBottom = AnchorData.Empty;
|
||||
TileObjectData.newAlternate.Origin = new Point16(0, 0);
|
||||
TileObjectData.addAlternate(6);
|
||||
|
||||
// Attach to wall
|
||||
TileObjectData.newAlternate.CopyFrom(TileObjectData.newTile);
|
||||
TileObjectData.newAlternate.AnchorWall = true;
|
||||
TileObjectData.newAlternate.AnchorBottom = AnchorData.Empty;
|
||||
TileObjectData.newAlternate.Origin = new Point16(1, 0);
|
||||
TileObjectData.addAlternate(8);
|
||||
TileObjectData.addTile(Type);
|
||||
}
|
||||
|
||||
public override void NumDust(int i, int j, bool fail, ref int num)
|
||||
{
|
||||
num = fail ? 1 : 3;
|
||||
}
|
||||
|
||||
public override void HitWire(int i, int j)
|
||||
{
|
||||
CalamityUtils.LightHitWire(Type, i, j, 2, 2);
|
||||
}
|
||||
|
||||
public override void ModifyLight(int i, int j, ref float r, ref float g, ref float b)
|
||||
{
|
||||
if (Main.tile[i, j].TileFrameX < 18)
|
||||
{
|
||||
r = 84f / 255f;
|
||||
g = 212f / 255f;
|
||||
b = 233f / 255f;
|
||||
}
|
||||
else
|
||||
{
|
||||
r = 0f;
|
||||
g = 0f;
|
||||
b = 0f;
|
||||
}
|
||||
}
|
||||
public override void PostDraw(int i, int j, SpriteBatch spriteBatch)
|
||||
{
|
||||
if (Main.tile[i, j].IsTileActuallyInvisible())
|
||||
return;
|
||||
|
||||
float brightness = MathHelper.Clamp(0.2f - (j / 680), 0f, 0.2f);
|
||||
|
||||
float time = Main.GameUpdateCount;
|
||||
float waveScale1 = time * 0.094f;
|
||||
int scalar = i - (j / 2);
|
||||
float wave1 = waveScale1 * -50 + scalar * 12;
|
||||
float wave1angle = 0.30f + 0.25f * MathF.Sin(MathHelper.ToRadians(wave1));
|
||||
|
||||
float transparency = 0.05f + wave1angle;
|
||||
|
||||
Texture2D tex = ModContent.Request<Texture2D>("CalamityMod/Tiles/FurnitureWulfrum/ChargedWulfrumWallMountedBulb_Glow").Value;
|
||||
|
||||
Tile tile = Main.tile[i, j];
|
||||
Rectangle frame = new Rectangle(tile.TileFrameX, tile.TileFrameY, 16, 16);
|
||||
|
||||
TileFramingSystem.SlopedGlowmask(in tile, i, j, tex, frame, CalamityUtils.ApplyPaint(Main.tile[i, j].TileColor, Color.White * transparency, false), default);
|
||||
}
|
||||
public override void KillMultiTile(int i, int j, int frameX, int frameY)
|
||||
{
|
||||
Item.NewItem(new EntitySource_TileBreak(i, j), i * 16, j * 16, 32, 48, ModContent.ItemType<Items.Placeables.FurnitureWulfrum.ChargedWulfrumWallMountedBulb>());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 5.2 KiB |
|
After Width: | Height: | Size: 2.2 KiB |
@@ -0,0 +1,124 @@
|
||||
using System;
|
||||
using CalamityMod.Items.Placeables.DraedonStructures.CagedLights;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.Enums;
|
||||
using Terraria.ObjectData;
|
||||
using Terraria.Audio;
|
||||
using CalamityMod.Systems;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
|
||||
namespace CalamityMod.Tiles.FurnitureWulfrum
|
||||
{
|
||||
public class WulfrumWallMountedBulb : ModTile
|
||||
{
|
||||
public static readonly SoundStyle MinePlatingSound = new("CalamityMod/Sounds/Custom/PlatingMine", 3);
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.tileLighted[Type] = true;
|
||||
Main.tileNoFail[Type] = true;
|
||||
Main.tileFrameImportant[Type] = true;
|
||||
Main.tileObsidianKill[Type] = false;
|
||||
|
||||
HitSound = MinePlatingSound;
|
||||
DustType = 299;
|
||||
|
||||
AddToArray(ref TileID.Sets.RoomNeeds.CountsAsTorch);
|
||||
AddMapEntry(new Color(92, 187, 99), CalamityUtils.GetItemName<Items.Placeables.FurnitureWulfrum.WulfrumWallMountedBulb>());
|
||||
|
||||
|
||||
// Attach to ground
|
||||
TileObjectData.newTile.CopyFrom(TileObjectData.Style2x2);
|
||||
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);
|
||||
|
||||
// Attach to side (right)
|
||||
TileObjectData.newAlternate.CopyFrom(TileObjectData.newTile);
|
||||
TileObjectData.newAlternate.AnchorRight = new AnchorData(AnchorType.SolidTile | AnchorType.SolidSide, TileObjectData.newTile.Width, 0);
|
||||
TileObjectData.newAlternate.AnchorBottom = AnchorData.Empty;
|
||||
TileObjectData.newAlternate.Origin = new Point16(1, 0);
|
||||
TileObjectData.addAlternate(2);
|
||||
|
||||
// Attach to ceiling
|
||||
TileObjectData.newAlternate.CopyFrom(TileObjectData.newTile);
|
||||
TileObjectData.newAlternate.AnchorTop = new AnchorData(AnchorType.SolidTile | AnchorType.SolidBottom, TileObjectData.newTile.Width, 0);
|
||||
TileObjectData.newAlternate.AnchorBottom = AnchorData.Empty;
|
||||
TileObjectData.newAlternate.Origin = new Point16(0, 0);
|
||||
TileObjectData.addAlternate(4);
|
||||
|
||||
// Attach to side (left)
|
||||
TileObjectData.newAlternate.CopyFrom(TileObjectData.newTile);
|
||||
TileObjectData.newAlternate.AnchorLeft = new AnchorData(AnchorType.SolidTile | AnchorType.SolidSide, TileObjectData.newTile.Width, 0);
|
||||
TileObjectData.newAlternate.AnchorBottom = AnchorData.Empty;
|
||||
TileObjectData.newAlternate.Origin = new Point16(0, 0);
|
||||
TileObjectData.addAlternate(6);
|
||||
|
||||
// Attach to wall
|
||||
TileObjectData.newAlternate.CopyFrom(TileObjectData.newTile);
|
||||
TileObjectData.newAlternate.AnchorWall = true;
|
||||
TileObjectData.newAlternate.AnchorBottom = AnchorData.Empty;
|
||||
TileObjectData.newAlternate.Origin = new Point16(1, 0);
|
||||
TileObjectData.addAlternate(8);
|
||||
TileObjectData.addTile(Type);
|
||||
}
|
||||
|
||||
public override void NumDust(int i, int j, bool fail, ref int num)
|
||||
{
|
||||
num = fail ? 1 : 3;
|
||||
}
|
||||
|
||||
public override void HitWire(int i, int j)
|
||||
{
|
||||
CalamityUtils.LightHitWire(Type, i, j, 2, 2);
|
||||
}
|
||||
|
||||
public override void ModifyLight(int i, int j, ref float r, ref float g, ref float b)
|
||||
{
|
||||
if (Main.tile[i, j].TileFrameX < 18)
|
||||
{
|
||||
r = 141f / 255f;
|
||||
g = 219f / 255f;
|
||||
b = 84f / 255f;
|
||||
}
|
||||
else
|
||||
{
|
||||
r = 0f;
|
||||
g = 0f;
|
||||
b = 0f;
|
||||
}
|
||||
}
|
||||
public override void PostDraw(int i, int j, SpriteBatch spriteBatch)
|
||||
{
|
||||
if (Main.tile[i, j].IsTileActuallyInvisible())
|
||||
return;
|
||||
|
||||
float brightness = MathHelper.Clamp(0.2f - (j / 680), 0f, 0.2f);
|
||||
|
||||
float time = Main.GameUpdateCount;
|
||||
float waveScale1 = time * 0.094f;
|
||||
int scalar = i - (j / 2);
|
||||
float wave1 = waveScale1 * -50 + scalar * 12;
|
||||
float wave1angle = 0.30f + 0.25f * MathF.Sin(MathHelper.ToRadians(wave1));
|
||||
|
||||
float transparency = 0.05f + wave1angle;
|
||||
|
||||
Texture2D tex = ModContent.Request<Texture2D>("CalamityMod/Tiles/FurnitureWulfrum/WulfrumWallMountedBulb_Glow").Value;
|
||||
|
||||
Tile tile = Main.tile[i, j];
|
||||
Rectangle frame = new Rectangle(tile.TileFrameX, tile.TileFrameY, 16, 16);
|
||||
|
||||
TileFramingSystem.SlopedGlowmask(in tile, i, j, tex, frame, CalamityUtils.ApplyPaint(Main.tile[i, j].TileColor, Color.White * transparency, false), default);
|
||||
}
|
||||
public override void KillMultiTile(int i, int j, int frameX, int frameY)
|
||||
{
|
||||
Item.NewItem(new EntitySource_TileBreak(i, j), i * 16, j * 16, 32, 48, ModContent.ItemType<Items.Placeables.FurnitureWulfrum.WulfrumWallMountedBulb>());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 5.0 KiB |
|
After Width: | Height: | Size: 2.2 KiB |
@@ -18,7 +18,6 @@ namespace CalamityMod.Walls
|
||||
GlowMask = new("CalamityMod/Walls/WulfrumComplexPanelWall_Glow", 36, 36);
|
||||
|
||||
Main.wallHouse[Type] = true;
|
||||
Main.wallLight[Type] = true;
|
||||
AddMapEntry(new Color(28, 28, 29));
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
|
||||
namespace CalamityMod.Walls
|
||||
{
|
||||
public class WulfrumSheetWall : MultiVariantModWall
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.wallHouse[Type] = true;
|
||||
AddMapEntry(new Color(73, 59, 48));
|
||||
}
|
||||
|
||||
public override bool CreateDust(int i, int j, ref int type)
|
||||
{
|
||||
Dust.NewDust(new Vector2(i, j) * 16f, 16, 16, DustID.TerraBlade, 0f, 0f, 1, new Color(255, 255, 255), 1f);
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void NumDust(int i, int j, bool fail, ref int num) => num = fail ? 1 : 3;
|
||||
|
||||
public override void PopulateWallVariant(int i, int j, ref int frameXOffset, ref int frameYOffset)
|
||||
{
|
||||
frameXOffset = (i % 2) * 468;
|
||||
frameYOffset = (j % 2) * 180;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 20 KiB |
@@ -0,0 +1,24 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Walls
|
||||
{
|
||||
public class WulfrumSidingWall : ModWall
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.wallHouse[Type] = true;
|
||||
AddMapEntry(new Color(77, 92, 65));
|
||||
}
|
||||
|
||||
public override bool CreateDust(int i, int j, ref int type)
|
||||
{
|
||||
Dust.NewDust(new Vector2(i, j) * 16f, 16, 16, DustID.TerraBlade, 0f, 0f, 1, new Color(255, 255, 255), 1f);
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void NumDust(int i, int j, bool fail, ref int num) => num = fail ? 1 : 3;
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 7.2 KiB |