placed bar madness
No files matched your search
@@ -0,0 +1,29 @@
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Dusts
|
||||
{
|
||||
public class AuricBarDust : ModDust
|
||||
{
|
||||
public override void OnSpawn(Dust dust)
|
||||
{
|
||||
dust.noLight = true;
|
||||
dust.noGravity = false;
|
||||
dust.scale = 1.2f;
|
||||
dust.alpha = 100;
|
||||
}
|
||||
|
||||
public override bool Update(Dust dust)
|
||||
{
|
||||
dust.velocity.Y += 0.05f;
|
||||
dust.position += dust.velocity;
|
||||
dust.rotation += dust.velocity.X;
|
||||
dust.scale -= 0.03f;
|
||||
if (dust.scale < 0.5f)
|
||||
{
|
||||
dust.active = false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 225 B |
@@ -0,0 +1,29 @@
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Dusts
|
||||
{
|
||||
public class CosmiliteBarDust : ModDust
|
||||
{
|
||||
public override void OnSpawn(Dust dust)
|
||||
{
|
||||
dust.noLight = true;
|
||||
dust.noGravity = false;
|
||||
dust.scale = 1.2f;
|
||||
dust.alpha = 100;
|
||||
}
|
||||
|
||||
public override bool Update(Dust dust)
|
||||
{
|
||||
dust.velocity.Y += 0.05f;
|
||||
dust.position += dust.velocity;
|
||||
dust.rotation += dust.velocity.X;
|
||||
dust.scale -= 0.03f;
|
||||
if (dust.scale < 0.5f)
|
||||
{
|
||||
dust.active = false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 225 B |
@@ -0,0 +1,29 @@
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Dusts
|
||||
{
|
||||
public class ShadowspecBarDust : ModDust
|
||||
{
|
||||
public override void OnSpawn(Dust dust)
|
||||
{
|
||||
dust.noLight = true;
|
||||
dust.noGravity = false;
|
||||
dust.scale = 1.2f;
|
||||
dust.alpha = 100;
|
||||
}
|
||||
|
||||
public override bool Update(Dust dust)
|
||||
{
|
||||
dust.velocity.Y += 0.05f;
|
||||
dust.position += dust.velocity;
|
||||
dust.rotation += dust.velocity.X;
|
||||
dust.scale -= 0.03f;
|
||||
if (dust.scale < 0.5f)
|
||||
{
|
||||
dust.active = false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 220 B |
@@ -1,4 +1,7 @@
|
||||
using CalamityMod.Items.Placeables.Ores;
|
||||
using CalamityMod.Tiles;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
@@ -14,11 +17,18 @@ namespace CalamityMod.Items.Materials
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.createTile = ModContent.TileType<AerialiteBarTile>();
|
||||
item.width = 30;
|
||||
item.height = 24;
|
||||
item.maxStack = 999;
|
||||
item.value = Item.sellPrice(silver: 30);
|
||||
item.rare = 3;
|
||||
item.useStyle = ItemUseStyleID.SwingThrow;
|
||||
item.useTurn = true;
|
||||
item.useAnimation = 15;
|
||||
item.useTime = 10;
|
||||
item.autoReuse = true;
|
||||
item.consumable = true;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
using CalamityMod.Items.Placeables.Ores;
|
||||
using CalamityMod.Tiles;
|
||||
using CalamityMod.Tiles.Furniture.CraftingStations;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Materials
|
||||
@@ -21,16 +21,30 @@ namespace CalamityMod.Items.Materials
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.createTile = ModContent.TileType<AuricTeslaBar>();
|
||||
item.width = 50;
|
||||
item.height = 30;
|
||||
item.maxStack = 999;
|
||||
item.value = Item.sellPrice(gold: 60);
|
||||
item.Calamity().customRarity = CalamityRarity.Violet;
|
||||
item.useStyle = ItemUseStyleID.SwingThrow;
|
||||
item.useTurn = true;
|
||||
item.useAnimation = 15;
|
||||
item.useTime = 10;
|
||||
item.autoReuse = true;
|
||||
item.consumable = true;
|
||||
}
|
||||
|
||||
public override bool PreDrawInInventory(SpriteBatch spriteBatch, Vector2 position, Rectangle frameI, Color drawColor, Color itemColor, Vector2 origin, float scale)
|
||||
{
|
||||
Texture2D texture = ModContent.GetTexture("CalamityMod/Items/Materials/AuricBar_Animated");
|
||||
spriteBatch.Draw(texture, position, item.GetCurrentFrame(ref frame, ref frameCounter, 6, 16), Color.White, 0f, origin, scale, SpriteEffects.None, 0);
|
||||
return false;
|
||||
}
|
||||
|
||||
public override bool PreDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, ref float rotation, ref float scale, int whoAmI)
|
||||
{
|
||||
Texture2D texture = Main.itemTexture[item.type];
|
||||
Texture2D texture = ModContent.GetTexture("CalamityMod/Items/Materials/AuricBar_Animated");
|
||||
spriteBatch.Draw(texture, item.position - Main.screenPosition, item.GetCurrentFrame(ref frame, ref frameCounter, 6, 16), lightColor, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 384 B |
|
After Width: | Height: | Size: 2.2 KiB |
@@ -1,32 +1,55 @@
|
||||
using CalamityMod.Tiles;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Materials
|
||||
{
|
||||
public class CosmiliteBar : ModItem
|
||||
{
|
||||
public int frameCounter = 0;
|
||||
public int frame = 0;
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Cosmilite Bar");
|
||||
Tooltip.SetDefault("A chunk of highly-resistant cosmic steel");
|
||||
Main.RegisterItemAnimation(item.type, new DrawAnimationVertical(6, 6));
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.createTile = ModContent.TileType<CosmiliteBarTile>();
|
||||
item.width = 30;
|
||||
item.height = 24;
|
||||
item.maxStack = 999;
|
||||
item.value = Item.buyPrice(0, 7, 0, 0);
|
||||
item.Calamity().customRarity = CalamityRarity.PureGreen;
|
||||
item.useStyle = ItemUseStyleID.SwingThrow;
|
||||
item.useTurn = true;
|
||||
item.useAnimation = 15;
|
||||
item.useTime = 10;
|
||||
item.autoReuse = true;
|
||||
item.consumable = true;
|
||||
}
|
||||
|
||||
public override bool PreDrawInInventory(SpriteBatch spriteBatch, Vector2 position, Rectangle frameI, Color drawColor, Color itemColor, Vector2 origin, float scale)
|
||||
{
|
||||
Texture2D texture = ModContent.GetTexture("CalamityMod/Items/Materials/CosmiliteBar_Animated");
|
||||
spriteBatch.Draw(texture, position, item.GetCurrentFrame(ref frame, ref frameCounter, 6, 6), Color.White, 0f, origin, scale, SpriteEffects.None, 0);
|
||||
return false;
|
||||
}
|
||||
|
||||
public override bool PreDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, ref float rotation, ref float scale, int whoAmI)
|
||||
{
|
||||
Texture2D texture = ModContent.GetTexture("CalamityMod/Items/Materials/CosmiliteBar_Animated");
|
||||
spriteBatch.Draw(texture, item.position - Main.screenPosition, item.GetCurrentFrame(ref frame, ref frameCounter, 6, 6), lightColor, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0);
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void Update(ref float gravity, ref float maxFallSpeed)
|
||||
{
|
||||
float num = (float)Main.rand.Next(90, 111) * 0.01f;
|
||||
num *= Main.essScale;
|
||||
Lighting.AddLight((int)((item.position.X + (float)(item.width / 2)) / 16f), (int)((item.position.Y + (float)(item.height / 2)) / 16f), 0.5f * num, 0f * num, 0.5f * num);
|
||||
float brightness = Main.essScale * Main.rand.NextFloat(0.9f, 1.1f);
|
||||
Lighting.AddLight(item.Center, 0.5f * brightness, 0f, 0.5f * brightness);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 438 B |
|
After Width: | Height: | Size: 1.6 KiB |
@@ -3,7 +3,6 @@ using CalamityMod.Tiles;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
using CalamityMod.Tiles;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
@@ -13,11 +16,18 @@ namespace CalamityMod.Items.Materials
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.createTile = ModContent.TileType<FrigidBar>();
|
||||
item.width = 30;
|
||||
item.height = 24;
|
||||
item.maxStack = 999;
|
||||
item.value = Item.buyPrice(0, 3, 0, 0);
|
||||
item.rare = 5;
|
||||
item.useStyle = ItemUseStyleID.SwingThrow;
|
||||
item.useTurn = true;
|
||||
item.useAnimation = 15;
|
||||
item.useTime = 10;
|
||||
item.autoReuse = true;
|
||||
item.consumable = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,8 @@
|
||||
using CalamityMod.Tiles;
|
||||
using CalamityMod.Tiles.Furniture.CraftingStations;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
@@ -8,22 +10,44 @@ namespace CalamityMod.Items.Materials
|
||||
{
|
||||
public class ShadowspecBar : ModItem
|
||||
{
|
||||
public int frameCounter = 0;
|
||||
public int frame = 0;
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Shadowspec Bar");
|
||||
Main.RegisterItemAnimation(item.type, new DrawAnimationVertical(8, 8));
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.createTile = ModContent.TileType<ShadowspecBarTile>();
|
||||
item.width = 15;
|
||||
item.height = 12;
|
||||
item.maxStack = 999;
|
||||
item.rare = ItemRarityID.Red;
|
||||
item.value = Item.sellPrice(gold: 85);
|
||||
item.Calamity().customRarity = CalamityRarity.Violet;
|
||||
item.useStyle = ItemUseStyleID.SwingThrow;
|
||||
item.useTurn = true;
|
||||
item.useAnimation = 15;
|
||||
item.useTime = 10;
|
||||
item.autoReuse = true;
|
||||
item.consumable = true;
|
||||
}
|
||||
|
||||
public override bool PreDrawInInventory(SpriteBatch spriteBatch, Vector2 position, Rectangle frameI, Color drawColor, Color itemColor, Vector2 origin, float scale)
|
||||
{
|
||||
Texture2D texture = ModContent.GetTexture("CalamityMod/Items/Materials/ShadowspecBar_Animated");
|
||||
spriteBatch.Draw(texture, position, item.GetCurrentFrame(ref frame, ref frameCounter, 8, 8), Color.White, 0f, origin, scale, SpriteEffects.None, 0);
|
||||
return false;
|
||||
}
|
||||
|
||||
public override bool PreDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, ref float rotation, ref float scale, int whoAmI)
|
||||
{
|
||||
Texture2D texture = ModContent.GetTexture("CalamityMod/Items/Materials/ShadowspecBar_Animated");
|
||||
spriteBatch.Draw(texture, item.position - Main.screenPosition, item.GetCurrentFrame(ref frame, ref frameCounter, 8, 8), lightColor, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0);
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
ModRecipe recipe = new ModRecipe(mod);
|
||||
|
||||
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 483 B |
|
After Width: | Height: | Size: 1.2 KiB |
@@ -1,4 +1,7 @@
|
||||
using CalamityMod.Items.Placeables.Ores;
|
||||
using CalamityMod.Tiles;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
@@ -14,12 +17,19 @@ namespace CalamityMod.Items.Materials
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.createTile = ModContent.TileType<UelibloomBar>();
|
||||
item.width = 15;
|
||||
item.height = 12;
|
||||
item.maxStack = 999;
|
||||
item.rare = 10;
|
||||
item.value = Item.sellPrice(gold: 3);
|
||||
item.Calamity().customRarity = CalamityRarity.Turquoise;
|
||||
item.useStyle = ItemUseStyleID.SwingThrow;
|
||||
item.useTurn = true;
|
||||
item.useAnimation = 15;
|
||||
item.useTime = 10;
|
||||
item.autoReuse = true;
|
||||
item.consumable = true;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
using CalamityMod.Items.Materials;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
using Terraria.ObjectData;
|
||||
|
||||
namespace CalamityMod.Tiles
|
||||
{
|
||||
public class AerialiteBarTile : ModTile
|
||||
{
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Main.tileShine[Type] = 1000;
|
||||
Main.tileSolid[Type] = true;
|
||||
Main.tileSolidTop[Type] = true;
|
||||
Main.tileFrameImportant[Type] = true;
|
||||
|
||||
TileObjectData.newTile.CopyFrom(TileObjectData.Style1x1);
|
||||
TileObjectData.newTile.StyleHorizontal = true;
|
||||
TileObjectData.newTile.LavaDeath = false;
|
||||
TileObjectData.addTile(Type);
|
||||
|
||||
dustType = 187;
|
||||
drop = ModContent.ItemType<AerialiteBar>();
|
||||
|
||||
AddMapEntry(new Color(141, 232, 246));
|
||||
}
|
||||
|
||||
public override bool CreateDust(int i, int j, ref int type)
|
||||
{
|
||||
if (Main.rand.NextBool(2))
|
||||
{
|
||||
type = 187;
|
||||
}
|
||||
else
|
||||
{
|
||||
type = 16;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak)
|
||||
{
|
||||
WorldGen.Check1x1(i, j, Type);
|
||||
return true;
|
||||
}
|
||||
|
||||
public override void PlaceInWorld(int i, int j, Item item)
|
||||
{
|
||||
Main.tile[i, j].frameX = 0;
|
||||
Main.tile[i, j].frameY = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 236 B |
@@ -0,0 +1,48 @@
|
||||
using CalamityMod.Dusts;
|
||||
using CalamityMod.Items.Materials;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
using Terraria.ObjectData;
|
||||
|
||||
namespace CalamityMod.Tiles
|
||||
{
|
||||
public class AuricTeslaBar : ModTile
|
||||
{
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Main.tileShine[Type] = 1000;
|
||||
Main.tileSolid[Type] = true;
|
||||
Main.tileSolidTop[Type] = true;
|
||||
Main.tileFrameImportant[Type] = true;
|
||||
|
||||
TileObjectData.newTile.CopyFrom(TileObjectData.Style1x1);
|
||||
TileObjectData.newTile.StyleHorizontal = true;
|
||||
TileObjectData.newTile.LavaDeath = false;
|
||||
TileObjectData.addTile(Type);
|
||||
|
||||
dustType = ModContent.DustType<AuricBarDust>();
|
||||
drop = ModContent.ItemType<AuricBar>();
|
||||
|
||||
AddMapEntry(new Color(255, 227, 81));
|
||||
}
|
||||
|
||||
public override bool CreateDust(int i, int j, ref int type)
|
||||
{
|
||||
type = ModContent.DustType<AuricBarDust>();
|
||||
return true;
|
||||
}
|
||||
|
||||
public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak)
|
||||
{
|
||||
WorldGen.Check1x1(i, j, Type);
|
||||
return true;
|
||||
}
|
||||
|
||||
public override void PlaceInWorld(int i, int j, Item item)
|
||||
{
|
||||
Main.tile[i, j].frameX = 0;
|
||||
Main.tile[i, j].frameY = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 237 B |
@@ -0,0 +1,48 @@
|
||||
using CalamityMod.Dusts;
|
||||
using CalamityMod.Items.Materials;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
using Terraria.ObjectData;
|
||||
|
||||
namespace CalamityMod.Tiles
|
||||
{
|
||||
public class CosmiliteBarTile : ModTile
|
||||
{
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Main.tileShine[Type] = 1000;
|
||||
Main.tileSolid[Type] = true;
|
||||
Main.tileSolidTop[Type] = true;
|
||||
Main.tileFrameImportant[Type] = true;
|
||||
|
||||
TileObjectData.newTile.CopyFrom(TileObjectData.Style1x1);
|
||||
TileObjectData.newTile.StyleHorizontal = true;
|
||||
TileObjectData.newTile.LavaDeath = false;
|
||||
TileObjectData.addTile(Type);
|
||||
|
||||
dustType = ModContent.DustType<CosmiliteBarDust>();
|
||||
drop = ModContent.ItemType<CosmiliteBar>();
|
||||
|
||||
AddMapEntry(new Color(229, 141, 246));
|
||||
}
|
||||
|
||||
public override bool CreateDust(int i, int j, ref int type)
|
||||
{
|
||||
type = ModContent.DustType<CosmiliteBarDust>();
|
||||
return true;
|
||||
}
|
||||
|
||||
public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak)
|
||||
{
|
||||
WorldGen.Check1x1(i, j, Type);
|
||||
return true;
|
||||
}
|
||||
|
||||
public override void PlaceInWorld(int i, int j, Item item)
|
||||
{
|
||||
Main.tile[i, j].frameX = 0;
|
||||
Main.tile[i, j].frameY = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 254 B |
@@ -1,8 +1,8 @@
|
||||
using CalamityMod.Items.Materials;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
using Terraria.ObjectData;
|
||||
using CalamityMod.Items.Materials;
|
||||
|
||||
namespace CalamityMod.Tiles
|
||||
{
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
using CalamityMod.Items.Materials;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
using Terraria.ObjectData;
|
||||
|
||||
namespace CalamityMod.Tiles
|
||||
{
|
||||
public class FrigidBar : ModTile
|
||||
{
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Main.tileShine[Type] = 1000;
|
||||
Main.tileSolid[Type] = true;
|
||||
Main.tileSolidTop[Type] = true;
|
||||
Main.tileFrameImportant[Type] = true;
|
||||
|
||||
TileObjectData.newTile.CopyFrom(TileObjectData.Style1x1);
|
||||
TileObjectData.newTile.StyleHorizontal = true;
|
||||
TileObjectData.newTile.LavaDeath = false;
|
||||
TileObjectData.addTile(Type);
|
||||
|
||||
dustType = 67;
|
||||
drop = ModContent.ItemType<CryoBar>();
|
||||
|
||||
AddMapEntry(new Color(229, 141, 246));
|
||||
}
|
||||
|
||||
public override bool CreateDust(int i, int j, ref int type)
|
||||
{
|
||||
if (Main.rand.NextBool(2))
|
||||
{
|
||||
type = 67;
|
||||
}
|
||||
else
|
||||
{
|
||||
type = 68;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak)
|
||||
{
|
||||
WorldGen.Check1x1(i, j, Type);
|
||||
return true;
|
||||
}
|
||||
|
||||
public override void PlaceInWorld(int i, int j, Item item)
|
||||
{
|
||||
Main.tile[i, j].frameX = 0;
|
||||
Main.tile[i, j].frameY = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 269 B |
@@ -0,0 +1,48 @@
|
||||
using CalamityMod.Dusts;
|
||||
using CalamityMod.Items.Materials;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
using Terraria.ObjectData;
|
||||
|
||||
namespace CalamityMod.Tiles
|
||||
{
|
||||
public class ShadowspecBarTile : ModTile
|
||||
{
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Main.tileShine[Type] = 1000;
|
||||
Main.tileSolid[Type] = true;
|
||||
Main.tileSolidTop[Type] = true;
|
||||
Main.tileFrameImportant[Type] = true;
|
||||
|
||||
TileObjectData.newTile.CopyFrom(TileObjectData.Style1x1);
|
||||
TileObjectData.newTile.StyleHorizontal = true;
|
||||
TileObjectData.newTile.LavaDeath = false;
|
||||
TileObjectData.addTile(Type);
|
||||
|
||||
dustType = ModContent.DustType<ShadowspecBarDust>();
|
||||
drop = ModContent.ItemType<ShadowspecBar>();
|
||||
|
||||
AddMapEntry(new Color(128, 41, 149));
|
||||
}
|
||||
|
||||
public override bool CreateDust(int i, int j, ref int type)
|
||||
{
|
||||
type = ModContent.DustType<ShadowspecBarDust>();
|
||||
return true;
|
||||
}
|
||||
|
||||
public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak)
|
||||
{
|
||||
WorldGen.Check1x1(i, j, Type);
|
||||
return true;
|
||||
}
|
||||
|
||||
public override void PlaceInWorld(int i, int j, Item item)
|
||||
{
|
||||
Main.tile[i, j].frameX = 0;
|
||||
Main.tile[i, j].frameY = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 240 B |
@@ -0,0 +1,55 @@
|
||||
using CalamityMod.Dusts;
|
||||
using CalamityMod.Items.Materials;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
using Terraria.ObjectData;
|
||||
|
||||
namespace CalamityMod.Tiles
|
||||
{
|
||||
public class UelibloomBar : ModTile
|
||||
{
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Main.tileShine[Type] = 1000;
|
||||
Main.tileSolid[Type] = true;
|
||||
Main.tileSolidTop[Type] = true;
|
||||
Main.tileFrameImportant[Type] = true;
|
||||
|
||||
TileObjectData.newTile.CopyFrom(TileObjectData.Style1x1);
|
||||
TileObjectData.newTile.StyleHorizontal = true;
|
||||
TileObjectData.newTile.LavaDeath = false;
|
||||
TileObjectData.addTile(Type);
|
||||
|
||||
dustType = ModContent.DustType<BloomTileLeaves>();
|
||||
drop = ModContent.ItemType<UeliaceBar>();
|
||||
|
||||
AddMapEntry(new Color(134, 209, 102));
|
||||
}
|
||||
|
||||
public override bool CreateDust(int i, int j, ref int type)
|
||||
{
|
||||
if (Main.rand.NextBool(2))
|
||||
{
|
||||
type = ModContent.DustType<BloomTileLeaves>();
|
||||
}
|
||||
else
|
||||
{
|
||||
type = ModContent.DustType<BloomTileGold>();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak)
|
||||
{
|
||||
WorldGen.Check1x1(i, j, Type);
|
||||
return true;
|
||||
}
|
||||
|
||||
public override void PlaceInWorld(int i, int j, Item item)
|
||||
{
|
||||
Main.tile[i, j].frameX = 0;
|
||||
Main.tile[i, j].frameY = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 269 B |