Melee refactor (#10897)

Co-authored-by: metalgearsloth <metalgearsloth@gmail.com>
This commit is contained in:
metalgearsloth
2022-09-29 15:51:59 +10:00
committed by GitHub
parent c583b7b361
commit f51248ecaa
140 changed files with 2440 additions and 1824 deletions

View File

@@ -11,6 +11,7 @@ using Content.Shared.Interaction;
using Robust.Client.GameObjects;
using Robust.Client.UserInterface;
using Robust.Shared.GameObjects;
using Robust.Shared.Input;
using Robust.Shared.IoC;
using Robust.Shared.Map;
using Robust.Shared.Maths;
@@ -70,7 +71,7 @@ namespace Content.Client.Items.Managers
_entitySystemManager.GetEntitySystem<ExamineSystem>()
.DoExamine(item.Value);
}
else if (args.Function == ContentKeyFunctions.OpenContextMenu)
else if (args.Function == EngineKeyFunctions.AltUse)
{
_entitySystemManager.GetEntitySystem<VerbSystem>().VerbMenu.OpenVerbMenu(item.Value);
}

View File

@@ -12,7 +12,6 @@ namespace Content.Client.Items.Systems;
public sealed class ItemSystem : SharedItemSystem
{
[Dependency] private readonly SharedContainerSystem _containerSystem = default!;
[Dependency] private readonly IResourceCache _resCache = default!;
public override void Initialize()
@@ -30,8 +29,8 @@ public sealed class ItemSystem : SharedItemSystem
public override void VisualsChanged(EntityUid uid)
{
// if the item is in a container, it might be equipped to hands or inventory slots --> update visuals.
if (_containerSystem.TryGetContainingContainer(uid, out var container))
RaiseLocalEvent(container.Owner, new VisualsChangedEvent(uid, container.ID), true);
if (Container.TryGetContainingContainer(uid, out var container))
RaiseLocalEvent(container.Owner, new VisualsChangedEvent(uid, container.ID));
}
/// <summary>