From 64c9491c637e935316d846b3f68d8db284afce1b Mon Sep 17 00:00:00 2001 From: Starion Date: Fri, 4 Mar 2022 16:40:59 +0100 Subject: [PATCH] 1.2 compatibility --- Content/Feats/AcadamaeGraduate.cs | 2 +- Info.json | 4 ++-- MagicTime.csproj | 18 ++++++++++++++---- Utilities/Helpers.cs | 8 ++++---- packages.config | 3 ++- 5 files changed, 23 insertions(+), 12 deletions(-) diff --git a/Content/Feats/AcadamaeGraduate.cs b/Content/Feats/AcadamaeGraduate.cs index 7b08d0c..bce722f 100644 --- a/Content/Feats/AcadamaeGraduate.cs +++ b/Content/Feats/AcadamaeGraduate.cs @@ -61,7 +61,7 @@ public void OnEventDidTrigger(RuleCastSpell evt) if (evt.Spell != null && !evt.Spell.IsSpontaneous && evt.Success && evt.Context.SpellSchool == SpellSchool.Conjuration && evt.Context.SpellDescriptor.HasFlag(SpellDescriptor.Summoning)) { - var result = GameHelper.CheckSkillResult(evt.Initiator, StatType.SaveFortitude, 15 + evt.Spell.SpellLevel); + var result = GameHelper.CheckStatResult(evt.Initiator, StatType.SaveFortitude, 15 + evt.Spell.SpellLevel); if (!result) { evt.Initiator.AddBuff(DB.GetBuff("Fatigued Buff"), evt.Initiator, System.TimeSpan.FromMinutes(1)); diff --git a/Info.json b/Info.json index 815517b..ac35ead 100644 --- a/Info.json +++ b/Info.json @@ -2,9 +2,9 @@ "Id": "MagicTime", "DisplayName": "Magic Time!", "Author": "Starion (aka kreaddy)", - "Version": "1.3.9", + "Version": "1.4.0", "ManagerVersion": "0.23.0", - "GameVersion": "1.1.6", + "GameVersion": "1.2.0", "Requirements": [], "AssemblyName": "MagicTime.dll", "LoadAfter": ["Worldcrawl", "TabletopTweaks"], diff --git a/MagicTime.csproj b/MagicTime.csproj index df8378d..41dc40b 100644 --- a/MagicTime.csproj +++ b/MagicTime.csproj @@ -1,5 +1,6 @@  + Debug @@ -42,15 +43,16 @@ true - - packages\Lib.Harmony.2.1.1\lib\net472\0Harmony.dll - False - False + + packages\Lib.Harmony.2.2.0\lib\net472\0Harmony.dll C:\Users\OWP\Documents\StarionThings\lib\Assembly-CSharp_public.dll False + + packages\AssemblyPublicizer.1.0.1\lib\net472\AssemblyPublicizer.dll + packages\ModKit.1.0.8\lib\net472\ModKit.dll False @@ -197,5 +199,13 @@ Ce projet fait référence à des packages NuGet qui sont manquants sur cet ordinateur. Utilisez l'option de restauration des packages NuGet pour les télécharger. Pour plus d'informations, consultez http://go.microsoft.com/fwlink/?LinkID=322105. Le fichier manquant est : {0}. + + + + + + + + \ No newline at end of file diff --git a/Utilities/Helpers.cs b/Utilities/Helpers.cs index f02fc01..4817151 100644 --- a/Utilities/Helpers.cs +++ b/Utilities/Helpers.cs @@ -490,15 +490,15 @@ public static LocalizedString CreateString(string key, string value) { return localized; } - var strings = LocalizationManager.CurrentPack.Strings; - string oldValue; - if (strings.TryGetValue(key, out oldValue) && value != oldValue) + var strings = LocalizationManager.CurrentPack.m_Strings; + LocalizationPack.StringEntry oldValue; + if (strings.TryGetValue(key, out oldValue) && value != oldValue.Text) { #if DEBUG Main.Log($"Info: duplicate localized string `{key}`, different text."); #endif } - strings[key] = value; + strings[key] = new LocalizationPack.StringEntry() { Text = value }; localized = new LocalizedString { m_Key = key diff --git a/packages.config b/packages.config index 44cf86e..cbd6322 100644 --- a/packages.config +++ b/packages.config @@ -1,6 +1,7 @@  - + +