Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix toggle verbs #32138

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions Content.Shared/Item/ItemToggle/Components/ItemToggleComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,18 @@ public sealed partial class ItemToggleComponent : Component
[DataField]
public bool OnUse = true;

/// <summary>
/// The localized text to display in the verb to activate.
/// </summary>
[DataField]
public string VerbToggleOn = "item-toggle-activate";

/// <summary>
/// The localized text to display in the verb to de-activate.
/// </summary>
[DataField]
public string VerbToggleOff = "item-toggle-deactivate";

/// <summary>
/// Whether the item's toggle can be predicted by the client.
/// </summary>
Expand Down
18 changes: 0 additions & 18 deletions Content.Shared/Item/ItemToggle/Components/ToggleVerbComponent.cs

This file was deleted.

2 changes: 1 addition & 1 deletion Content.Shared/Item/ItemToggle/ItemToggleSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ private void OnActivateVerb(Entity<ItemToggleComponent> ent, ref GetVerbsEvent<A

args.Verbs.Add(new ActivationVerb()
{
Text = !ent.Comp.Activated ? Loc.GetString("item-toggle-activate") : Loc.GetString("item-toggle-deactivate"),
Text = !ent.Comp.Activated ? Loc.GetString(ent.Comp.VerbToggleOn) : Loc.GetString(ent.Comp.VerbToggleOff),
Act = () =>
{
Toggle((ent.Owner, ent.Comp), user, predicted: ent.Comp.Predictable);
Expand Down
34 changes: 0 additions & 34 deletions Content.Shared/Item/ItemToggle/ToggleVerbSystem.cs

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
fire-extinguisher-component-after-interact-refilled-message = {$owner} is now refilled
fire-extinguisher-component-safety-on-message = Its safety is on!
fire-extinguisher-component-verb-text = Toggle safety
fire-extinguisher-component-verb-remove = Remove safety
fire-extinguisher-component-verb-engage = Engage safety
2 changes: 0 additions & 2 deletions Resources/Prototypes/Entities/Clothing/Shoes/magboots.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
- type: ToggleClothing
action: ActionToggleMagboots
mustEquip: false
- type: ToggleVerb
text: toggle-magboots-verb-get-data-text
- type: ComponentToggler
components:
- type: NoSlip
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@
params:
variation: 0.125
volume: -4
- type: ToggleVerb
text: fire-extinguisher-component-verb-text
verbToggleOn: fire-extinguisher-component-verb-remove
verbToggleOff: fire-extinguisher-component-verb-engage
- type: SpraySafety
- type: MeleeWeapon
wideAnimationRotation: 180
Expand Down
Loading