diff --git a/manifest.json b/manifest.json index 99353d7..e903043 100644 --- a/manifest.json +++ b/manifest.json @@ -2,7 +2,7 @@ "id": "QudGendersUnleashed", "title": "{{m-Y-g alternation|Qud: Genders Unleashed}}", "description": "Adds gendeers and pronounce", - "version": "1.3", + "version": "1.4", "author": "librarianmage", "previewImage": "icon.png" } diff --git a/selectors.cs b/selectors.cs index 454d0f5..3c3c037 100644 --- a/selectors.cs +++ b/selectors.cs @@ -19,9 +19,14 @@ public static MethodInfo TargetMethod() } public static IEnumerable Transpiler(IEnumerable instructions) { - MethodInfo oldMethod = AccessTools.Method(typeof(Gender), nameof(Gender.GetAllGenericPersonalSingular)); + MethodInfo oldPReefMethod = AccessTools.Method(typeof(Gender), nameof(Gender.GetAllGenericPersonalSingular)); + MethodInfo oldMStairMethod = AccessTools.Method(typeof(Gender), nameof(Gender.GetAllGenericPersonal)); MethodInfo newMethod = AccessTools.Method(typeof(Gender), nameof(Gender.GetAllPersonal)); - return HarmonyLib.Transpilers.MethodReplacer(instructions, oldMethod, newMethod); + + IEnumerable replacePReef = HarmonyLib.Transpilers.MethodReplacer(instructions, oldPReefMethod, newMethod); + IEnumerable replaceMStair = HarmonyLib.Transpilers.MethodReplacer(replacePReef, oldMStairMethod, newMethod); + + return replaceMStair; } } @@ -35,9 +40,14 @@ public static MethodBase TargetMethod() public static IEnumerable Transpiler(IEnumerable instructions) { - MethodInfo oldMethod = AccessTools.Method(typeof(PronounSet), nameof(PronounSet.GetAllGenericPersonalSingular)); + MethodInfo oldPReefMethod = AccessTools.Method(typeof(PronounSet), nameof(PronounSet.GetAllGenericPersonalSingular)); + MethodInfo oldMStairMethod = AccessTools.Method(typeof(PronounSet), nameof(PronounSet.GetAllGenericPersonal)); MethodInfo newMethod = AccessTools.Method(typeof(PronounSet), nameof(PronounSet.GetAllPersonal)); - return HarmonyLib.Transpilers.MethodReplacer(instructions, oldMethod, newMethod); + + IEnumerable replacePReef = HarmonyLib.Transpilers.MethodReplacer(instructions, oldPReefMethod, newMethod); + IEnumerable replaceMStair = HarmonyLib.Transpilers.MethodReplacer(replacePReef, oldMStairMethod, newMethod); + + return replaceMStair; } } diff --git a/workshop.json b/workshop.json index 4a55cd7..9dab11b 100644 --- a/workshop.json +++ b/workshop.json @@ -1,7 +1,7 @@ { "WorkshopId": 2815078000, "Title": "Qud: Genders Unleashed", - "Description": "A mod that works in conjunction with the [url=https://steamcommunity.com/sharedfiles/filedetails/?id=1735379738]Gender and Pronoun Sets[/url] mod to allow your delver to wreathe themselves in the gender identity and pronouns they feel most comfortable in.\n\nSpecifically, this mod allows you to pick from all personal genders and pronouns defined in game (including pseudo-plural ones), with a number of additions.\n\nAdditionally, the \"choose pronoun\" prompt in game has been modified to use the modern UI. This will facilitate picking from the extended list this mod provides.\n\n[i]`=name=` pronoun sets:[\i] Starting with version 1.1, `=name=` in a pronoun set will be dynamically replaced with the player character's name (`=name's=` with the possessive version). To demonstrate this, a pronoun set consisting completely of `=name=` and `=name's=` has been added.\n\nTested to work on game version 203.54\n\n[url=https://github.com/librarianmage/QudGendersUnleashed]Github Page[/url]", + "Description": "A mod that works in conjunction with the [url=https://steamcommunity.com/sharedfiles/filedetails/?id=1735379738]Gender and Pronoun Sets[/url] mod to allow your delver to wreathe themselves in the gender identity and pronouns they feel most comfortable in.\n\nSpecifically, this mod allows you to pick from all personal genders and pronouns defined in game (including pseudo-plural ones), with a number of additions.\n\nAdditionally, the \"choose pronoun\" prompt in game has been modified to use the modern UI. This will facilitate picking from the extended list this mod provides.\n\n[i]`=name=` pronoun sets:[/i] Starting with version 1.1, `=name=` in a pronoun set will be dynamically replaced with the player character's name (`=name's=` with the possessive version). To demonstrate this, a pronoun set consisting completely of `=name=` and `=name's=` has been added.\n\nTested to work on game version 203.54 and the Moon Stair alpha.\n\n[url=https://github.com/librarianmage/QudGendersUnleashed]Github Page[/url]", "Tags": "Stable,Beta,Script,Gender,Pronouns", "Visibility": "2", "ImagePath": "icon.png"