Improves examine for ranged weapons, magazines and ammo.

This commit is contained in:
Víctor Aguilera Puerto
2020-08-22 20:07:35 +02:00
parent fffff53762
commit 5de139d6fd
6 changed files with 69 additions and 22 deletions

View File

@@ -5,6 +5,7 @@ using Content.Server.GameObjects.Components.GUI;
using Content.Server.GameObjects.Components.Items.Storage;
using Content.Server.GameObjects.Components.Weapon.Ranged.Barrels;
using Content.Shared.GameObjects.Components.Weapons.Ranged.Barrels;
using Content.Shared.GameObjects.EntitySystems;
using Content.Shared.Interfaces;
using Content.Shared.Interfaces.GameObjects.Components;
using Robust.Server.GameObjects;
@@ -14,11 +15,12 @@ using Robust.Shared.GameObjects;
using Robust.Shared.Interfaces.GameObjects;
using Robust.Shared.Localization;
using Robust.Shared.Serialization;
using Robust.Shared.Utility;
namespace Content.Server.GameObjects.Components.Weapon.Ranged.Ammunition
{
[RegisterComponent]
public class RangedMagazineComponent : Component, IMapInit, IInteractUsing, IUse
public class RangedMagazineComponent : Component, IMapInit, IInteractUsing, IUse, IExamine
{
public override string Name => "RangedMagazine";
@@ -168,5 +170,11 @@ namespace Content.Server.GameObjects.Components.Weapon.Ranged.Ammunition
return true;
}
public void Examine(FormattedMessage message, bool inDetailsRange)
{
var text = Loc.GetString("It's a [color=white]{0}[/color] magazine of [color=white]{1}[/color] caliber.", MagazineType, Caliber);
message.AddMarkup(text);
}
}
}