Skip to content

Commit

Permalink
Fix verb sub (space-wizards#30667)
Browse files Browse the repository at this point in the history
* Fix verb sub

Mapping casualty, verbs are weird.

* also this
  • Loading branch information
metalgearsloth authored Aug 5, 2024
1 parent c1eb319 commit f7d8b4e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions Content.Client/Verbs/UI/VerbMenuUIController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ public void OnStateEntered(GameplayState state)
{
_context.OnContextKeyEvent += OnKeyBindDown;
_context.OnContextClosed += Close;
_verbSystem.OnVerbsResponse += HandleVerbsResponse;
}

public void OnStateExited(GameplayState state)
Expand Down
7 changes: 4 additions & 3 deletions Content.Server/Traitor/Systems/TraitorCodePaperSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
using Robust.Shared.Random;
using Robust.Shared.Utility;
using System.Linq;
using Content.Shared.Paper;

namespace Content.Server.Traitor.Systems;

Expand All @@ -33,11 +34,11 @@ private void SetupPaper(EntityUid uid, TraitorCodePaperComponent? component = nu
if (!Resolve(uid, ref component))
return;

if (HasComp<PaperComponent>(uid))
if (TryComp(uid, out PaperComponent? paperComp))
{
if (TryGetTraitorCode(out var paperContent, component))
{
_paper.SetContent(uid, paperContent);
_paper.SetContent((uid, paperComp), paperContent);
}
}
}
Expand Down Expand Up @@ -83,7 +84,7 @@ private bool TryGetTraitorCode([NotNullWhen(true)] out string? traitorCode, Trai

if (!codesMessage.IsEmpty)
{
if (i == 1)
if (i == 1)
traitorCode = Loc.GetString("traitor-codes-message-singular") + codesMessage;
else
traitorCode = Loc.GetString("traitor-codes-message-plural") + codesMessage;
Expand Down

0 comments on commit f7d8b4e

Please sign in to comment.