-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
24 changed files
with
88 additions
and
11 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
12 changes: 12 additions & 0 deletions
12
Content.Client/Floof/CharConsent/UI/Windows/ConsentText.xaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<controls:FancyWindow | ||
xmlns="https://spacestation14.io" | ||
xmlns:controls="clr-namespace:Content.Client.UserInterface.Controls" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:gfx="clr-namespace:Robust.Client.Graphics;assembly=Robust.Client" | ||
MinSize="620 670" | ||
Title="CConsentText" | ||
Resizable="False"> | ||
<BoxContainer Orientation="Vertical" HorizontalExpand="True"> | ||
<TextEdit Name="CConsentTextInput" Access="Public" MinSize="220 100" Margin="10" HorizontalExpand="True" VerticalExpand="True" /> | ||
</BoxContainer> | ||
</controls:FancyWindow> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
namespace Content.Server.Floof | ||
{ | ||
[RegisterComponent] | ||
public sealed partial class CharConsentComponent : Component | ||
{ | ||
[DataField("consent", required: true)] | ||
[ViewVariables(VVAccess.ReadWrite)] | ||
public string Consent = ""; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
using Content.Shared.Examine; | ||
using Content.Shared.IdentityManagement; | ||
using Content.Shared.Verbs; | ||
using Robust.Shared.Utility; | ||
|
||
namespace Content.Server.Floof.CharConsent | ||
{ | ||
public sealed class CharConsentSystem : EntitySystem | ||
{ | ||
[Dependency] private readonly ExamineSystemShared _examineSystem = default!; | ||
|
||
public override void Initialize() | ||
{ | ||
base.Initialize(); | ||
|
||
SubscribeLocalEvent<CharConsentComponent, GetVerbsEvent<ExamineVerb>>(OnGetExamineVerbs); | ||
} | ||
|
||
private void OnGetExamineVerbs(EntityUid uid, CharConsentComponent component, GetVerbsEvent<ExamineVerb> args) | ||
{ | ||
if (Identity.Name(args.Target, EntityManager) != MetaData(args.Target).EntityName) | ||
return; | ||
|
||
var detailsRange = _examineSystem.IsInDetailsRange(args.User, uid); | ||
|
||
var verb = new ExamineVerb() | ||
{ | ||
Act = () => | ||
{ | ||
var markup = new FormattedMessage(); | ||
markup.AddMarkup(component.Consent); | ||
_examineSystem.SendExamineTooltip(args.User, uid, markup, false, false); | ||
}, | ||
Text = Loc.GetString("consent-examinable-verb-text"), | ||
Category = VerbCategory.Examine, | ||
Disabled = !detailsRange, | ||
Message = detailsRange ? null : Loc.GetString("consent-examinable-verb-disabled"), | ||
Icon = new SpriteSpecifier.Texture(new("/Textures/Interface/VerbIcons/vv.svg.192dpi.png")) | ||
}; | ||
|
||
args.Verbs.Add(verb); | ||
} | ||
} | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
consent-text-placeholder = Set your character-specific consent information here. | ||
consent-text-not-set = This character has no specific consent infromation. Please ask the player before engaging in anything related to ERP. | ||
humanoid-profile-editor-consenttext-tab = Consent | ||
consent-examinable-verb-text = Character Consent Info | ||
consent-examinable-verb-disabled = View this character's consent information. |