Only show gun examines in detail range (#10697)

The most important 2 are fire mode and how much ammo is left.
This commit is contained in:
metalgearsloth
2022-08-24 00:04:50 +10:00
committed by GitHub
parent 99aab9f409
commit 5cdec951c7
4 changed files with 12 additions and 0 deletions

View File

@@ -25,6 +25,9 @@ public abstract partial class SharedGunSystem
private void OnChamberMagazineExamine(EntityUid uid, ChamberMagazineAmmoProviderComponent component, ExaminedEvent args)
{
if (!args.IsInDetailsRange)
return;
var (count, _) = GetChamberMagazineCountCapacity(component);
args.PushMarkup(Loc.GetString("gun-magazine-examine", ("color", AmmoExamineColor), ("count", count)));
}