Upload from upload_mods.ps1

This commit is contained in:
Nathaniel Cosford
2025-06-04 16:44:53 +09:30
commit f1fbbe67bb
1722 changed files with 165268 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
namespace Features.Fire.Harmony
{
[HarmonyPatch(typeof(Chunk))]
[HarmonyPatch("SetBlock")]
public class ChunkSetBlock
{
public static void Postfix(Chunk __instance, int ___m_X, int ___m_Z, int x, int y, int z, bool _fromReset)
{
if (!_fromReset) return;
// If the POI is being reset, clear the fire.
var vector3I = new Vector3i((___m_X << 4) + x, y, (___m_Z << 4) + z);
var fireMap = FireManager.Instance?.GetFireMap();
if (fireMap == null) return;
if (fireMap.ContainsKey(vector3I))
{
FireManager.Instance?.RemoveFire(vector3I);
}
}
}
}