-
Notifications
You must be signed in to change notification settings - Fork 102
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
Showing
10 changed files
with
822 additions
and
810 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,25 +1,15 @@ | ||
using HarmonyLib; | ||
using UnityEngine; | ||
|
||
namespace Features.Fire.Harmony | ||
{ | ||
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 ) | ||
{ | ||
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); | ||
} | ||
|
||
FireManager.Instance?.RemoveFire(vector3I); | ||
} | ||
} | ||
} |
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
Binary file not shown.
Binary file not shown.
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