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

@@ -46,7 +46,7 @@ namespace Content.Server.GameObjects.Components
{
foreach (var threshold in destructible.Thresholds)
{
if (threshold.Trigger is not TotalDamageTrigger trigger)
if (threshold.Trigger is not DamageTrigger trigger)
{
continue;
}
@@ -65,12 +65,12 @@ namespace Content.Server.GameObjects.Components
}
var damage = damageable.TotalDamage;
TotalDamageTrigger? trigger = null;
DamageTrigger? trigger = null;
// TODO: Pretend this does not exist until https://github.com/space-wizards/space-station-14/pull/2783 is merged
foreach (var threshold in destructible.Thresholds)
{
if ((trigger = threshold.Trigger as TotalDamageTrigger) != null)
if ((trigger = threshold.Trigger as DamageTrigger) != null)
{
break;
}