This commit is contained in:
mountaindrew10 committed 2022-06-01 20:29:10 -05:00
commit c2ffd30a14
11 files changed
+30 -41

No files matched your search

-1
View File
@@ -329,7 +329,6 @@ namespace CalamityMod
BossRushEvent.Unload();
SchematicManager.Unload();
CustomLavaManagement.Unload();
BossHealthBarManager.Unload();
DraedonStructures.Unload();
CooldownRegistry.Unload();
PlayerDashManager.Unload();
+4 -3
View File
@@ -18,6 +18,7 @@ namespace CalamityMod.NPCs.AcidRain
DisplayName.SetDefault("Baby Flak Crab");
Main.npcFrameCount[NPC.type] = 6;
Main.npcCatchable[NPC.type] = true;
NPCID.Sets.CountsAsCritter[NPC.type] = true;
}
public override void SetDefaults()
@@ -44,10 +45,10 @@ namespace CalamityMod.NPCs.AcidRain
public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry)
{
bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] {
//BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.SulphurousSea,
//BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.SulphurousSea,
// Will move to localization whenever that is cleaned up.
new FlavorTextBestiaryInfoElement("Curiously, these seem to be intelligent enough to imprint a sort of parent figure if captured at a young enough age. They will stick with you forever!")
// Will move to localization whenever that is cleaned up.
new FlavorTextBestiaryInfoElement("Curiously, these seem to be intelligent enough to imprint a sort of parent figure if captured at a young enough age. They will stick with you forever!")
});
}
+4 -3
View File
@@ -17,6 +17,7 @@ namespace CalamityMod.NPCs.AcidRain
DisplayName.SetDefault("Bloodworm");
Main.npcFrameCount[NPC.type] = 7;
Main.npcCatchable[NPC.type] = true;
NPCID.Sets.CountsAsCritter[NPC.type] = true;
}
public override void SetDefaults()
@@ -81,10 +82,10 @@ namespace CalamityMod.NPCs.AcidRain
public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry)
{
bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] {
//BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.SulphurousSea,
//BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.SulphurousSea,
// Will move to localization whenever that is cleaned up.
new FlavorTextBestiaryInfoElement("A ripe-looking worm large enough to curl around your arm. A fish would have to be either mad enough or wise enough, to go after one of these.")
// Will move to localization whenever that is cleaned up.
new FlavorTextBestiaryInfoElement("A ripe-looking worm large enough to curl around your arm. A fish would have to be either mad enough or wise enough, to go after one of these.")
});
}
+2 -1
View File
@@ -14,7 +14,8 @@ namespace CalamityMod.NPCs.Astral
Main.npcCatchable[NPC.type] = true;
NPCID.Sets.NPCBestiaryDrawModifiers bestiaryData = new NPCID.Sets.NPCBestiaryDrawModifiers(0){ Hide = true };
NPCID.Sets.NPCBestiaryDrawOffset.Add(Type, bestiaryData);
}
NPCID.Sets.CountsAsCritter[NPC.type] = true;
}
public override void SetDefaults()
{
+1 -1
View File
@@ -15,6 +15,7 @@ namespace CalamityMod.NPCs.Astral
DisplayName.SetDefault("Twinkler");
Main.npcFrameCount[NPC.type] = 8;
Main.npcCatchable[NPC.type] = true;
NPCID.Sets.CountsAsCritter[NPC.type] = true;
}
public override void SetDefaults()
@@ -25,7 +26,6 @@ namespace CalamityMod.NPCs.Astral
AIType = NPCID.LightningBug;
AnimationType = NPCID.LightningBug;
NPC.catchItem = (short)ModContent.ItemType<TwinklerItem>();
NPC.friendly = true; // prevents critter from getting slagged
//Banner = npc.type;
//BannerItem = ModContent.ItemType<TwinklerBanner>();
}
+1 -1
View File
@@ -50,6 +50,7 @@ namespace CalamityMod.NPCs.DraedonLabThings
{
DisplayName.SetDefault("Repair Unit");
Main.npcFrameCount[NPC.type] = 17;
NPCID.Sets.CountsAsCritter[NPC.type] = true;
}
public override void SetDefaults()
@@ -63,7 +64,6 @@ namespace CalamityMod.NPCs.DraedonLabThings
NPC.knockBackResist = 0f;
NPC.noGravity = true;
NPC.noTileCollide = false;
NPC.friendly = true;
NPC.HitSound = SoundID.NPCHit4;
NPC.DeathSound = SoundID.NPCDeath44;
}
+1
View File
@@ -14,6 +14,7 @@ namespace CalamityMod.NPCs.NormalNPCs
DisplayName.SetDefault("Piggy");
Main.npcFrameCount[NPC.type] = 5;
Main.npcCatchable[NPC.type] = true;
NPCID.Sets.CountsAsCritter[NPC.type] = true;
}
public override void SetDefaults()
+4 -3
View File
@@ -21,6 +21,7 @@ namespace CalamityMod.NPCs.SunkenSea
DisplayName.SetDefault("Baby Ghost Bell");
Main.npcFrameCount[NPC.type] = 4;
Main.npcCatchable[NPC.type] = true;
NPCID.Sets.CountsAsCritter[NPC.type] = true;
}
public override void SetDefaults()
@@ -47,10 +48,10 @@ namespace CalamityMod.NPCs.SunkenSea
public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry)
{
bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] {
//BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.SunkenSea,
//BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.SunkenSea,
// Will move to localization whenever that is cleaned up.
new FlavorTextBestiaryInfoElement("Like their adult counterparts, they shimmer gently, and would make great sources of light if the prisms around them didn’t already do so. Maybe if there was a way to bring one with you.")
// Will move to localization whenever that is cleaned up.
new FlavorTextBestiaryInfoElement("Like their adult counterparts, they shimmer gently, and would make great sources of light if the prisms around them didn’t already do so. Maybe if there was a way to bring one with you.")
});
}
+4 -3
View File
@@ -15,6 +15,7 @@ namespace CalamityMod.NPCs.SunkenSea
DisplayName.SetDefault("Sea Minnow");
Main.npcFrameCount[NPC.type] = 4;
Main.npcCatchable[NPC.type] = true;
NPCID.Sets.CountsAsCritter[NPC.type] = true;
}
public override void SetDefaults()
@@ -39,10 +40,10 @@ namespace CalamityMod.NPCs.SunkenSea
public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry)
{
bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] {
//BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.SunkenSea,
//BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.SunkenSea,
// Will move to localization whenever that is cleaned up.
new FlavorTextBestiaryInfoElement("While they are at the bottom of the food chain, they also make up eighty percent of the biomass in this sea. They nibble away at corpses that fall from the underground desert above.")
// Will move to localization whenever that is cleaned up.
new FlavorTextBestiaryInfoElement("While they are at the bottom of the food chain, they also make up eighty percent of the biomass in this sea. They nibble away at corpses that fall from the underground desert above.")
});
}
-20
View File
@@ -29,16 +29,6 @@ namespace CalamityMod.Systems
int mouseIndex = layers.FindIndex(layer => layer.Name == "Vanilla: Mouse Text");
if (mouseIndex != -1)
{
layers.Insert(mouseIndex, new LegacyGameInterfaceLayer("Boss HP Bars", delegate ()
{
if (Main.LocalPlayer.Calamity().drawBossHPBar)
{
BossHealthBarManager.Update();
BossHealthBarManager.Draw(Main.spriteBatch);
}
return true;
}, InterfaceScaleType.None));
layers.Insert(mouseIndex, new LegacyGameInterfaceLayer("Draedon Hologram", () =>
{
LabHologramProjectorUI.Draw(Main.spriteBatch);
@@ -60,16 +50,6 @@ namespace CalamityMod.Systems
return true;
}, InterfaceScaleType.Game));
layers.Insert(mouseIndex, new LegacyGameInterfaceLayer("Boss HP Bars", delegate ()
{
if (Main.LocalPlayer.Calamity().drawBossHPBar)
{
BossHealthBarManager.Update();
BossHealthBarManager.Draw(Main.spriteBatch);
}
return true;
}, InterfaceScaleType.None));
// Mode Indicator UI.
layers.Insert(mouseIndex, new LegacyGameInterfaceLayer("Mode Indicator UI", delegate ()
{
+9 -5
View File
@@ -29,8 +29,10 @@ using System;
using System.Collections.Generic;
using System.Linq;
using Terraria;
using Terraria.DataStructures;
using Terraria.GameContent;
using Terraria.GameContent.Events;
using Terraria.GameContent.UI.BigProgressBar;
using Terraria.ID;
using Terraria.ModLoader;
@@ -61,7 +63,7 @@ namespace CalamityMod.UI
That should be it -- ask if you have any questions!
*/
public static class BossHealthBarManager
public class BossHealthBarManager : ModBossBarStyle
{
public struct BossEntityExtension
{
@@ -346,7 +348,7 @@ namespace CalamityMod.UI
}
#pragma warning restore IDE0028 // Simplify collection initialization
internal static void Unload()
public override void Unload()
{
BossMainHPBar = null;
BossComboHPBar = null;
@@ -360,7 +362,7 @@ namespace CalamityMod.UI
SpecialHPRequirements = null;
}
public static void Update()
public override void Update(IBigProgressBar currentBar, ref BigProgressBarInfo info)
{
for (int i = 0; i < Main.maxNPCs; i++)
{
@@ -411,7 +413,9 @@ namespace CalamityMod.UI
Bars.Add(new BossHPUI(index, overridingName));
}
public static void Draw(SpriteBatch sb)
public override bool PreventDraw => true;
public override void Draw(SpriteBatch spriteBatch, IBigProgressBar currentBar, BigProgressBarInfo info)
{
int startHeight = 100;
int x = Main.screenWidth - 420;
@@ -421,7 +425,7 @@ namespace CalamityMod.UI
foreach (BossHPUI ui in Bars)
{
ui.Draw(sb, x, y);
ui.Draw(spriteBatch, x, y);
y -= BossHPUI.VerticalOffsetPerBar;
}
}