Skip to content

Commit b88aad0

Browse files
Cleanup
1 parent 109ef3e commit b88aad0

File tree

74 files changed

+235
-356
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+235
-356
lines changed

InscryptionAPI/Ascension/AscensionChallengePaginator.cs

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
1-
using BepInEx;
21
using DiskCardGame;
32
using InscryptionAPI.Helpers;
43
using InscryptionAPI.Helpers.Extensions;
5-
using System;
6-
using System.Linq;
74
using System.Reflection;
8-
using System.Runtime.CompilerServices;
95
using System.Text;
106
using UnityEngine;
117

@@ -21,7 +17,7 @@ public void Initialize(AscensionChallengeScreen screen, AscensionMenuScreenTrans
2117
{
2218
//List<GameObject> firstPageObjs = new();
2319
List<AscensionIconInteractable> icons;
24-
20+
2521
// if the screen object exists, use its list of icons; otherwise use the screenInteractables from the transition object
2622
if (screen != null)
2723
{
@@ -166,7 +162,7 @@ private GameObject CreateIconGameObject(GameObject objectRef, int index, Ascensi
166162
screen?.icons.Add(chall);
167163
if (info != null)
168164
chall.challengeInfo = info;
169-
165+
170166
return newIcon;
171167
}
172168
public void OnEnable()
@@ -180,7 +176,7 @@ public void OnEnable()
180176

181177
ChallengeManager.SyncChallengeList();
182178
Initialize(GetComponent<AscensionChallengeScreen>(), GetComponent<AscensionMenuScreenTransition>());
183-
179+
184180
if (leftArrow)
185181
{
186182
Destroy(leftArrow.gameObject);
@@ -202,7 +198,7 @@ public void OnEnable()
202198
if (screen != null)
203199
{
204200
screen.icons?.RemoveAll(x => x == null);
205-
201+
206202
icons = screen.icons;
207203
pageLength = screen.icons.Count;
208204
}
@@ -287,7 +283,7 @@ public void OnEnable()
287283

288284
challengeObjectsForPages.ForEach(x => x.RemoveAll(x => x == null));
289285
LoadPage(pageIndex = 0);
290-
286+
291287
if (pagesToAdd.Count == 0)
292288
return;
293289

InscryptionAPI/Ascension/AscensionChallengePaginatorSetupifier.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
using DiskCardGame;
2-
using UnityEngine;
32

43
namespace InscryptionAPI.Ascension;
54

InscryptionAPI/Ascension/AscensionChallengeScreen.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ public static bool UpdateFooterText(AscensionChallengeScreen __instance, Ascensi
100100
{
101101
string arg = Localization.ToUpper(Localization.Translate(challengeInfo.title));
102102
string text = string.Format(Localization.Translate(activated ? "{0} ENABLED" : "{0} DISABLED"), arg);
103-
103+
104104
string text2;
105105
if (activated)
106106
text2 = string.Format(Localization.Translate("{0} Challenge Points Subtracted"), (-challengeInfo.pointValue).ToString());

InscryptionAPI/Ascension/ChallengeDisplayerPlus.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ public void DisplayChallenge(AscensionChallengeInfo challengeInfo, bool immediat
128128
actualStrings = dependencyStrings.ConvertAll(x =>
129129
!AscensionSaveData.Data.activeChallenges.Contains(x.challenge) ? $"[c:R]{x.FullText}[c:]" :
130130
AscensionSaveData.Data.activeChallenges.Count(x2 => x2 == x.challenge) < x.number ? x.RedPrefixText : x.FullText);
131-
131+
132132
dependency = "Depends on: " + string.Join(", ", actualStrings);
133133
}
134134
}
@@ -141,7 +141,7 @@ public void DisplayChallenge(AscensionChallengeInfo challengeInfo, bool immediat
141141
AscensionChallengeInfo info = d.GetInfo();
142142
if (info != null && !challenges.Contains(d))
143143
{
144-
string prefix = AscensionSaveData.Data.activeChallenges.Contains(d) ? $"[c:R]{Localization.Translate(info.title)}[c:]" : Localization.Translate(info.title);
144+
string prefix = AscensionSaveData.Data.activeChallenges.Contains(d) ? $"[c:R]{Localization.Translate(info.title)}[c:]" : Localization.Translate(info.title);
145145
incompatibilityStrings.Add(prefix);
146146
challenges.Add(d);
147147
}

InscryptionAPI/Ascension/ChallengeManager.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public class FullChallenge
4040
/// A function that needs to return true for the challenge to be unlocked. Optional. If this isn't set, this check will be bypassed. The int argument is the current Kaycee's Mod challenge level.
4141
/// </summary>
4242
public Func<int, bool> CustomUnlockCheck { get; set; }
43-
43+
4444
/// <summary>
4545
/// If true, this challenge's icon(s) will occupy the entire column like the Final Boss challenge icon, and be ordered to the right of regular challenges.
4646
/// </summary>

InscryptionAPI/Card/AbilityManager.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public class FullAbility
3636
/// The unique ID for this ability
3737
/// </summary>
3838
public readonly Ability Id;
39-
39+
4040
/// <summary>
4141
/// The guid of the mod that added this ability
4242
/// </summary>
@@ -74,7 +74,7 @@ public class FullAbility
7474
/// Tuple.Item3 (string): the id that the API will match against to find the redirect page. Eg, for ability redirects this will be the Ability id as a string.
7575
/// </summary>
7676
public Dictionary<string, RuleBookManager.RedirectInfo> RulebookDescriptionRedirects = new();
77-
77+
7878
internal static ConditionalWeakTable<AbilityInfo, FullAbility> ReverseMapper = new();
7979

8080
/// <summary>
@@ -265,7 +265,7 @@ private static List<FullAbility> GenBaseGameAbilityList()
265265
baseGame.Add(ab);
266266
continue;
267267
}
268-
baseGame.Add(new FullAbility (
268+
baseGame.Add(new FullAbility(
269269
null,
270270
ability.ability,
271271
ability,
@@ -276,7 +276,7 @@ private static List<FullAbility> GenBaseGameAbilityList()
276276

277277
return baseGame;
278278
}
279-
279+
280280
/// <summary>
281281
/// Creates a new ability and registers it to be able to be added to cards
282282
/// </summary>

InscryptionAPI/Card/BasePart2Modular.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
11
using DiskCardGame;
2-
using System;
3-
using System.Collections.Generic;
4-
using System.Text;
52

63
namespace InscryptionAPI.Card;
74
internal class Part2ModularAbilities

InscryptionAPI/Card/CardExtensions.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
using DiskCardGame;
22
using InscryptionAPI.Helpers;
3-
using InscryptionAPI.Nodes;
4-
using Sirenix.Utilities;
5-
using System.Collections;
63
using UnityEngine;
74

85
namespace InscryptionAPI.Card;
@@ -343,7 +340,7 @@ public static CardInfo RemoveTraits(this CardInfo info, params Trait[] traits)
343340
}
344341
return info;
345342
}
346-
343+
347344
/// <summary>
348345
/// Removes any number of traits from the card.
349346
/// </summary>

InscryptionAPI/Card/CardExtensionsHelpers.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -818,7 +818,7 @@ public static DamageShieldBehaviour GetShieldBehaviour(this PlayableCard card, A
818818
Type type = ShieldManager.AllShieldAbilities.AbilityByID(ability)?.AbilityBehavior;
819819
if (type == null)
820820
return null;
821-
821+
822822
return card.GetComponent(type) as DamageShieldBehaviour;
823823
}
824824
/// <summary>

InscryptionAPI/Card/CardManager.cs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
using HarmonyLib;
44
using InscryptionAPI.Guid;
55
using InscryptionAPI.Helpers;
6-
using InscryptionAPI.PixelCard;
76
using InscryptionAPI.Saves;
87
using MonoMod.Cil;
98
using System.Collections.ObjectModel;
@@ -22,7 +21,7 @@ private class CardExt // Needs to be defined first so the implicit static constr
2221
public readonly Dictionary<Type, object> TypeMap = new();
2322
public readonly Dictionary<string, string> StringMap = new();
2423
}
25-
public class CardAltPortraits
24+
public class CardAltPortraits
2625
{
2726
public Sprite PixelAlternatePortrait = null;
2827
public Sprite SteelTrapPortrait = null;
@@ -86,7 +85,7 @@ public static void SyncCardList()
8685
card.evolveParams.evolution.Mods = mods;
8786
}
8887

89-
if (card.iceCubeParams != null && card.iceCubeParams.creatureWithin != null)
88+
if (card.iceCubeParams != null && card.iceCubeParams.creatureWithin != null)
9089
{
9190
List<CardModificationInfo> mods = card.iceCubeParams.creatureWithin.Mods;
9291
card.iceCubeParams.creatureWithin = cards.CardByName(card.iceCubeParams.creatureWithin.name).Clone() as CardInfo;
@@ -295,7 +294,7 @@ public static CardInfo New(string modPrefix, string name, string displayName, in
295294

296295
public static Dictionary<string, string> GetCardExtensionTable(this CardInfo card) => CardExtensionProperties.GetOrCreateValue(card).StringMap;
297296
internal static CardAltPortraits GetAltPortraits(this CardInfo card) => CardAlternatePortraits.GetOrCreateValue(card);
298-
297+
299298
public static Sprite PixelAlternatePortrait(this CardInfo card)
300299
{
301300
return card.GetAltPortraits().PixelAlternatePortrait;

0 commit comments

Comments
 (0)