Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Record recipe data serialization #47

Merged
merged 5 commits into from
Aug 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="System.Text.Json" Version="7.0.3"/>
<PackageReference Include="System.Text.Json" Version="8.0.4"/>
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\ModiBuff.Units\ModiBuff.Units.csproj"/>
<ProjectReference Include="..\ModiBuff\ModiBuff.csproj"/>
</ItemGroup>

</Project>
</Project>
5 changes: 2 additions & 3 deletions ModiBuff/ModiBuff.Tests/SaveLoadRecipeTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -238,16 +238,15 @@ public void SaveRemoveCallbackUnitRecipeLoad()
{
var saveRecipes = new ModifierRecipes(IdManager, EffectTypeIdManager);
saveRecipes.Add("InitAddDamageRevertibleCallback")
.Tag(ModiBuff.Core.Units.TagType.StrongDispel)
.Dispel(DispelType.Strong)
.Effect(new AddDamageEffect(5, EffectState.IsRevertible), EffectOn.Init)
.Remove(RemoveEffectOn.CallbackUnit)
.CallbackUnit(CallbackUnitType.StrongDispel);

SaveLoadStateAndSetup(saveRecipes);

Unit.AddModifierSelf("InitAddDamageRevertibleCallback");
Assert.AreEqual(UnitDamage + 5, Unit.Damage);
Unit.StrongDispel(Unit);
Unit.Dispel(DispelType.Strong, Unit);
Assert.AreEqual(UnitDamage, Unit.Damage);
}

Expand Down
2 changes: 1 addition & 1 deletion ModiBuff/ModiBuff.Units/ModiBuff.Units.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
<PackageReference Include="System.Text.Json" Version="7.0.3"/>
<PackageReference Include="System.Text.Json" Version="8.0.4"/>
</ItemGroup>

</Project>
Loading
Loading