Add composite destructible thresholds (#3102)

* Add composite destructible thresholds

* Reorder yaml properties

* Update YAML

* Fix YAML

* Re-fix YAML

* Add missing nullable enable

* Go back window component is explosive

* rider
This commit is contained in:
DrSmugleaf
2021-02-09 12:57:21 +01:00
committed by GitHub
parent 205c787773
commit 15f05b565a
58 changed files with 284 additions and 188 deletions

View File

@@ -12,11 +12,12 @@ using static Content.IntegrationTests.Tests.Destructible.DestructibleTestPrototy
namespace Content.IntegrationTests.Tests.Destructible
{
[TestFixture]
[TestOf(typeof(TotalDamageClassesTrigger))]
[TestOf(typeof(DamageClassTrigger))]
[TestOf(typeof(AndTrigger))]
public class DestructibleDamageClassTest : ContentIntegrationTest
{
[Test]
public async Task Test()
public async Task AndTest()
{
var server = StartServerDummyTicker(new ServerContentIntegrationOption
{
@@ -82,7 +83,12 @@ namespace Content.IntegrationTests.Tests.Destructible
Assert.That(threshold.Behaviors, Is.Empty);
Assert.NotNull(threshold.Trigger);
Assert.That(threshold.Triggered, Is.True);
Assert.IsInstanceOf<TotalDamageClassesTrigger>(threshold.Trigger);
Assert.IsInstanceOf<AndTrigger>(threshold.Trigger);
var trigger = (AndTrigger) threshold.Trigger;
Assert.IsInstanceOf<DamageClassTrigger>(trigger.Triggers[0]);
Assert.IsInstanceOf<DamageClassTrigger>(trigger.Triggers[1]);
sThresholdListenerComponent.ThresholdsReached.Clear();
@@ -139,7 +145,12 @@ namespace Content.IntegrationTests.Tests.Destructible
Assert.That(threshold.Behaviors, Is.Empty);
Assert.NotNull(threshold.Trigger);
Assert.That(threshold.Triggered, Is.True);
Assert.IsInstanceOf<TotalDamageClassesTrigger>(threshold.Trigger);
Assert.IsInstanceOf<AndTrigger>(threshold.Trigger);
trigger = (AndTrigger) threshold.Trigger;
Assert.IsInstanceOf<DamageClassTrigger>(trigger.Triggers[0]);
Assert.IsInstanceOf<DamageClassTrigger>(trigger.Triggers[1]);
sThresholdListenerComponent.ThresholdsReached.Clear();