fix emitter examining (#13369)

This commit is contained in:
Nemanja
2023-01-10 06:48:05 -05:00
committed by GitHub
parent e79d822206
commit a66790f158
3 changed files with 9 additions and 1 deletions

View File

@@ -113,6 +113,13 @@ public class GunComponent : Component
[DataField("selectModeAction")]
public InstantAction? SelectModeAction;
/// <summary>
/// Whether or not information about
/// the gun will be shown on examine.
/// </summary>
[DataField("showExamineText")]
public bool ShowExamineText = true;
}
[Flags]

View File

@@ -12,7 +12,7 @@ public abstract partial class SharedGunSystem
{
private void OnExamine(EntityUid uid, GunComponent component, ExaminedEvent args)
{
if (!args.IsInDetailsRange)
if (!args.IsInDetailsRange || !component.ShowExamineText)
return;
args.PushMarkup(Loc.GetString("gun-selected-mode-examine", ("color", ModeExamineColor), ("mode", GetLocSelector(component.SelectedMode))));

View File

@@ -37,6 +37,7 @@
map: ["enum.StorageVisualLayers.Lock"]
- type: Emitter
- type: Gun
showExamineText: false
fireRate: 10 #just has to be fast enough to keep up with upgrades
selectedMode: SemiAuto
availableModes: