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:
@@ -64,6 +64,9 @@ public abstract partial class SharedGunSystem
|
||||
|
||||
private void OnBallisticExamine(EntityUid uid, BallisticAmmoProviderComponent component, ExaminedEvent args)
|
||||
{
|
||||
if (!args.IsInDetailsRange)
|
||||
return;
|
||||
|
||||
args.PushMarkup(Loc.GetString("gun-magazine-examine", ("color", AmmoExamineColor), ("count", GetBallisticShots(component))));
|
||||
}
|
||||
|
||||
|
||||
@@ -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)));
|
||||
}
|
||||
|
||||
@@ -12,6 +12,9 @@ public abstract partial class SharedGunSystem
|
||||
{
|
||||
private void OnExamine(EntityUid uid, GunComponent component, ExaminedEvent args)
|
||||
{
|
||||
if (!args.IsInDetailsRange)
|
||||
return;
|
||||
|
||||
args.PushMarkup(Loc.GetString("gun-selected-mode-examine", ("color", ModeExamineColor), ("mode", GetLocSelector(component.SelectedMode))));
|
||||
args.PushMarkup(Loc.GetString("gun-fire-rate-examine", ("color", FireRateExamineColor), ("fireRate", component.FireRate)));
|
||||
}
|
||||
|
||||
@@ -24,6 +24,9 @@ public abstract partial class SharedGunSystem
|
||||
|
||||
private void OnMagazineExamine(EntityUid uid, MagazineAmmoProviderComponent component, ExaminedEvent args)
|
||||
{
|
||||
if (!args.IsInDetailsRange)
|
||||
return;
|
||||
|
||||
var (count, _) = GetMagazineCountCapacity(component);
|
||||
args.PushMarkup(Loc.GetString("gun-magazine-examine", ("color", AmmoExamineColor), ("count", count)));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user