Skip to content

Commit

Permalink
Updated for release
Browse files Browse the repository at this point in the history
  • Loading branch information
Vek17 committed Nov 9, 2021
1 parent 91cbd26 commit aaaa5e2
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 8 deletions.
5 changes: 3 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
## Version 1.9.7
## Version 1.10.0
* Added homebrew flags in the settings
* Fixed minor issues with AddFacts
* Added Quick Draw
* Celestial Bloodline now works correctly with Metamagic Rager
* Adjusted Magical Tail Feats @Balkoth
* Kitsune polymorph is now correctly considered a polymorph
* Kitsune polymorph is now correctly considered a polymorph @Balkoth
* Updated string handling to support general localization (will need help from speakers to do actual localization work)
* Shadow Enchantment should now work correctly
* Added support for dynamic item naming

## Version 1.9.6b
* Aspect of Omox DR now stacks globaly
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ All fixes and added content are configurable and can be disabled by editing the
Stalwart
Improved Stalwart
Celestial Servant
Quick Draw

Adds the following rogue talents:
Graceful Athlete
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,15 @@
using Kingmaker.Utility;
using System.Collections.Generic;
using System.Linq;
using TabletopTweaks.Config;
using TabletopTweaks.Extensions;

namespace TabletopTweaks.Bugfixes.General {
static class ItemEntityPatches {
static class DynamicItemNames {
[HarmonyPatch(typeof(ItemEntity), nameof(ItemEntity.Name), MethodType.Getter)]
static class ItemEntity_Names_Patch {
static bool Prefix(ItemEntity __instance, ref string __result) {
if (ModSettings.Fixes.BaseFixes.IsDisabled("DynamicItemNaming")) { return true; }
if (!__instance.IsIdentified) { return true; }
string UniqueName = __instance.Blueprint.m_DisplayNameText;
string DefaultName = "";
Expand All @@ -39,11 +41,12 @@ static bool Prefix(ItemEntity __instance, ref string __result) {
}
}
private static string GetEnchantmentPrefixes(this IEnumerable<ItemEnchantment> enchants) {
var includeTemporary = ModSettings.Fixes.BaseFixes.IsEnabled("DynamicItemNamingTemporary");
if (enchants == null || enchants.Empty()) {
return "";
}
string text = "";
foreach (BlueprintItemEnchantment blueprintEnchantment in enchants.Where(e => !e.IsTemporary).Select(e => e.Blueprint)) {
foreach (BlueprintItemEnchantment blueprintEnchantment in enchants.Where(e => includeTemporary ? true : !e.IsTemporary).Select(e => e.Blueprint)) {
if (!blueprintEnchantment.Prefix.IsNullOrEmpty()) {
text += blueprintEnchantment.Prefix + " ";
}
Expand All @@ -60,11 +63,12 @@ private static string GetCustomEnchantmentPrefixes(this ItemEntity item) {
.GetEnchantmentPrefixes();
}
private static string GetEnchantmentSuffixes(this IEnumerable<ItemEnchantment> enchants) {
var includeTemporary = ModSettings.Fixes.BaseFixes.IsEnabled("DynamicItemNamingTemporary");
if (enchants == null || enchants.Empty()) {
return "";
}
string text = "";
foreach (BlueprintItemEnchantment blueprintEnchantment in enchants.Where(e => !e.IsTemporary).Select(e => e.Blueprint)) {
foreach (BlueprintItemEnchantment blueprintEnchantment in enchants.Where(e => includeTemporary ? true : !e.IsTemporary).Select(e => e.Blueprint)) {
if (!blueprintEnchantment.Suffix.IsNullOrEmpty()) {
text += " " + blueprintEnchantment.Suffix;
}
Expand Down Expand Up @@ -115,6 +119,7 @@ static class BlueprintsCache_Init_Patch {
static void Postfix() {
if (Initialized) return;
Initialized = true;
if (ModSettings.Fixes.BaseFixes.IsDisabled("DynamicItemNaming")) { return; }
Main.LogHeader("Patching Enchant Prefixes/Suffixes");

PatchWeaponEnchants();
Expand Down
8 changes: 8 additions & 0 deletions TabletopTweaks/Config/Fixes.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,14 @@
"Enabled": true,
"Description": "Prevents most forms of damage reduction from stacking unless specifically specified"
},
"DynamicItemNaming": {
"Enabled": true,
"Description": "Allows Weapon/Armor names to be modified by any additional enchants they gain outside of thier base enchants."
},
"DynamicItemNamingTemporary": {
"Enabled": true,
"Description": "Displays the names of temporary enchants as part of the equipment."
},
"FeatSelections": {
"Enabled": true,
"Description": "Cleans up limited feat selections (like fighter combat feats) to include all feats of the specified type."
Expand Down
4 changes: 2 additions & 2 deletions TabletopTweaks/Info.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
"Author": "Sean Petrie",
"DisplayName": "Tabletop Tweaks",
"EntryMethod": "TabletopTweaks.Main.Load",
"GameVersion": "1.1.0",
"GameVersion": "1.1.1",
"HomePage": "https://github.com/Vek17/WrathMods-TabletopTweaks/releases",
"Id": "TabletopTweaks",
"ManagerVersion": "0.23.0",
"Repository": "https://raw.githubusercontent.com/Vek17/WrathMods-TabletopTweaks/master/Repository.json",
"Requirements": [],
"Version": "1.9.7"
"Version": "1.10.0"
}
2 changes: 1 addition & 1 deletion TabletopTweaks/TabletopTweaks.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@
<Compile Include="Bugfixes\General\AddFactsFix.cs" />
<Compile Include="Bugfixes\General\ContextRankConfigFix.cs" />
<Compile Include="Bugfixes\General\FeatSelections.cs" />
<Compile Include="Bugfixes\General\ItemEntityPatches.cs" />
<Compile Include="Bugfixes\General\DynamicItemNames.cs" />
<Compile Include="Bugfixes\General\ProfaneGift.cs" />
<Compile Include="Bugfixes\General\ShadowMagicFix.cs" />
<Compile Include="Bugfixes\General\SizeModifiers.cs" />
Expand Down

0 comments on commit aaaa5e2

Please sign in to comment.