Create Generic DamageOnInteract/Attacked Comps/Systems (#30244)

* Everything but the submodule

* stuff I forgot

* heat

* missed lights

* behonky

* LocId

* I guess it was a skill issue?

* predicted audio

* It works with lights now

* Borg equality

* Gorilla gauntlet grants protection from anomaly returned damage when attacking it

* woops, there we go

* NONE

* Use DamageModifierSets, remove Behonker damage

* Reviews dealt with

---------

Co-authored-by: plykiya <plykiya@protonmail.com>
This commit is contained in:
Plykiya
2024-08-08 22:32:41 -07:00
committed by GitHub
parent 8a4ef69e86
commit b266c9b545
25 changed files with 507 additions and 185 deletions

View File

@@ -30,7 +30,7 @@ public partial class InventorySystem : EntitySystem
/// <summary>
/// Tries to find an entity in the specified slot with the specified component.
/// </summary>
public bool TryGetInventoryEntity<T>(Entity<InventoryComponent?> entity, out EntityUid targetUid)
public bool TryGetInventoryEntity<T>(Entity<InventoryComponent?> entity, out Entity<T?> target)
where T : IComponent, IClothingSlots
{
if (TryGetContainerSlotEnumerator(entity.Owner, out var containerSlotEnumerator))
@@ -43,12 +43,12 @@ public partial class InventorySystem : EntitySystem
if ((((IClothingSlots) required).Slots & slot.SlotFlags) == 0x0)
continue;
targetUid = item;
target = (item, required);
return true;
}
}
targetUid = EntityUid.Invalid;
target = EntityUid.Invalid;
return false;
}