WeakRef as Full ModSystem, Fixes Dependency Issues

This commit is contained in:
Flowaria authored and Cameron Ewell committed 2024-09-30 03:37:06 -04:00
1 parent 821e49bc36
commit e6bc306691
4 files changed
+8 -11

No files matched your search

-3
View File
@@ -139,9 +139,6 @@ namespace CalamityMod
LoadClient();
PrimitiveRenderer.Initialize();
ForegroundDrawing.ForegroundManager.Load();
// Wikithis support
WeakReferenceSupport.WikiThisSupport();
}
EnchantmentManager.LoadAllEnchantments();
+6 -6
View File
@@ -197,16 +197,16 @@ namespace CalamityMod
SummonersAssociationSupport();
ColoredDamageTypesSupport();
LuminanceSupport();
// done here to assure that all other mods have already loaded so that Calamity can automatically grab any of these types they may have
if (!Main.dedServ)
{
CooldownRegistry.RegisterModCooldowns();
WikiThisSupport();
PopupGUIManager.LoadGUIs();
}
}
#region BiomeLava
public static void LavaStyleToBiomeLava()
private static void LavaStyleToBiomeLava()
{
CalamityMod calamity = GetInstance<CalamityMod>();
Mod biomelava = ExternalMods.biomeLava;
@@ -255,7 +255,7 @@ namespace CalamityMod
#region WikiThis
// This is a separate function because it only runs clientside
public static void WikiThisSupport()
private static void WikiThisSupport()
{
// Wikithis is a clientside mod
if (Main.netMode == NetmodeID.Server)
@@ -1292,7 +1292,7 @@ namespace CalamityMod
private static Color StealthDamageColor = new(185, 105, 250);
private static Color StealthCritColor = new(144, 33, 235);
public static void ColoredDamageTypesSupport()
private static void ColoredDamageTypesSupport()
{
Mod coloredDamageTypes = ExternalMods.coloredDamageTypes;
if (coloredDamageTypes is null)
@@ -1319,7 +1319,7 @@ namespace CalamityMod
private static void RegisterWorldInfoIcon(Mod luminance, string texturePath, string hoverTextKey, Func<WorldFileData, bool> shouldAppear, byte priority)
=> luminance.Call("RegisterWorldInfoIcon", texturePath, hoverTextKey, shouldAppear, priority);
public static void LuminanceSupport()
private static void LuminanceSupport()
{
Mod luminance = ExternalMods.luminance;
if (luminance is null)
+1 -1
View File
@@ -13,7 +13,7 @@ namespace CalamityMod.Systems
// For now it literally adjust the graveyard count required for GraveyardBiome
// But we can add something later on /shrug
public override void Load()
public override void OnModLoad()
{
// Make Graveyard biomes require more Gravestones
SceneMetrics.GraveyardTileMax = 60;
+1 -1
View File
@@ -12,7 +12,7 @@ namespace CalamityMod.Systems
{
internal sealed class MountsBalancingSystem : ModSystem
{
public override void Load()
public override void OnModLoad()
{
// Mount balancing occurs during runtime and is undone when Calamity is unloaded.
Mount.mounts[MountID.Unicorn].dashSpeed *= CalamityPlayer.UnicornSpeedNerfPower;