Fix being able to use invalid verbs as a ghost (#1157)
* Add CanInteract check to 18 verbs * Add more caninteract checks to verbs without it Storage toggle open, ammo box dump, bolt open and close, revolver spin and magazine open and close
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
using Content.Server.GameObjects.EntitySystems;
|
||||
using Content.Server.Interfaces;
|
||||
using Content.Shared.GameObjects;
|
||||
using Robust.Server.GameObjects;
|
||||
@@ -37,6 +38,12 @@ namespace Content.Server.GameObjects.Components
|
||||
{
|
||||
protected override void GetData(IEntity user, RotatableComponent component, VerbData data)
|
||||
{
|
||||
if (!ActionBlockerSystem.CanInteract(user))
|
||||
{
|
||||
data.Visibility = VerbVisibility.Invisible;
|
||||
return;
|
||||
}
|
||||
|
||||
data.CategoryData = VerbCategories.Rotate;
|
||||
data.Text = "Rotate clockwise";
|
||||
data.IconTexture = "/Textures/UserInterface/VerbIcons/rotate_cw.svg.96dpi.png";
|
||||
@@ -53,6 +60,12 @@ namespace Content.Server.GameObjects.Components
|
||||
{
|
||||
protected override void GetData(IEntity user, RotatableComponent component, VerbData data)
|
||||
{
|
||||
if (!ActionBlockerSystem.CanInteract(user))
|
||||
{
|
||||
data.Visibility = VerbVisibility.Invisible;
|
||||
return;
|
||||
}
|
||||
|
||||
data.CategoryData = VerbCategories.Rotate;
|
||||
data.Text = "Rotate counter-clockwise";
|
||||
data.IconTexture = "/Textures/UserInterface/VerbIcons/rotate_ccw.svg.96dpi.png";
|
||||
|
||||
Reference in New Issue
Block a user