Files
Delta-v/Content.Shared/_Impstation/Examine/DetailedInspectSystem.cs
T
018d65d99b Imp ports - Novice mark and wearable examine (#6118)
* Obvious Examine (#2462)

* Obvious Examine

* Feature creep is real

* Less words and better colors

* even fewer words, please

* Oops sorry yaml

* Refactor entire Obvious Examine system

* whitespace

---------

Co-authored-by: beck <163376292+widgetbeck@users.noreply.github.com>
# Conflicts:
#	Content.Shared/_Impstation/Examine/DetailedInspectComponent.cs
#	Content.Shared/_Impstation/Examine/DetailedInspectSystem.cs
#	Resources/Locale/en-US/ghost/roles/ghost-role-component.ftl
#	Resources/Prototypes/Entities/Clothing/Neck/cloaks.yml
#	Resources/Prototypes/Entities/Clothing/Neck/medals.yml
#	Resources/Prototypes/Entities/Clothing/Neck/pins.yml
#	Resources/Prototypes/Entities/Clothing/Neck/scarfs.yml
#	Resources/Prototypes/_Impstation/Entities/Clothing/Neck/cloaks.yml
#	Resources/Prototypes/_Impstation/Entities/Clothing/Neck/misc.yml
#	Resources/Prototypes/_Impstation/Entities/Clothing/Neck/pins.yml
#	Resources/Prototypes/_Impstation/Entities/Clothing/Neck/scarfs.yml

* Novice's mark (#2626)

* Adding the item

* Update descriptions

* Add to trinket list, add to all trainee roles

* Add to PTech

* License fix

* And credit fix.

 Be nice it's my first sprite implementation lol
# Conflicts:
#	Resources/Prototypes/Catalog/VendingMachines/Inventories/cart.yml
#	Resources/Prototypes/Loadouts/loadout_groups.yml
#	Resources/Prototypes/Roles/Jobs/Engineering/technical_assistant.yml
#	Resources/Prototypes/Roles/Jobs/Medical/medical_intern.yml
#	Resources/Prototypes/_DV/Roles/Jobs/Cargo/cargo_assistant.yml
#	Resources/Prototypes/_Impstation/Entities/Clothing/Neck/pins.yml
#	Resources/Prototypes/_Impstation/Loadouts/Miscellaneous/trinkets.yml

* killing things i forgot to oops

* fix + select in loadouts for everyone

---------

Co-authored-by: January Nelson <inelsona@gmail.com>
Co-authored-by: beck <163376292+widgetbeck@users.noreply.github.com>
2026-07-20 17:08:56 -05:00

51 lines
1.4 KiB
C#

using Content.Shared.Examine;
using Content.Shared.Verbs;
using Robust.Shared.Network;
using Robust.Shared.Utility;
namespace Content.Shared._Impstation.Examine;
public sealed partial class DetailedInspectSystem : EntitySystem
{
[Dependency] private readonly INetManager _net = default!;
[Dependency] private readonly ExamineSystemShared _examine = default!;
public override void Initialize()
{
base.Initialize();
SubscribeLocalEvent<DetailedInspectComponent, GetVerbsEvent<ExamineVerb>>(OnGetVerb);
}
public void OnGetVerb(Entity<DetailedInspectComponent> ent, ref GetVerbsEvent<ExamineVerb> args)
{
if (!args.CanInteract || !args.CanAccess || !_net.IsServer)
return;
var msg = new FormattedMessage();
var numberedIndex = 1;
foreach (var locId in ent.Comp.ExamineText)
{
if (ent.Comp.TickEntries)
msg.AddMarkupOrThrow("- ");
if (ent.Comp.NumberedEntries)
{
msg.AddMarkupOrThrow($"{numberedIndex}. ");
numberedIndex++;
}
msg.AddMarkupOrThrow(Loc.GetString(locId));
if (ent.Comp.LineBreak)
msg.PushNewline();
else
msg.AddMarkupOrThrow(" ");
}
_examine.AddDetailedExamineVerb(args, ent.Comp, msg, Loc.GetString(ent.Comp.VerbText), ent.Comp.Icon, Loc.GetString(ent.Comp.VerbMessage));
}
}