Skip to content

Commit

Permalink
Nuked notable gender-setting code
Browse files Browse the repository at this point in the history
With the introduction of unique notables, this code doesn't seem like a good idea anymore. You are free to change their gender and name via another mod.
  • Loading branch information
Designer225 committed Mar 2, 2023
1 parent 56c844b commit 23b12c0
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 10 deletions.
9 changes: 0 additions & 9 deletions FixedBanditSpawning/LocationCharacterConstructorPatch.cs
Original file line number Diff line number Diff line change
Expand Up @@ -153,15 +153,6 @@ public static bool Prepare()

public static void Postfix(ref Hero __result)
{
//var faction = __result.MapFaction;
// It appears that gang leaders, merchants, and preachers have some female representation. Will skip them in that case.
if ((__result.IsArtisan || __result.IsRuralNotable || __result.IsHeadman) && !__result.IsFemale)
{
__result.UpdatePlayerGender(MBRandom.RandomFloat < D225MiscFixesSettingsUtil.Instance.WorkerGenderRatio);
NameGenerator.Current.GenerateHeroNameAndHeroFullName(__result, out var firstName, out var fullName, false);
__result.SetName(fullName, firstName);
}

AgeModel ageModel = Campaign.Current.Models.AgeModel;
int baseAge = Math.Max(ageModel.HeroComesOfAge, LocationCharacterConstructorPatch.TweenAge);
if (__result.IsNotable)
Expand Down
2 changes: 1 addition & 1 deletion SubModule.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Module>
<Name value="Designer225's Miscellaneous Fixes"/>
<Id value="FixedBanditSpawning"/>
<Version value="v1.1.16.82"/>
<Version value="v1.1.17.90"/>
<SingleplayerModule value="true"/>
<MultiplayerModule value="false"/>
<Official value="false"/>
Expand Down

0 comments on commit 23b12c0

Please sign in to comment.