Skip to content
This repository has been archived by the owner on Oct 4, 2022. It is now read-only.

Commit

Permalink
1.2 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
kreaddy committed Mar 4, 2022
1 parent 9b1f216 commit 64c9491
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 12 deletions.
2 changes: 1 addition & 1 deletion Content/Feats/AcadamaeGraduate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down
4 changes: 2 additions & 2 deletions Info.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"],
Expand Down
18 changes: 14 additions & 4 deletions MagicTime.csproj
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="packages\AssemblyPublicizer.1.0.1\build\AssemblyPublicizer.props" Condition="Exists('packages\AssemblyPublicizer.1.0.1\build\AssemblyPublicizer.props')" />
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
Expand Down Expand Up @@ -42,15 +43,16 @@
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
</PropertyGroup>
<ItemGroup>
<Reference Include="0Harmony, Version=2.1.1.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>packages\Lib.Harmony.2.1.1\lib\net472\0Harmony.dll</HintPath>
<EmbedInteropTypes>False</EmbedInteropTypes>
<Private>False</Private>
<Reference Include="0Harmony, Version=2.2.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>packages\Lib.Harmony.2.2.0\lib\net472\0Harmony.dll</HintPath>
</Reference>
<Reference Include="Assembly-CSharp_public">
<HintPath>C:\Users\OWP\Documents\StarionThings\lib\Assembly-CSharp_public.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="AssemblyPublicizer, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>packages\AssemblyPublicizer.1.0.1\lib\net472\AssemblyPublicizer.dll</HintPath>
</Reference>
<Reference Include="ModKit, Version=1.0.8.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>packages\ModKit.1.0.8\lib\net472\ModKit.dll</HintPath>
<EmbedInteropTypes>False</EmbedInteropTypes>
Expand Down Expand Up @@ -197,5 +199,13 @@
<ErrorText>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}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('packages\Microsoft.VisualStudio.SDK.EmbedInteropTypes.15.0.36\build\Microsoft.VisualStudio.SDK.EmbedInteropTypes.targets')" Text="$([System.String]::Format('$(ErrorText)', 'packages\Microsoft.VisualStudio.SDK.EmbedInteropTypes.15.0.36\build\Microsoft.VisualStudio.SDK.EmbedInteropTypes.targets'))" />
<Error Condition="!Exists('packages\AssemblyPublicizer.1.0.1\build\AssemblyPublicizer.props')" Text="$([System.String]::Format('$(ErrorText)', 'packages\AssemblyPublicizer.1.0.1\build\AssemblyPublicizer.props'))" />
</Target>
<Target Name="Publicize" AfterTargets="Clean">
<ItemGroup>
<!-- Use $(KingmakerPath)\Kingmaker_Data\Managed\Assembly-CSharp.dll for Kingmaker -->
<Assemblies Include="$(WrathPath)\Wrath_Data\Managed\Assembly-CSharp.dll" />
</ItemGroup>
<PublicizeTask InputAssemblies="@(Assemblies)" OutputDir="$(SolutionDir)lib/" />
</Target>
</Project>
8 changes: 4 additions & 4 deletions Utilities/Helpers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion packages.config
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Lib.Harmony" version="2.1.1" targetFramework="net472" />
<package id="AssemblyPublicizer" version="1.0.1" targetFramework="net472" developmentDependency="true" />
<package id="Lib.Harmony" version="2.2.0" targetFramework="net472" />
<package id="Microsoft.VisualStudio.SDK.EmbedInteropTypes" version="15.0.36" targetFramework="net472" />
<package id="ModKit" version="1.0.8" targetFramework="net472" />
<package id="Newtonsoft.Json" version="13.0.1" targetFramework="net472" />
Expand Down

0 comments on commit 64c9491

Please sign in to comment.