gfhhnghncvg 🐛

This commit is contained in:
Altixal committed 2025-07-28 16:52:03 +07:00
1 parent c75ee908c8
commit cc2ec42883
2 files changed
+22 -1

No files matched your search

+13 -1
View File
@@ -440,7 +440,19 @@ namespace CalamityMod.Systems
{
if (Main.getGoodWorld)
{
Main.GameMode = GameModeID.Master;
if (!Main.GameModeInfo.IsJourneyMode)
{
Main.GameMode = value == true ? GameModeID.Master : GameModeID.Expert;
}
else
{
CreativePowers.DifficultySliderPower power = CreativePowerManager.Instance.GetPower<CreativePowers.DifficultySliderPower>();
if (power.GetIsUnlocked())
{
DifficultyModeSystem.journeySliderCacheField.SetValue(power, value == true ? 1f : 0.66f);
DifficultyModeSystem.journeyDifficultyUpdateMethod.Invoke(power, null);
}
}
CalamityWorld.death = value;
}
else
+9
View File
@@ -5,9 +5,11 @@ using CalamityMod.NPCs.ExoMechs.Apollo;
using CalamityMod.NPCs.ExoMechs.Ares;
using CalamityMod.NPCs.ExoMechs.Artemis;
using CalamityMod.NPCs.ExoMechs.Thanatos;
using CalamityMod.Systems;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.DataStructures;
using Terraria.GameContent.Creative;
using Terraria.GameContent.Events;
using Terraria.ID;
using Terraria.ModLoader;
@@ -56,6 +58,13 @@ namespace CalamityMod.World
// Therefore gotta reflect!
public static bool ReflectMasterMode()
{
if (Main.GameModeInfo.IsJourneyMode)
{
CreativePowers.DifficultySliderPower power = CreativePowerManager.Instance.GetPower<CreativePowers.DifficultySliderPower>();
float level = (float)DifficultyModeSystem.journeySliderCacheField.GetValue(power);
return level == 1f;
}
FieldInfo findInfo = typeof(Main).GetField("_currentGameModeInfo", BindingFlags.Static | BindingFlags.NonPublic);
GameModeData data = (GameModeData)findInfo.GetValue(null);
return data.IsMasterMode;