Leather gloves and an LED tube light. (#187)

Added BurnTemperature to bulbs.
Added HeatResistance to clothing and species.
Added HeatResistanceComponent which resolves armor vs skin.
Made the hand burn on lamps only happen when heat resistance is too poor.
This commit is contained in:
PrPleGoo
2019-04-06 17:11:51 +02:00
committed by Pieter-Jan Briers
parent 9f1dd9f876
commit 77753debeb
23 changed files with 312 additions and 44 deletions

View File

@@ -78,7 +78,17 @@ namespace Content.Server.GameObjects
/// <returns>Null if the slot is empty, otherwise the item.</returns>
public ItemComponent GetSlotItem(Slots slot)
{
return SlotContainers[slot].ContainedEntity?.GetComponent<ItemComponent>();
return GetSlotItem<ItemComponent>(slot);
}
public T GetSlotItem<T>(Slots slot) where T : ItemComponent
{
return SlotContainers[slot].ContainedEntity?.GetComponent<T>();
}
public bool TryGetSlotItem<T>(Slots slot, out T itemComponent) where T : ItemComponent
{
itemComponent = GetSlotItem<T>(slot);
return itemComponent != null;
}
/// <summary>