sulph sea lore now prevents natural AS Spawns
This commit is contained in:
1 parent
a76c7dbc8b
commit
ecce35d42c
4 files changed
+13
-8
No files matched your search
@@ -413,6 +413,7 @@ namespace CalamityMod.CalPlayer
|
||||
public bool yharonLore = false;
|
||||
public bool SCalLore = false;
|
||||
public bool oceanLore = false;
|
||||
public bool sulphSeaLore = false;
|
||||
public bool corruptionLore = false;
|
||||
public bool crimsonLore = false;
|
||||
public bool underworldLore = false;
|
||||
@@ -1561,6 +1562,7 @@ namespace CalamityMod.CalPlayer
|
||||
yharonLore = false;
|
||||
SCalLore = false;
|
||||
oceanLore = false;
|
||||
sulphSeaLore = false;
|
||||
corruptionLore = false;
|
||||
crimsonLore = false;
|
||||
underworldLore = false;
|
||||
|
||||
@@ -25,10 +25,7 @@ namespace CalamityMod.Items.LoreItems
|
||||
item.consumable = false;
|
||||
}
|
||||
|
||||
public override bool CanUseItem(Player player)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
public override bool CanUseItem(Player player) => false;
|
||||
|
||||
public override void UpdateInventory(Player player)
|
||||
{
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
using CalamityMod.CalPlayer;
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Items.Placeables.Furniture.Trophies;
|
||||
using Terraria;
|
||||
@@ -12,7 +13,8 @@ namespace CalamityMod.Items.LoreItems
|
||||
{
|
||||
DisplayName.SetDefault("Sulphur Sea");
|
||||
Tooltip.SetDefault("I remember the serene waves and the clear breeze.\n" +
|
||||
"The bitterness of my youth has long since subsided, but it is far too late. I must never repeat a mistake like this again.");
|
||||
"The bitterness of my youth has long since subsided, but it is far too late. I must never repeat a mistake like this again.\n" +
|
||||
"Favorite this item to prevent the Aquatic Scourge from naturally spawning.");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
@@ -23,9 +25,13 @@ namespace CalamityMod.Items.LoreItems
|
||||
item.consumable = false;
|
||||
}
|
||||
|
||||
public override bool CanUseItem(Player player)
|
||||
public override bool CanUseItem(Player player) => false;
|
||||
|
||||
public override void UpdateInventory(Player player)
|
||||
{
|
||||
return false;
|
||||
CalamityPlayer modPlayer = player.Calamity();
|
||||
if (item.favorited)
|
||||
modPlayer.sulphSeaLore = true;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
|
||||
@@ -127,7 +127,7 @@ namespace CalamityMod.NPCs.AquaticScourge
|
||||
|
||||
public override float SpawnChance(NPCSpawnInfo spawnInfo)
|
||||
{
|
||||
if (spawnInfo.playerSafe)
|
||||
if (spawnInfo.playerSafe || spawnInfo.player.Calamity().sulphSeaLore)
|
||||
{
|
||||
return 0f;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user