Fully Rewrite LavaRendering System

This commit is contained in:
Flowaria authored and Cameron Ewell committed 2025-12-03 20:09:51 -05:00
1 parent e240546eed
commit 1749920b6c
15 files changed
+906 -2051

No files matched your search

+6 -6
View File
@@ -54,6 +54,7 @@ using CalamityMod.Projectiles.DraedonsArsenal;
using CalamityMod.Projectiles.Summon;
using CalamityMod.Projectiles.Summon.Umbrella;
using CalamityMod.Systems;
using CalamityMod.Systems.Graphic.LiquidSystem;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Terraria;
@@ -203,10 +204,9 @@ namespace CalamityMod
if (biomelava == null)
return;
foreach (ModLavaStyle item in LavaStylesLoader.Content)
foreach (ModLavaStyle lavaStyle in ModLavaStyleLoader.AllStyles)
{
int type = item.Slot;
ModLavaStyle lavaStyle = LavaStylesLoader.Get(type);
int type = lavaStyle.Slot;
if (lavaStyle != null)
{
Func<int> GetSplashDust = lavaStyle.GetSplashDust;
@@ -1310,7 +1310,7 @@ namespace CalamityMod
#region Luminance
private static void RegisterWorldInfoIcon(Mod luminance, string texturePath, string hoverTextKey, Func<WorldFileData, bool> shouldAppear, byte priority)
=> luminance.Call("RegisterWorldInfoIcon", texturePath, hoverTextKey, shouldAppear, priority);
private static void LuminanceSupport()
{
Mod luminance = ExternalMods.luminance;
@@ -1324,7 +1324,7 @@ namespace CalamityMod
return tagData.ContainsKey("DeathMode") && tagData.GetBool("DeathMode");
};
Func<WorldFileData, bool> revengeanceEnabled = data =>
{
if (!data.TryGetHeaderData<WorldSelectionDifficultySystem>(out var tagData))
@@ -1332,7 +1332,7 @@ namespace CalamityMod
return tagData.ContainsKey("RevengeanceMode") && tagData.GetBool("RevengeanceMode") && !(tagData.ContainsKey("DeathMode") && tagData.GetBool("DeathMode"));
};
RegisterWorldInfoIcon(luminance, "CalamityMod/UI/ModeIndicator/ModeIndicator_Death", "Mods.CalamityMod.UI.Death", deathEnabled, 50);
RegisterWorldInfoIcon(luminance, "CalamityMod/UI/ModeIndicator/ModeIndicator_Rev", "Mods.CalamityMod.UI.Revengeance", revengeanceEnabled, 50);
}