-
-
Notifications
You must be signed in to change notification settings - Fork 123
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #650 from starfi5h/bugfix
Bugfix and enhancement
- Loading branch information
Showing
12 changed files
with
170 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,5 +18,6 @@ public enum DysonSphereRequestEvent | |
{ | ||
List = 1, | ||
Load = 2, | ||
Unload = 3 | ||
Unload = 3, | ||
Query = 4 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#region | ||
|
||
using HarmonyLib; | ||
using NebulaModel; | ||
using NebulaWorld; | ||
|
||
#endregion | ||
|
||
namespace NebulaPatcher.Patches.Dynamic; | ||
|
||
[HarmonyPatch(typeof(AbnormalityLogic))] | ||
internal class AbnormalityLogic_Patch | ||
{ | ||
[HarmonyPrefix] | ||
[HarmonyPatch(nameof(AbnormalityLogic.GameTick))] | ||
public static bool GameTick_Prefix() | ||
{ | ||
return !Multiplayer.IsActive || !Config.Options.EnableAchievement; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#region | ||
|
||
using HarmonyLib; | ||
using NebulaModel; | ||
using NebulaWorld; | ||
|
||
#endregion | ||
|
||
namespace NebulaPatcher.Patches.Dynamic; | ||
|
||
[HarmonyPatch(typeof(AchievementLogic))] | ||
internal class AchievementLogic_Patch | ||
{ | ||
[HarmonyPrefix] | ||
[HarmonyPatch(nameof(AchievementLogic.isSelfFormalGame), MethodType.Getter)] | ||
public static bool IsSelfFormalGame_Prefix(ref bool __result) | ||
{ | ||
if (!Multiplayer.IsActive) | ||
{ | ||
return true; | ||
} | ||
|
||
// Decide to enable achievement or not in multiplayer game | ||
__result = Config.Options.EnableAchievement; | ||
return false; | ||
} | ||
} |
35 changes: 35 additions & 0 deletions
35
NebulaPatcher/Patches/Dynamic/GameAbnormalityData_0925_Patch.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#region | ||
|
||
using ABN; | ||
using HarmonyLib; | ||
using NebulaModel; | ||
using NebulaWorld; | ||
|
||
#endregion | ||
|
||
namespace NebulaPatcher.Patches.Dynamic; | ||
|
||
[HarmonyPatch(typeof(GameAbnormalityData_0925))] | ||
internal class GameAbnormalityData_0925_Patch | ||
{ | ||
[HarmonyPrefix] | ||
[HarmonyPatch(nameof(GameAbnormalityData_0925.TriggerAbnormality))] | ||
public static bool TriggerAbnormality_Prefix() | ||
{ | ||
return !Multiplayer.IsActive || !Config.Options.EnableAchievement; | ||
} | ||
|
||
[HarmonyPrefix] | ||
[HarmonyPatch(nameof(GameAbnormalityData_0925.NothingAbnormal))] | ||
[HarmonyPatch(nameof(GameAbnormalityData_0925.IsAbnormalTriggerred))] | ||
public static bool NothingAbnormal_Prefix(ref bool __result) | ||
{ | ||
if (!Multiplayer.IsActive || !Config.Options.EnableAchievement) | ||
{ | ||
return true; | ||
} | ||
|
||
__result = true; | ||
return false; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters