Inline UID

This commit is contained in:
Vera Aguilera Puerto
2021-12-03 15:53:09 +01:00
parent 2654775bf0
commit 5cd42c9ad6
803 changed files with 3613 additions and 3577 deletions

View File

@@ -75,7 +75,7 @@ namespace Content.Server.Light.EntitySystems
_ => throw new ArgumentOutOfRangeException()
};
var entity = EntityManager.SpawnEntity(prototype, IoCManager.Resolve<IEntityManager>().GetComponent<TransformComponent>(light.Owner.Uid).Coordinates);
var entity = EntityManager.SpawnEntity(prototype, IoCManager.Resolve<IEntityManager>().GetComponent<TransformComponent>(light.Owner).Coordinates);
light.LightBulbContainer.Insert(entity);
}
@@ -88,7 +88,7 @@ namespace Content.Server.Light.EntitySystems
if (args.Handled)
return;
args.Handled = InsertBulb(uid, args.Used.Uid, component);
args.Handled = InsertBulb(uid, args.Used, component);
}
private void OnInteractHand(EntityUid uid, PoweredLightComponent light, InteractHandEvent args)
@@ -102,7 +102,7 @@ namespace Content.Server.Light.EntitySystems
return;
// check if it's possible to apply burn damage to user
var userUid = args.User.Uid;
var userUid = (EntityUid) args.User;
if (EntityManager.TryGetComponent(userUid, out HeatResistanceComponent? heatResist) &&
EntityManager.TryGetComponent(bulbUid.Value, out LightBulbComponent? lightBulb))
{
@@ -213,7 +213,7 @@ namespace Content.Server.Light.EntitySystems
if (!Resolve(uid, ref light))
return null;
return light.LightBulbContainer.ContainedEntity?.Uid;
return light.LightBulbContainer.ContainedEntity;
}
/// <summary>
@@ -340,7 +340,7 @@ namespace Content.Server.Light.EntitySystems
light.IsBlinking = isNowBlinking;
if (!IoCManager.Resolve<IEntityManager>().TryGetComponent(light.Owner.Uid, out AppearanceComponent? appearance))
if (!IoCManager.Resolve<IEntityManager>().TryGetComponent(light.Owner, out AppearanceComponent? appearance))
return;
appearance.SetData(PoweredLightVisuals.Blinking, isNowBlinking);
}