forked from NebulaModTeam/nebula
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Disable ACH_BroadcastStar.OnGameTick on client
- Loading branch information
Showing
2 changed files
with
25 additions
and
69 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#region | ||
|
||
using HarmonyLib; | ||
using NebulaWorld; | ||
|
||
#endregion | ||
|
||
namespace NebulaPatcher.Patches.Dynamic; | ||
|
||
[HarmonyPatch(typeof(ACH_BroadcastStar))] | ||
internal class ACH_BroadcastStar_Patch | ||
{ | ||
[HarmonyPrefix] | ||
[HarmonyPatch(nameof(ACH_BroadcastStar.OnGameTick))] | ||
[HarmonyPatch(nameof(ACH_BroadcastStar.TryAlterEntity))] | ||
public static bool Block_On_Client_Prefix() | ||
{ | ||
// ACH_BroadcastStar is for the achievement "Let there be light!" | ||
// which needs to light up Artificial Star (2210) on certain planets | ||
// Clients only have partial factories loaded so they won't get the correct stats. | ||
// Therefore it's disabled to prevent errors. | ||
// TODO: Try to handle global achievements syncing? | ||
return !Multiplayer.IsActive || Multiplayer.Session.IsServer; | ||
} | ||
} |
69 changes: 0 additions & 69 deletions
69
NebulaPatcher/Patches/Transpilers/ACH_BroadcastStar_Transpiler.cs
This file was deleted.
Oops, something went wrong.