add shrine items to shop

This commit is contained in:
Nathanael Overton committed 2026-05-27 17:55:42 -04:00
1 parent 2fd36377a4
commit e207c4c5f5
11 files changed
+188 -3

No files matched your search

+47
View File
@@ -4986,6 +4986,53 @@ namespace CalamityMod.CalPlayer
RecipeUnlockHandler.HasFoundIceSchematic = true; RecipeUnlockHandler.HasFoundIceSchematic = true;
shouldSync = true; shouldSync = true;
} }
if (Main.mouseItem.type == ModContent.ItemType<LuxorsGift>() && !RecipeUnlockHandler.HasFoundLuxorsGift)
{
RecipeUnlockHandler.HasFoundLuxorsGift = true;
shouldSync = true;
}
if (Main.mouseItem.type == ModContent.ItemType<FungalSymbiote>() && !RecipeUnlockHandler.HasFoundFungalSymbiote)
{
RecipeUnlockHandler.HasFoundFungalSymbiote = true;
shouldSync = true;
}
if (Main.mouseItem.type == ModContent.ItemType<TrinketofChi>() && !RecipeUnlockHandler.HasFoundTrinketOfChi)
{
RecipeUnlockHandler.HasFoundTrinketOfChi = true;
shouldSync = true;
}
if (Main.mouseItem.type == ModContent.ItemType<FrozenCube>() && !RecipeUnlockHandler.HasFoundFrozenCube)
{
RecipeUnlockHandler.HasFoundFrozenCube = true;
shouldSync = true;
}
if (Main.mouseItem.type == ModContent.ItemType<GladiatorsLocket>() && !RecipeUnlockHandler.HasFoundGladiatorsLocket)
{
RecipeUnlockHandler.HasFoundGladiatorsLocket = true;
shouldSync = true;
}
if (Main.mouseItem.type == ModContent.ItemType<UnstableGraniteCore>() && !RecipeUnlockHandler.HasFoundUnstableGraniteCore)
{
RecipeUnlockHandler.HasFoundUnstableGraniteCore = true;
shouldSync = true;
}
if (Main.mouseItem.type == ModContent.ItemType<CrimsonEffigy>() && !RecipeUnlockHandler.HasFoundCrimsonEffigy)
{
RecipeUnlockHandler.HasFoundCrimsonEffigy = true;
shouldSync = true;
}
if (Main.mouseItem.type == ModContent.ItemType<CorruptionEffigy>() && !RecipeUnlockHandler.HasFoundCorruptionEffigy)
{
RecipeUnlockHandler.HasFoundCorruptionEffigy = true;
shouldSync = true;
}
} }
if (shouldSync) if (shouldSync)
+49
View File
@@ -18,6 +18,16 @@ namespace CalamityMod.CustomRecipes
public static bool HasFoundHellSchematic = false; public static bool HasFoundHellSchematic = false;
public static bool HasFoundIceSchematic = false; public static bool HasFoundIceSchematic = false;
public static bool HasFoundLuxorsGift = false;
public static bool HasFoundFungalSymbiote = false;
public static bool HasFoundTrinketOfChi = false;
public static bool HasFoundFrozenCube = false;
public static bool HasFoundGladiatorsLocket = false;
public static bool HasFoundUnstableGraniteCore = false;
public static bool HasFoundCrimsonEffigy = false;
public static bool HasFoundCorruptionEffigy = false;
public static void Save(List<string> boolTagContainer) public static void Save(List<string> boolTagContainer)
{ {
boolTagContainer.AddWithCondition("HasUnlockedT1ArsenalRecipes", HasUnlockedT1ArsenalRecipes); boolTagContainer.AddWithCondition("HasUnlockedT1ArsenalRecipes", HasUnlockedT1ArsenalRecipes);
@@ -31,6 +41,15 @@ namespace CalamityMod.CustomRecipes
boolTagContainer.AddWithCondition("HasFoundJungleSchematic", HasFoundJungleSchematic); boolTagContainer.AddWithCondition("HasFoundJungleSchematic", HasFoundJungleSchematic);
boolTagContainer.AddWithCondition("HasFoundHellSchematic", HasFoundHellSchematic); boolTagContainer.AddWithCondition("HasFoundHellSchematic", HasFoundHellSchematic);
boolTagContainer.AddWithCondition("HasFoundIceSchematic", HasFoundIceSchematic); boolTagContainer.AddWithCondition("HasFoundIceSchematic", HasFoundIceSchematic);
boolTagContainer.AddWithCondition("HasFoundLuxorsGift", HasFoundLuxorsGift);
boolTagContainer.AddWithCondition("HasFoundFungalSymbiote", HasFoundFungalSymbiote);
boolTagContainer.AddWithCondition("HasFoundTrinketOfChi", HasFoundTrinketOfChi);
boolTagContainer.AddWithCondition("HasFoundFrozenCube", HasFoundFrozenCube);
boolTagContainer.AddWithCondition("HasFoundGladiatorsLocket", HasFoundGladiatorsLocket);
boolTagContainer.AddWithCondition("HasFoundUnstableGraniteCore", HasFoundUnstableGraniteCore);
boolTagContainer.AddWithCondition("HasFoundCrimsonEffigy", HasFoundCrimsonEffigy);
boolTagContainer.AddWithCondition("HasFoundCorruptionEffigy", HasFoundCorruptionEffigy);
} }
public static void Load(IList<string> boolTagContainer) public static void Load(IList<string> boolTagContainer)
@@ -46,6 +65,16 @@ namespace CalamityMod.CustomRecipes
HasFoundJungleSchematic = boolTagContainer.Contains("HasFoundJungleSchematic"); HasFoundJungleSchematic = boolTagContainer.Contains("HasFoundJungleSchematic");
HasFoundHellSchematic = boolTagContainer.Contains("HasFoundHellSchematic"); HasFoundHellSchematic = boolTagContainer.Contains("HasFoundHellSchematic");
HasFoundIceSchematic = boolTagContainer.Contains("HasFoundIceSchematic"); HasFoundIceSchematic = boolTagContainer.Contains("HasFoundIceSchematic");
HasFoundLuxorsGift = boolTagContainer.Contains("HasFoundLuxorsGift");
HasFoundFungalSymbiote = boolTagContainer.Contains("HasFoundFungalSymbiote");
HasFoundTrinketOfChi = boolTagContainer.Contains("HasFoundTrinketOfChi");
HasFoundFrozenCube = boolTagContainer.Contains("HasFoundFrozenCube");
HasFoundGladiatorsLocket = boolTagContainer.Contains("HasFoundGladiatorsLocket");
HasFoundUnstableGraniteCore = boolTagContainer.Contains("HasFoundUnstableGraniteCore");
HasFoundCrimsonEffigy = boolTagContainer.Contains("HasFoundCrimsonEffigy");
HasFoundCorruptionEffigy = boolTagContainer.Contains("HasFoundCorruptionEffigy");
} }
public static void SendData(BinaryWriter writer) public static void SendData(BinaryWriter writer)
@@ -63,9 +92,19 @@ namespace CalamityMod.CustomRecipes
BitsByte flags2 = new BitsByte(); BitsByte flags2 = new BitsByte();
flags2[0] = HasFoundHellSchematic; flags2[0] = HasFoundHellSchematic;
flags2[1] = HasFoundIceSchematic; flags2[1] = HasFoundIceSchematic;
flags2[2] = HasFoundLuxorsGift;
flags2[3] = HasFoundFungalSymbiote;
flags2[4] = HasFoundTrinketOfChi;
flags2[5] = HasFoundGladiatorsLocket;
flags2[6] = HasFoundUnstableGraniteCore;
flags2[7] = HasFoundCrimsonEffigy;
BitsByte flags3 = new BitsByte();
flags3[0] = HasFoundCorruptionEffigy;
writer.Write(flags); writer.Write(flags);
writer.Write(flags2); writer.Write(flags2);
writer.Write(flags3);
} }
public static void ReceiveData(BinaryReader reader) public static void ReceiveData(BinaryReader reader)
@@ -83,6 +122,16 @@ namespace CalamityMod.CustomRecipes
BitsByte flags2 = reader.ReadByte(); BitsByte flags2 = reader.ReadByte();
HasFoundHellSchematic = flags2[0]; HasFoundHellSchematic = flags2[0];
HasFoundIceSchematic = flags2[1]; HasFoundIceSchematic = flags2[1];
HasFoundLuxorsGift = flags2[2];
HasFoundFungalSymbiote = flags2[3];
HasFoundTrinketOfChi = flags2[4];
HasFoundGladiatorsLocket = flags2[5];
HasFoundUnstableGraniteCore = flags2[6];
HasFoundCrimsonEffigy = flags2[7];
BitsByte flags3 = reader.ReadByte();
HasFoundCorruptionEffigy = flags3[0];
} }
} }
} }
+12
View File
@@ -1,6 +1,7 @@
using System.Collections.Generic; using System.Collections.Generic;
using CalamityMod.Buffs.DamageOverTime; using CalamityMod.Buffs.DamageOverTime;
using CalamityMod.CalPlayer; using CalamityMod.CalPlayer;
using CalamityMod.CustomRecipes;
using CalamityMod.Projectiles.Typeless; using CalamityMod.Projectiles.Typeless;
using Microsoft.Xna.Framework; using Microsoft.Xna.Framework;
using Terraria; using Terraria;
@@ -35,6 +36,16 @@ namespace CalamityMod.Items.Accessories
Item.rare = ItemRarityID.Orange; Item.rare = ItemRarityID.Orange;
Item.accessory = true; Item.accessory = true;
} }
public override void UpdateInventory(Player player)
{
if (Main.netMode != NetmodeID.MultiplayerClient && !RecipeUnlockHandler.HasFoundFrozenCube)
{
RecipeUnlockHandler.HasFoundFrozenCube = true;
CalamityNetcode.SyncWorld();
}
}
public override void UpdateAccessory(Player player, bool hideVisual) public override void UpdateAccessory(Player player, bool hideVisual)
{ {
CalamityPlayer modPlayer = player.Calamity(); CalamityPlayer modPlayer = player.Calamity();
@@ -48,6 +59,7 @@ namespace CalamityMod.Items.Accessories
Projectile.NewProjectileDirect(player.GetSource_FromThis(), player.Center, Vector2.Zero, projectile, damage, 0f, player.whoAmI); Projectile.NewProjectileDirect(player.GetSource_FromThis(), player.Center, Vector2.Zero, projectile, damage, 0f, player.whoAmI);
} }
} }
public override void ModifyTooltips(List<TooltipLine> list) public override void ModifyTooltips(List<TooltipLine> list)
{ {
if (Main.LocalPlayer != null) if (Main.LocalPlayer != null)
+10
View File
@@ -1,4 +1,5 @@
using CalamityMod.CalPlayer; using CalamityMod.CalPlayer;
using CalamityMod.CustomRecipes;
using Terraria; using Terraria;
using Terraria.ID; using Terraria.ID;
using Terraria.ModLoader; using Terraria.ModLoader;
@@ -17,6 +18,15 @@ namespace CalamityMod.Items.Accessories
Item.accessory = true; Item.accessory = true;
} }
public override void UpdateInventory(Player player)
{
if (Main.netMode != NetmodeID.MultiplayerClient && !RecipeUnlockHandler.HasFoundFungalSymbiote)
{
RecipeUnlockHandler.HasFoundFungalSymbiote = true;
CalamityNetcode.SyncWorld();
}
}
public override void UpdateAccessory(Player player, bool hideVisual) public override void UpdateAccessory(Player player, bool hideVisual)
{ {
CalamityPlayer modPlayer = player.Calamity(); CalamityPlayer modPlayer = player.Calamity();
+9
View File
@@ -1,4 +1,5 @@
using System; using System;
using CalamityMod.CustomRecipes;
using Terraria; using Terraria;
using Terraria.ID; using Terraria.ID;
using Terraria.ModLoader; using Terraria.ModLoader;
@@ -16,6 +17,14 @@ namespace CalamityMod.Items.Accessories
Item.rare = ItemRarityID.Orange; Item.rare = ItemRarityID.Orange;
Item.accessory = true; Item.accessory = true;
} }
public override void UpdateInventory(Player player)
{
if (Main.netMode != NetmodeID.MultiplayerClient && !RecipeUnlockHandler.HasFoundGladiatorsLocket)
{
RecipeUnlockHandler.HasFoundGladiatorsLocket = true;
CalamityNetcode.SyncWorld();
}
}
public override void UpdateAccessory(Player player, bool hideVisual) public override void UpdateAccessory(Player player, bool hideVisual)
{ {
+9
View File
@@ -1,4 +1,5 @@
using CalamityMod.CalPlayer; using CalamityMod.CalPlayer;
using CalamityMod.CustomRecipes;
using CalamityMod.Projectiles.Typeless; using CalamityMod.Projectiles.Typeless;
using Microsoft.Xna.Framework; using Microsoft.Xna.Framework;
using Terraria; using Terraria;
@@ -35,6 +36,14 @@ namespace CalamityMod.Items.Accessories
Item.rare = ItemRarityID.Orange; Item.rare = ItemRarityID.Orange;
Item.accessory = true; Item.accessory = true;
} }
public override void UpdateInventory(Player player)
{
if (Main.netMode != NetmodeID.MultiplayerClient && !RecipeUnlockHandler.HasFoundLuxorsGift)
{
RecipeUnlockHandler.HasFoundLuxorsGift = true;
CalamityNetcode.SyncWorld();
}
}
public override void UpdateAccessory(Player player, bool hideVisual) public override void UpdateAccessory(Player player, bool hideVisual)
{ {
+10
View File
@@ -1,5 +1,6 @@
using CalamityMod.Buffs.StatBuffs; using CalamityMod.Buffs.StatBuffs;
using CalamityMod.CalPlayer; using CalamityMod.CalPlayer;
using CalamityMod.CustomRecipes;
using Terraria; using Terraria;
using Terraria.ID; using Terraria.ID;
using Terraria.Localization; using Terraria.Localization;
@@ -25,6 +26,15 @@ namespace CalamityMod.Items.Accessories
Item.accessory = true; Item.accessory = true;
} }
public override void UpdateInventory(Player player)
{
if (Main.netMode != NetmodeID.MultiplayerClient && !RecipeUnlockHandler.HasFoundTrinketOfChi)
{
RecipeUnlockHandler.HasFoundTrinketOfChi = true;
CalamityNetcode.SyncWorld();
}
}
public override void UpdateAccessory(Player player, bool hideVisual) public override void UpdateAccessory(Player player, bool hideVisual)
{ {
CalamityPlayer modPlayer = player.Calamity(); CalamityPlayer modPlayer = player.Calamity();
+10
View File
@@ -1,4 +1,5 @@
using CalamityMod.CalPlayer; using CalamityMod.CalPlayer;
using CalamityMod.CustomRecipes;
using Terraria; using Terraria;
using Terraria.DataStructures; using Terraria.DataStructures;
using Terraria.ID; using Terraria.ID;
@@ -25,6 +26,15 @@ namespace CalamityMod.Items.Accessories
Item.accessory = true; Item.accessory = true;
} }
public override void UpdateInventory(Player player)
{
if (Main.netMode != NetmodeID.MultiplayerClient && !RecipeUnlockHandler.HasFoundUnstableGraniteCore)
{
RecipeUnlockHandler.HasFoundUnstableGraniteCore = true;
CalamityNetcode.SyncWorld();
}
}
public override void UpdateAccessory(Player player, bool hideVisual) public override void UpdateAccessory(Player player, bool hideVisual)
{ {
CalamityPlayer modPlayer = player.Calamity(); CalamityPlayer modPlayer = player.Calamity();
+11 -1
View File
@@ -1,4 +1,5 @@
using Terraria; using CalamityMod.CustomRecipes;
using Terraria;
using Terraria.ID; using Terraria.ID;
using Terraria.Localization; using Terraria.Localization;
using Terraria.ModLoader; using Terraria.ModLoader;
@@ -21,6 +22,15 @@ namespace CalamityMod.Items.Placeables.Furniture
Item.rare = ItemRarityID.Orange; Item.rare = ItemRarityID.Orange;
} }
public override void UpdateInventory(Player player)
{
if (Main.netMode != NetmodeID.MultiplayerClient && !RecipeUnlockHandler.HasFoundCorruptionEffigy)
{
RecipeUnlockHandler.HasFoundCorruptionEffigy = true;
CalamityNetcode.SyncWorld();
}
}
public override void AddRecipes() public override void AddRecipes()
{ {
CreateRecipe(). CreateRecipe().
+11 -1
View File
@@ -1,4 +1,5 @@
using Terraria; using CalamityMod.CustomRecipes;
using Terraria;
using Terraria.ID; using Terraria.ID;
using Terraria.Localization; using Terraria.Localization;
using Terraria.ModLoader; using Terraria.ModLoader;
@@ -21,6 +22,15 @@ namespace CalamityMod.Items.Placeables.Furniture
Item.rare = ItemRarityID.Orange; Item.rare = ItemRarityID.Orange;
} }
public override void UpdateInventory(Player player)
{
if (Main.netMode != NetmodeID.MultiplayerClient && !RecipeUnlockHandler.HasFoundCrimsonEffigy)
{
RecipeUnlockHandler.HasFoundCrimsonEffigy = true;
CalamityNetcode.SyncWorld();
}
}
public override void AddRecipes() public override void AddRecipes()
{ {
CreateRecipe(). CreateRecipe().
+10 -1
View File
@@ -1,6 +1,7 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Threading; using System.Threading;
using CalamityMod.CustomRecipes;
using CalamityMod.Dusts; using CalamityMod.Dusts;
using CalamityMod.Items.Accessories; using CalamityMod.Items.Accessories;
using CalamityMod.Items.Fishing; using CalamityMod.Items.Fishing;
@@ -284,7 +285,15 @@ namespace CalamityMod.NPCs.TownNPCs
.Add<UnbreakableVoucher>(Condition.DownedGoblinArmy) .Add<UnbreakableVoucher>(Condition.DownedGoblinArmy)
.Add<HurriedVoucher>(Condition.DownedGoblinArmy) .Add<HurriedVoucher>(Condition.DownedGoblinArmy)
.Add<OmniGun>(Condition.DownedGolem) .Add<OmniGun>(Condition.DownedGolem)
.Add<LuxorsGift>(new Condition("Mods.CalamityMod.Conditions.HasFoundLuxorsGift", () => RecipeUnlockHandler.HasFoundLuxorsGift))
.Add<FungalSymbiote>(new Condition("Mods.CalamityMod.Conditions.HasFoundFungalSymbiote", () => RecipeUnlockHandler.HasFoundFungalSymbiote))
.Add<TrinketofChi>(new Condition("Mods.CalamityMod.Conditions.HasFoundTrinketOfChi", () => RecipeUnlockHandler.HasFoundTrinketOfChi))
.Add<FrozenCube>(new Condition("Mods.CalamityMod.Conditions.HasFoundFrozenCube", () => RecipeUnlockHandler.HasFoundFrozenCube))
.Add<GladiatorsLocket>(new Condition("Mods.CalamityMod.Conditions.HasFoundGladiatorsLocket", () => RecipeUnlockHandler.HasFoundGladiatorsLocket))
.Add<UnstableGraniteCore>(new Condition("Mods.CalamityMod.Conditions.HasFoundUnstableGraniteCore", () => RecipeUnlockHandler.HasFoundUnstableGraniteCore))
.Add<CrimsonEffigy>(new Condition("Mods.CalamityMod.Conditions.HasFoundCrimsonEffigy", () => RecipeUnlockHandler.HasFoundCrimsonEffigy))
.Add<CorruptionEffigy>(new Condition("Mods.CalamityMod.Conditions.HasFoundCorruptionEffigy", () => RecipeUnlockHandler.HasFoundCorruptionEffigy))
.Register(); .Register();
} }