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:
@@ -61,6 +61,12 @@ namespace Content.Server.GameObjects.Components.Power.Chargers
|
||||
{
|
||||
protected override void GetData(IEntity user, PowerCellChargerComponent component, VerbData data)
|
||||
{
|
||||
if (!ActionBlockerSystem.CanInteract(user))
|
||||
{
|
||||
data.Visibility = VerbVisibility.Invisible;
|
||||
return;
|
||||
}
|
||||
|
||||
if (!user.TryGetComponent(out HandsComponent handsComponent))
|
||||
{
|
||||
data.Visibility = VerbVisibility.Invisible;
|
||||
@@ -99,6 +105,12 @@ namespace Content.Server.GameObjects.Components.Power.Chargers
|
||||
{
|
||||
protected override void GetData(IEntity user, PowerCellChargerComponent component, VerbData data)
|
||||
{
|
||||
if (!ActionBlockerSystem.CanInteract(user))
|
||||
{
|
||||
data.Visibility = VerbVisibility.Invisible;
|
||||
return;
|
||||
}
|
||||
|
||||
if (component._container.ContainedEntity == null)
|
||||
{
|
||||
data.Text = "Eject";
|
||||
|
||||
Reference in New Issue
Block a user