-
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.
Merge pull request #76 from jonathan-robertson/dev
Fix Minor Bugs, Improve Text, Add/Update Admin Commands
- Loading branch information
Showing
14 changed files
with
133 additions
and
104 deletions.
There are no files selected for viewing
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
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 |
---|---|---|
@@ -1,9 +1,9 @@ | ||
<xml> | ||
<ModInfo> | ||
<Name value="Amnesia" /> | ||
<Description value="Reset player progress after a configurable number of deaths" /> | ||
<Description value="Reset player progress after dying under a configurable set of circumstances" /> | ||
<Author value="Jonathan Robertson (Kanaverum)" /> | ||
<Version value="1.1.1" /> | ||
<Version value="1.2.0" /> | ||
<Website value="https://github.com/jonathan-robertson/amnesia" /> | ||
</ModInfo> | ||
</xml> |
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.
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 was deleted.
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
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,54 @@ | ||
using Amnesia.Data; | ||
using Amnesia.Utilities; | ||
using HarmonyLib; | ||
using System; | ||
|
||
namespace Amnesia.Patches | ||
{ | ||
[HarmonyPatch(typeof(AIDirectorBloodMoonComponent), "StartBloodMoon")] | ||
internal class AIDirectorBloodMoonComponent_StartBloodMoon_Patches | ||
{ | ||
private static readonly ModLog<AIDirectorBloodMoonComponent_StartBloodMoon_Patches> _log = new ModLog<AIDirectorBloodMoonComponent_StartBloodMoon_Patches>(); | ||
|
||
public static void Postfix() | ||
{ | ||
try | ||
{ | ||
_log.Trace("Prefix: StartBloodMoon triggered"); | ||
var players = GameManager.Instance.World.Players.list; | ||
for (var i = 0; i < players.Count; i++) | ||
{ | ||
_ = players[i].Buffs.AddBuff(Values.BuffBloodmoonLifeProtection); | ||
} | ||
} | ||
catch (Exception e) | ||
{ | ||
_log.Error("Postfix", e); | ||
} | ||
} | ||
} | ||
|
||
[HarmonyPatch(typeof(AIDirectorBloodMoonComponent), "EndBloodMoon")] | ||
internal class AIDirectorBloodMoonComponent_EndBloodMoon_Patches | ||
{ | ||
private static readonly ModLog<AIDirectorBloodMoonComponent_EndBloodMoon_Patches> _log = new ModLog<AIDirectorBloodMoonComponent_EndBloodMoon_Patches>(); | ||
|
||
public static void Postfix() | ||
{ | ||
try | ||
{ | ||
_log.Trace("Prefix: EndBloodMoon triggered"); | ||
var players = GameManager.Instance.World.Players.list; | ||
for (var i = 0; i < players.Count; i++) | ||
{ | ||
_ = players[i].Buffs.AddBuff(Values.BuffPostBloodmoonLifeProtection); | ||
players[i].Buffs.RemoveBuff(Values.BuffBloodmoonLifeProtection); | ||
} | ||
} | ||
catch (Exception e) | ||
{ | ||
_log.Error("Postfix", e); | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.