Adds a bunch of UI icons for verbs. (#3007)

Co-authored-by: Pieter-Jan Briers <pieterjan.briers+git@gmail.com>
This commit is contained in:
Swept
2021-03-14 13:23:32 +00:00
committed by GitHub
parent 13afec5f76
commit 3dba752193
84 changed files with 1469 additions and 18 deletions

View File

@@ -1,4 +1,4 @@
#nullable enable
#nullable enable
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
@@ -263,6 +263,7 @@ namespace Content.Server.GameObjects.Components.Access
}
data.Text = Loc.GetString("Eject Privileged ID");
data.IconTexture = "/Textures/Interface/VerbIcons/eject.svg.96dpi.png";
data.Visibility = component.PrivilegedIDEmpty ? VerbVisibility.Invisible : VerbVisibility.Visible;
}
@@ -288,6 +289,7 @@ namespace Content.Server.GameObjects.Components.Access
data.Text = Loc.GetString("Eject Target ID");
data.Visibility = component.TargetIDEmpty ? VerbVisibility.Invisible : VerbVisibility.Visible;
data.IconTexture = "/Textures/Interface/VerbIcons/eject.svg.96dpi.png";
}
protected override void Activate(IEntity user, IdCardConsoleComponent component)

View File

@@ -792,6 +792,7 @@ namespace Content.Server.GameObjects.Components.Disposal
data.Visibility = VerbVisibility.Visible;
data.Text = Loc.GetString("Flush");
data.IconTexture = "/Textures/Interface/VerbIcons/eject.svg.96dpi.png";
}
protected override void Activate(IEntity user, DisposalMailingUnitComponent component)

View File

@@ -703,6 +703,7 @@ namespace Content.Server.GameObjects.Components.Disposal
data.Visibility = VerbVisibility.Visible;
data.Text = Loc.GetString("Flush");
data.IconTexture = "/Textures/Interface/VerbIcons/eject.svg.96dpi.png";
}
protected override void Activate(IEntity user, DisposalUnitComponent component)

View File

@@ -666,6 +666,7 @@ namespace Content.Server.GameObjects.Components.GUI
data.Visibility = VerbVisibility.Visible;
data.Text = Loc.GetString("Set Outfit");
data.CategoryData = VerbCategories.Debug;
data.IconTexture = "/Textures/Interface/VerbIcons/outfit.svg.96dpi.png";
}
protected override void Activate(IEntity user, InventoryComponent component)

View File

@@ -472,6 +472,7 @@ namespace Content.Server.GameObjects.Components.Items.Storage
}
data.Text = Loc.GetString(component.Open ? "Close" : "Open");
data.IconTexture = component.Open ? "/Textures/Interface/VerbIcons/close.svg.96dpi.png" : "/Textures/Interface/VerbIcons/open.svg.96dpi.png";
}
void IExAct.OnExplosion(ExplosionEventArgs eventArgs)

View File

@@ -112,7 +112,7 @@ namespace Content.Server.GameObjects.Components.Items.Storage
return;
}
data.Text = Loc.GetString("Pick Up");
data.Text = Loc.GetString("Pick up");
}
protected override void Activate(IEntity user, ItemComponent component)

View File

@@ -1,4 +1,4 @@
using Content.Server.GameObjects.Components.Access;
using Content.Server.GameObjects.Components.Access;
using Content.Shared.GameObjects.Components.Storage;
using Content.Shared.GameObjects.EntitySystems.ActionBlocker;
using Content.Shared.GameObjects.Verbs;
@@ -77,6 +77,7 @@ namespace Content.Server.GameObjects.Components.Items.Storage
if (Locked)
{
data.Visibility = VerbVisibility.Invisible;
return;
}

View File

@@ -380,6 +380,7 @@ namespace Content.Server.GameObjects.Components.PDA
data.Text = Loc.GetString("Eject ID");
data.Visibility = component.IdSlotEmpty ? VerbVisibility.Invisible : VerbVisibility.Visible;
data.IconTexture = "/Textures/Interface/VerbIcons/eject.svg.96dpi.png";
}
protected override void Activate(IEntity user, PDAComponent component)
@@ -401,6 +402,7 @@ namespace Content.Server.GameObjects.Components.PDA
data.Text = Loc.GetString("Eject Pen");
data.Visibility = component.PenSlotEmpty ? VerbVisibility.Invisible : VerbVisibility.Visible;
data.IconTexture = "/Textures/Interface/VerbIcons/eject.svg.96dpi.png";
}
protected override void Activate(IEntity user, PDAComponent component)
@@ -421,6 +423,7 @@ namespace Content.Server.GameObjects.Components.PDA
}
data.Text = Loc.GetString("Toggle flashlight");
data.IconTexture = "/Textures/Interface/VerbIcons/light.svg.96dpi.png";
}
protected override void Activate(IEntity user, PDAComponent component)

View File

@@ -134,14 +134,14 @@ namespace Content.Server.GameObjects.Components.Power.ApcNetComponents.PowerRece
if (component._container.ContainedEntity != null || handsComponent.GetActiveHand == null)
{
data.Visibility = VerbVisibility.Disabled;
data.Text = Loc.GetString("Insert");
data.Visibility = VerbVisibility.Invisible;
return;
}
var heldItemName = Loc.GetString(handsComponent.GetActiveHand.Owner.Name);
data.Text = Loc.GetString("Insert {0}", heldItemName);
data.IconTexture = "/Textures/Interface/VerbIcons/insert.svg.96dpi.png";
}
protected override void Activate(IEntity user, BaseCharger component)
@@ -173,14 +173,14 @@ namespace Content.Server.GameObjects.Components.Power.ApcNetComponents.PowerRece
}
if (component._container.ContainedEntity == null)
{
data.Text = Loc.GetString("Eject");
data.Visibility = VerbVisibility.Disabled;
data.Visibility = VerbVisibility.Invisible;
return;
}
var containerItemName = Loc.GetString(component._container.ContainedEntity.Name);
data.Text = Loc.GetString("Eject {0}", containerItemName);
data.IconTexture = "/Textures/Interface/VerbIcons/eject.svg.96dpi.png";
}
protected override void Activate(IEntity user, BaseCharger component)

View File

@@ -1,4 +1,4 @@
#nullable enable
#nullable enable
using System;
using Content.Server.GameObjects.Components.GUI;
using Content.Server.GameObjects.Components.Items.Storage;
@@ -187,11 +187,13 @@ namespace Content.Server.GameObjects.Components.Power
if (component.Cell == null)
{
data.Text = Loc.GetString("Eject cell (cell missing)");
data.Text = Loc.GetString("No cell");
data.Visibility = VerbVisibility.Disabled;
}
else
{
data.Text = Loc.GetString("Eject cell");
data.IconTexture = "/Textures/Interface/VerbIcons/eject.svg.96dpi.png";
}
if (component.Cell == null || !component.CanRemoveCell)

View File

@@ -216,6 +216,7 @@ namespace Content.Server.GameObjects.Components.Weapon.Ranged.Ammunition
data.Text = Loc.GetString("Dump 10");
data.Visibility = component.AmmoLeft > 0 ? VerbVisibility.Visible : VerbVisibility.Disabled;
data.IconTexture = "/Textures/Interface/VerbIcons/eject.svg.96dpi.png";
}
protected override void Activate(IEntity user, AmmoBoxComponent component)

View File

@@ -1,4 +1,4 @@
using System;
using System;
using System.Threading.Tasks;
using Content.Server.GameObjects.Components.Weapon.Ranged.Ammunition;
using Content.Shared.GameObjects;
@@ -294,6 +294,7 @@ namespace Content.Server.GameObjects.Components.Weapon.Ranged.Barrels
}
data.Visibility = component.ShotsLeft > 0 ? VerbVisibility.Visible : VerbVisibility.Disabled;
data.IconTexture = "/Textures/Interface/VerbIcons/refresh.svg.96dpi.png";
}
protected override void Activate(IEntity user, RevolverBarrelComponent component)

View File

@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Content.Server.GameObjects.Components.GUI;
@@ -302,12 +302,13 @@ namespace Content.Server.GameObjects.Components.Weapon.Ranged.Barrels
if (component.PowerCell == null)
{
data.Text = Loc.GetString("Eject cell (cell missing)");
data.Text = Loc.GetString("No cell");
data.Visibility = VerbVisibility.Disabled;
}
else
{
data.Text = Loc.GetString("Eject cell");
data.IconTexture = "/Textures/Interface/VerbIcons/eject.svg.96dpi.png";
}
}

View File

@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Content.Server.GameObjects.Components.GUI;
@@ -463,6 +463,7 @@ namespace Content.Server.GameObjects.Components.Weapon.Ranged.Barrels
}
data.Text = Loc.GetString("Eject magazine");
data.IconTexture = "/Textures/Interface/VerbIcons/eject.svg.96dpi.png";
if (component.MagNeedsOpenBolt)
{
data.Visibility = component.HasMagazine && component.BoltOpen