-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
86c217e
commit 4722df8
Showing
3 changed files
with
21 additions
and
2 deletions.
There are no files selected for viewing
19 changes: 19 additions & 0 deletions
19
NodeController/Patches/BuilidingManger_SimulationStep_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,19 @@ | ||
namespace NodeController.Patches { | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using HarmonyLib; | ||
|
||
[HarmonyPatch(typeof(BuildingManager),"SimulationStepImpl")] | ||
internal static class BuilidingManger_SimulationStep_Patch { | ||
// must be read/write from simulation thread. | ||
internal static HashSet<ushort> FixPillarNodeIDs = new(); | ||
static void Prefix() { | ||
foreach(var nodeID in FixPillarNodeIDs) { | ||
NodeData.FixPillar(nodeID); | ||
} | ||
FixPillarNodeIDs.Clear(); | ||
} | ||
} | ||
} |
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