Inline TryGetComponent completely, for real

This commit is contained in:
Vera Aguilera Puerto
2021-12-03 14:17:01 +01:00
parent 2ff4ec65d5
commit 69b270017b
425 changed files with 1143 additions and 995 deletions

View File

@@ -2,6 +2,7 @@ using Content.Server.Clothing.Components;
using Content.Server.Inventory.Components;
using Content.Shared.Inventory;
using Robust.Shared.GameObjects;
using Robust.Shared.IoC;
namespace Content.Server.Temperature.Components
{
@@ -14,7 +15,7 @@ namespace Content.Server.Temperature.Components
{
// TODO: When making into system: Any animal that touches bulb that has no
// InventoryComponent but still would have default heat resistance in the future (maybe)
if (!Owner.TryGetComponent<InventoryComponent>(out var inventoryComp))
if (!IoCManager.Resolve<IEntityManager>().TryGetComponent<InventoryComponent?>(Owner.Uid, out var inventoryComp))
{
// Magical number just copied from below
return int.MinValue;