Files
CalamityModPublic/Items/Tools/ClimateChange/Cosmolight.cs
T
Andrew Marheine 33d3f60bf0 1 - Removed Frigid Bars.
2 - Removed Daylight and Moonlight.
3 - Adjust recipes.
4 - Removed Yharon's increased DR while doing certain actions.
5 - Fixed cal clone entering phase 2 insanely fast.
6 - Mech boss summons can now be crafted at Iron/Lead Anvil.
7 - Angle and Demon Wings can now be crafted at Iron/Lead Anvil.
8 - Steampunker can awaken no longer.
9 - Added Early Hardmode Progression Rework config bool, it does absolutely nothing at the moment.
2021-03-06 12:30:45 -06:00

65 lines
1.8 KiB
C#

using CalamityMod.CalPlayer;
using CalamityMod.Items.Materials;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Tools.ClimateChange
{
public class Cosmolight : ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Cosmolight");
Tooltip.SetDefault("Changes night to day and vice versa");
}
public override void SetDefaults()
{
item.width = 20;
item.height = 20;
item.rare = ItemRarityID.Pink;
item.useAnimation = 20;
item.useTime = 20;
item.useStyle = ItemUseStyleID.HoldingUp;
item.UseSound = SoundID.Item60;
item.consumable = false;
}
public override bool CanUseItem(Player player)
{
return !CalamityPlayer.areThereAnyDamnBosses;
}
public override bool UseItem(Player player)
{
if (Main.netMode != NetmodeID.MultiplayerClient)
{
Main.time = 0.0;
Main.dayTime = !Main.dayTime;
if (Main.dayTime)
{
if (++Main.moonPhase >= 8)
{
Main.moonPhase = 0;
}
}
CalamityNetcode.SyncWorld();
}
return true;
}
public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ItemID.SoulofLight, 7);
recipe.AddIngredient(ItemID.SoulofNight, 7);
recipe.AddIngredient(ItemID.HellstoneBar, 5);
recipe.AddIngredient(ModContent.ItemType<VerstaltiteBar>(), 5);
recipe.AddTile(TileID.MythrilAnvil);
recipe.SetResult(this);
recipe.AddRecipe();
}
}
}