Skip to content

Commit

Permalink
Release v1.16.0
Browse files Browse the repository at this point in the history
  • Loading branch information
qwbarch committed Jan 21, 2025
1 parent 55de733 commit 8a4cf36
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 18 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
## Changelog

### 1.16.0

- Enemies now have a configurable chance to start mimicking a player's voice - [#134](<https://github.com/qwbarch/mirage/pull/134>) - Thanks to [Kuodos](<https://github.com/Kuodos>) for the contribution.
- Orphaned config entries no longer gets deleted.

Thanks to [Lunxara](<https://www.twitch.tv/lunxara>) for testing yet another update, and confirming it works as expected.
If anyone would like to contribute to Mirage, take a look at issue [#131](<https://github.com/qwbarch/mirage/issues/131>).
I left a comment at the bottom of the issue on which files to look at.

### 1.15.5

- Fixed a bug that caused some enemies that were disabled in ``Mirage.Enemies.cfg`` to still mimic voices.
Expand Down
2 changes: 1 addition & 1 deletion package/mirage-lc/manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Mirage",
"version_number": "1.15.5",
"version_number": "1.16.0",
"website_url": "https://github.com/qwbarch/mirage",
"description": "Voice mimicking where all players hear the same voice, with a focus on masked enemies. Alternative to Skinwalkers + MaskedEnemyOverhaul.",
"dependencies": [
Expand Down
15 changes: 0 additions & 15 deletions package/mirage-lc/src/Mirage/Domain/Config.fs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ open BepInEx
open FSharpPlus
open System
open System.IO
open System.Reflection
open System.Collections.Generic
open System.Runtime.Serialization
open BepInEx.Configuration
open Unity.Netcode
Expand All @@ -31,19 +29,6 @@ type LocalConfig(general: ConfigFile, enemies: ConfigFile) =
member val internal General = general
member val internal Enemies = enemies

member _.ClearOrphanedEntries() =
let clear (config: ConfigFile) =
let entries =
config
.GetType()
.GetProperty("OrphanedEntries", BindingFlags.NonPublic ||| BindingFlags.Instance)
.GetValue(config, null)
:?> Dictionary<ConfigDefinition, string>
entries.Clear()
config.Save()
clear general
clear enemies

member _.RegisterEnemy(enemyAI: EnemyAI) =
try
ignore <| enemies.Bind(
Expand Down
1 change: 0 additions & 1 deletion package/mirage-lc/src/Mirage/Hook/Config.fs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ let syncConfig () =
let enemyAI = prefab.Prefab.GetComponent<EnemyAI>()
if not <| isNull enemyAI then
localConfig.RegisterEnemy enemyAI
localConfig.ClearOrphanedEntries()
initEnemiesLethalConfig
(Assembly.GetExecutingAssembly())
(getEnemyConfigEntries())
Expand Down
2 changes: 1 addition & 1 deletion package/mirage-lc/src/Mirage/PluginInfo.fs
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ module Mirage.PluginInfo

let [<Literal>] pluginName = "Mirage"
let [<Literal>] pluginId = "qwbarch." + pluginName
let [<Literal>] pluginVersion = "1.15.5"
let [<Literal>] pluginVersion = "1.16.0"

0 comments on commit 8a4cf36

Please sign in to comment.