Skip to content

Commit

Permalink
Linter
Browse files Browse the repository at this point in the history
  • Loading branch information
Vek17 committed Oct 9, 2022
1 parent 5415032 commit 562794a
Show file tree
Hide file tree
Showing 21 changed files with 30 additions and 57 deletions.
3 changes: 1 addition & 2 deletions TabletopTweaks-Core/Bugfixes/General/PropertyFixes.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using HarmonyLib;
using Kingmaker.EntitySystem.Entities;
using Kingmaker.EntitySystem.Entities;
using Kingmaker.UnitLogic;
using Kingmaker.UnitLogic.Mechanics.Properties;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ static class ModifierDescriptorComparer_Compare_Patch {
static SortedDictionary<ModifierDescriptor, int> order;

static bool Prefix(ModifierDescriptorComparer __instance, ModifierDescriptor x, ModifierDescriptor y, ref int __result) {
if (IsTTTDescriptor(x) || IsTTTDescriptor(y)) {
if (IsTTTDescriptor(x) || IsTTTDescriptor(y)) {
if (order == null) {
order = new SortedDictionary<ModifierDescriptor, int>();
int i = 0;
Expand All @@ -132,7 +132,7 @@ static class ModifierDescriptorComparer_Compare_Patch {
}

private static bool IsTTTDescriptor(ModifierDescriptor desc) {
return Enum.IsDefined(typeof(NaturalArmor), (int)desc)
return Enum.IsDefined(typeof(NaturalArmor), (int)desc)
|| Enum.IsDefined(typeof(Dodge), (int)desc)
|| Enum.IsDefined(typeof(Untyped), (int)desc)
|| Enum.IsDefined(typeof(Enhancement), (int)desc);
Expand Down
1 change: 0 additions & 1 deletion TabletopTweaks-Core/MechanicsChanges/MetamagicExtention.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.Web;
using TabletopTweaks.Core.ModLogic;
using TabletopTweaks.Core.NewUnitParts;
using TabletopTweaks.Core.Utilities;
Expand Down
12 changes: 6 additions & 6 deletions TabletopTweaks-Core/NewActions/ContextActionApplyBuffRanks.cs
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
using Kingmaker.Blueprints;
using Kingmaker;
using Kingmaker;
using Kingmaker.Blueprints;
using Kingmaker.Blueprints.JsonSystem;
using Kingmaker.Controllers;
using Kingmaker.ElementsSystem;
using Kingmaker.EntitySystem.Entities;
using Kingmaker.UnitLogic;
using Kingmaker.UnitLogic.Abilities.Components.AreaEffects;
using Kingmaker.UnitLogic.Buffs.Blueprints;
using Kingmaker.UnitLogic.Buffs;
using Kingmaker.UnitLogic.Buffs.Blueprints;
using Kingmaker.UnitLogic.Mechanics;
using Kingmaker.UnitLogic.Mechanics.Actions;
using Kingmaker.Utility;
using System;
using UnityEngine.Serialization;
using UnityEngine;
using Kingmaker.UnitLogic.Mechanics.Actions;
using Kingmaker.UnitLogic;
using UnityEngine.Serialization;

namespace TabletopTweaks.Core.NewActions {
[TypeId("4b0dd1fb0abf4bd9865214ebbba6bb02")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public class ContextActionDisjointEnchantments : ContextAction {
if (base.Target == null) { return; }

Target.Unit.Descriptor.Body.AllSlots

.Where(slot => slot.HasItem)
.Select(slot => slot.Item)
.Append(Target.Unit.Body.PrimaryHand?.MaybeWeapon?.Second)
Expand All @@ -41,7 +41,7 @@ public class ContextActionDisjointEnchantments : ContextAction {
});
}

public BlueprintEquipmentEnchantmentReference m_DisjointEnchantment;
public BlueprintEquipmentEnchantmentReference m_DisjointEnchantment;
public ContextDurationValue Duration;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public class DisjointedEffect : ItemEnchantmentComponentDelegate<ItemEntity, Dis
public override void OnTurnOn() {
if (base.Data.HasDisjointed) {
UpdateDisjoints();
return;
return;
}

base.Owner.Enchantments
Expand Down Expand Up @@ -57,7 +57,7 @@ public class DisjointedEffect : ItemEnchantmentComponentDelegate<ItemEntity, Dis
public class DisjointedEffectData {
public List<EntityFactRef<ItemEnchantment>> Enchantments = new List<EntityFactRef<ItemEnchantment>>();
public bool HasDisjointed = false;
public DisjointedEffectData() {}
public DisjointedEffectData() { }
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
using Kingmaker.PubSubSystem;
using Kingmaker.RuleSystem;
using Kingmaker.RuleSystem.Rules.Damage;
using Kingmaker.UI.ServiceWindow.CharacterScreen;
using Kingmaker.UnitLogic;
using Kingmaker.Utility;
using System.Linq;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
using Kingmaker.RuleSystem;
using Kingmaker.RuleSystem.Rules;
using Kingmaker.RuleSystem.Rules.Damage;
using Kingmaker.UnitLogic;
using Kingmaker.UnitLogic.Mechanics;
using Kingmaker.UnitLogic.Parts;
using Kingmaker.Utility;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,11 @@
using Kingmaker.Blueprints.JsonSystem;
using Kingmaker.Blueprints;
using Kingmaker.Enums;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Kingmaker.Blueprints;
using Kingmaker.Blueprints.JsonSystem;
using Kingmaker.ElementsSystem;
using Kingmaker.EntitySystem;
using Kingmaker.Enums;
using Kingmaker.PubSubSystem;
using Kingmaker.RuleSystem.Rules;
using Kingmaker.RuleSystem.Rules.Damage;
using Kingmaker.RuleSystem;
using Kingmaker.UnitLogic.Mechanics;
using Kingmaker.ElementsSystem;

namespace TabletopTweaks.Core.NewComponents {
[AllowMultipleComponents]
Expand All @@ -22,7 +15,7 @@ public class AddConditionalWeaponDamageBonus : EntityFactComponentDelegate,
IRulebookHandler<RuleCalculateWeaponStats>,
ISubscriber, IInitiatorRulebookSubscriber {



public void OnEventAboutToTrigger(RuleCalculateWeaponStats evt) {
RuleAttackWithWeapon attackWithWeapon = evt.AttackWithWeapon;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,8 @@
using Kingmaker.RuleSystem.Rules;
using Kingmaker.RuleSystem.Rules.Damage;
using Kingmaker.UnitLogic;
using Kingmaker.UnitLogic.Abilities.Components;
using System;
using TabletopTweaks.Core.NewUnitParts;
using TabletopTweaks.Core.Utilities;
using static Kingmaker.Blueprints.Area.FactHolder;
using static LayoutRedirectElement;

namespace TabletopTweaks.Core.NewComponents {
[TypeId("03f55b5c7cb0445ab32ce2c8d44704ec")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
using Kingmaker.RuleSystem.Rules.Damage;
using Kingmaker.UnitLogic;
using Kingmaker.UnitLogic.Mechanics;
using System;

namespace TabletopTweaks.Core.NewComponents {
[AllowedOn(typeof(BlueprintUnitFact))]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
namespace TabletopTweaks.Core.NewComponents.OwlcatReplacements {
[AllowedOn(typeof(BlueprintBuff), false)]
[TypeId("2a55c3471cbf44409a6193a7a8b8655f")]
public class AttackBonusAgainstTargetTTT : UnitBuffComponentDelegate,
ITargetRulebookHandler<RuleCalculateAttackBonus>,
IRulebookHandler<RuleCalculateAttackBonus>,
public class AttackBonusAgainstTargetTTT : UnitBuffComponentDelegate,
ITargetRulebookHandler<RuleCalculateAttackBonus>,
IRulebookHandler<RuleCalculateAttackBonus>,
ISubscriber, ITargetRulebookSubscriber {

public void OnEventAboutToTrigger(RuleCalculateAttackBonus evt) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using Kingmaker.Blueprints;
using Kingmaker.Blueprints.Classes;
using Kingmaker.Blueprints.Classes.Prerequisites;
using Kingmaker.Blueprints.Classes.Selection;
using Kingmaker.Blueprints.JsonSystem;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public class CompositePropertyGetter : PropertyValueGetter {
case Mode.Lowest:
return Properties.Select(property => property.Calculate(unit)).Min();
case Mode.Multiply:
return Properties.Select(property => property.Calculate(unit)).Aggregate(1, (int a , int b) => a * b);
return Properties.Select(property => property.Calculate(unit)).Aggregate(1, (int a, int b) => a * b);
default:
return 0;
}
Expand Down
4 changes: 0 additions & 4 deletions TabletopTweaks-Core/NewEvents/IDemoralizeHandler.cs
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
using HarmonyLib;
using Kingmaker.Controllers.Dialog;
using Kingmaker.Designers;
using Kingmaker.PubSubSystem;
using Kingmaker.RuleSystem.Rules;
using Kingmaker.UnitLogic.Buffs;
using Kingmaker.UnitLogic.Mechanics;
using Kingmaker.UnitLogic.Mechanics.Actions;
using Kingmaker.Utility;
using System;
using System.Collections.Generic;
using System.Reflection;
Expand Down
4 changes: 2 additions & 2 deletions TabletopTweaks-Core/NewRules/RuleAttackWithWeaponPrecision.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
using Kingmaker.RuleSystem;
using Kingmaker.RuleSystem.Rules;
using Kingmaker.RuleSystem.Rules.Damage;
using Kingmaker.UI.Models.Log.Events;
using Kingmaker.UI.Models.Log;
using TabletopTweaks.Core.Utilities;
using Kingmaker.UI.Models.Log.Events;
using System;
using TabletopTweaks.Core.Utilities;

namespace TabletopTweaks.Core.NewRules {
class RuleAttackWithWeaponPrecision : RuleAttackWithWeapon {
Expand Down
6 changes: 1 addition & 5 deletions TabletopTweaks-Core/NewRules/RuleFortificationCheck.cs
Original file line number Diff line number Diff line change
@@ -1,20 +1,16 @@
using HarmonyLib;
using JetBrains.Annotations;
using Kingmaker.EntitySystem.Stats;
using Kingmaker.Enums;
using Kingmaker.RuleSystem;
using Kingmaker.RuleSystem.Rules;
using Kingmaker.UI.Models.Log.Events;
using Kingmaker.UI.Models.Log;
using Kingmaker.UI.Models.Log.Events;
using Kingmaker.UnitLogic.Parts;
using Kingmaker.Utility;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Reflection.Emit;
using TabletopTweaks.Core.Utilities;
using static TabletopTweaks.Core.MechanicsChanges.AdditionalModifierDescriptors;

namespace TabletopTweaks.Core.NewRules {
public class RuleFortificationCheck : RulebookTargetEvent {
Expand Down
1 change: 0 additions & 1 deletion TabletopTweaks-Core/Utilities/BloodlineTools.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text.RegularExpressions;
using TabletopTweaks.Core.ModLogic;
using TabletopTweaks.Core.NewComponents;

Expand Down
4 changes: 2 additions & 2 deletions TabletopTweaks-Core/Utilities/FeatTools.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public static class FeatTools {
Selections.SylvanTricksterTalentSelection,
Selections.SlayerTalentSelection10,
Selections.SlayerTalentSelection6,
Selections.SlayerTalentSelection2,
Selections.SlayerTalentSelection2,
Selections.RogueTalentSelection,
Selections.LoremasterRogueTalentSelection
};
Expand Down Expand Up @@ -593,7 +593,7 @@ public static class Selections {
public static BlueprintFeatureSelection ZenArcherPointBlankMasterSelection => BlueprintTools.GetBlueprint<BlueprintFeatureSelection>("50e6aa55653bc014aafe556aad79e5c0");
public static BlueprintFeatureSelection ZenArcherWayOfTheBowSelection => BlueprintTools.GetBlueprint<BlueprintFeatureSelection>("53420038fdc76944695bf927f7bcd51c");



public static void AddModFeatureSelection(BlueprintFeatureSelection selection) {
FeatureSelectionSet.Add(selection);
Expand Down
5 changes: 2 additions & 3 deletions TabletopTweaks-Core/Utilities/ItemTools.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
using Kingmaker.UnitLogic.Buffs.Blueprints;
using System;
using System.Collections.Generic;
using System.Web;
using TabletopTweaks.Core.MechanicsChanges;
using TabletopTweaks.Core.ModLogic;
using UnityEngine;
Expand Down Expand Up @@ -354,7 +353,7 @@ public enum PotionColor : int {
bp.m_InventoryTakeSound = "ScrollTake";
bp.TrashLootTypes = new TrashLootType[] { TrashLootType.Scrolls_RE };
bp.m_Overrides = new List<string>();
bp.AddComponent<CopyScroll>(c => {
bp.AddComponent<CopyScroll>(c => {
c.m_CustomSpell = spell.ToReference<BlueprintAbilityReference>();
});
});
Expand Down Expand Up @@ -430,7 +429,7 @@ public enum PotionColor : int {
}
private static Sprite GetPotionIcon(PotionColor color, int spellLevel) {
return color switch {
PotionColor.Blue => spellLevel switch {
PotionColor.Blue => spellLevel switch {
1 => Form01_Blue_Simple,
2 => Form03_Blue_Simple,
3 => Form04_Blue_Simple,
Expand Down
2 changes: 1 addition & 1 deletion TabletopTweaks-Core/Utilities/VenderTools.cs
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ public static class VenderTools {
});
}

public static LootItem CreateLootItem([NotNull]BlueprintItem item) {
public static LootItem CreateLootItem([NotNull] BlueprintItem item) {
return new LootItem() {
m_Item = item.ToReference<BlueprintItemReference>(),
m_Loot = new BlueprintUnitLootReference()
Expand Down

0 comments on commit 562794a

Please sign in to comment.