Examine prediction (#23565)

* Initial prediction

* new group handling

* groups for all examines that use multiple rn

* compile

* why was it doing this??

* handle newlines with sorting properly
This commit is contained in:
Kara
2024-01-05 23:53:13 -07:00
committed by GitHub
parent 731cfc278a
commit 0ae3858b69
41 changed files with 693 additions and 431 deletions

View File

@@ -185,19 +185,22 @@ public abstract partial class SharedHandsSystem : EntitySystem
var held = EnumerateHeld(uid, handsComp)
.Where(x => !HasComp<HandVirtualItemComponent>(x)).ToList();
if (!held.Any())
using (args.PushGroup(nameof(HandsComponent)))
{
args.PushText(Loc.GetString("comp-hands-examine-empty",
("user", Identity.Entity(uid, EntityManager))));
return;
if (!held.Any())
{
args.PushText(Loc.GetString("comp-hands-examine-empty",
("user", Identity.Entity(uid, EntityManager))));
return;
}
var heldList = ContentLocalizationManager.FormatList(held
.Select(x => Loc.GetString("comp-hands-examine-wrapper",
("item", Identity.Entity(x, EntityManager)))).ToList());
args.PushMarkup(Loc.GetString("comp-hands-examine",
("user", Identity.Entity(uid, EntityManager)),
("items", heldList)));
}
var heldList = ContentLocalizationManager.FormatList(held
.Select(x => Loc.GetString("comp-hands-examine-wrapper",
("item", Identity.Entity(x, EntityManager)))).ToList());
args.PushMarkup(Loc.GetString("comp-hands-examine",
("user", Identity.Entity(uid, EntityManager)),
("items", heldList)));
}
}