CompFactory updates (#37559)
This commit is contained in:
@@ -6,8 +6,6 @@ namespace Content.Shared.Examine
|
||||
{
|
||||
public abstract partial class ExamineSystemShared : EntitySystem
|
||||
{
|
||||
[Dependency] private readonly IComponentFactory _componentFactory = default!;
|
||||
|
||||
public const string DefaultIconTexture = "/Textures/Interface/examine-star.png";
|
||||
|
||||
public override void Initialize()
|
||||
@@ -55,7 +53,7 @@ namespace Content.Shared.Examine
|
||||
{
|
||||
foreach (var comp in components)
|
||||
{
|
||||
if (!_componentFactory.TryGetRegistration(comp, out var componentRegistration))
|
||||
if (!Factory.TryGetRegistration(comp, out var componentRegistration))
|
||||
continue;
|
||||
|
||||
if (!HasComp(uid, componentRegistration.Type))
|
||||
@@ -117,7 +115,7 @@ namespace Content.Shared.Examine
|
||||
if (TryComp<GroupExamineComponent>(verbsEvent.Target, out var groupExamine))
|
||||
{
|
||||
// Make sure we have the component name as a string
|
||||
var componentName = _componentFactory.GetComponentName(component.GetType());
|
||||
var componentName = Factory.GetComponentName(component.GetType());
|
||||
|
||||
foreach (var examineGroup in groupExamine.Group)
|
||||
{
|
||||
@@ -177,7 +175,7 @@ namespace Content.Shared.Examine
|
||||
/// </summary>
|
||||
public void AddDetailedExamineVerb(GetVerbsEvent<ExamineVerb> verbsEvent, Component component, FormattedMessage message, string verbText, string iconTexture = DefaultIconTexture, string hoverMessage = "", bool isHoverExamine = false)
|
||||
{
|
||||
var componentName = _componentFactory.GetComponentName(component.GetType());
|
||||
var componentName = Factory.GetComponentName(component.GetType());
|
||||
AddDetailedExamineVerb(verbsEvent, component, new ExamineEntry(componentName, 0f, message), verbText, iconTexture, hoverMessage, isHoverExamine);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user