-
Notifications
You must be signed in to change notification settings - Fork 335
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
port ore bag magnet toggle from white dream (#2467)
* add on textures for ore bags * add code for toggling magnet and working in-hand * update ore bag yml --------- Co-authored-by: deltanedas <@deltanedas:kde.org>
- Loading branch information
1 parent
8ac8da7
commit dce230f
Showing
8 changed files
with
108 additions
and
6 deletions.
There are no files selected for viewing
17 changes: 17 additions & 0 deletions
17
Content.Shared/DeltaV/Item/ItemToggle/Components/ItemToggleExamineComponent.cs
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,17 @@ | ||
using Content.Shared.DeltaV.Item.ItemToggle.Systems; | ||
using Robust.Shared.GameStates; | ||
|
||
namespace Content.Shared.DeltaV.Item.ItemToggle.Components; | ||
|
||
/// <summary> | ||
/// Adds examine text when the item is on or off. | ||
/// </summary> | ||
[RegisterComponent, NetworkedComponent, Access(typeof(ItemToggleExamineSystem))] | ||
public sealed partial class ItemToggleExamineComponent : Component | ||
{ | ||
[DataField(required: true)] | ||
public LocId On; | ||
|
||
[DataField(required: true)] | ||
public LocId Off; | ||
} |
23 changes: 23 additions & 0 deletions
23
Content.Shared/DeltaV/Item/ItemToggle/Systems/ItemToggleExamineSystem.cs
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,23 @@ | ||
using Content.Shared.DeltaV.Item.ItemToggle.Components; | ||
using Content.Shared.Examine; | ||
using Content.Shared.Item.ItemToggle; | ||
|
||
namespace Content.Shared.DeltaV.Item.ItemToggle.Systems; | ||
|
||
public sealed class ItemToggleExamineSystem : EntitySystem | ||
{ | ||
[Dependency] private readonly ItemToggleSystem _toggle = default!; | ||
|
||
public override void Initialize() | ||
{ | ||
base.Initialize(); | ||
|
||
SubscribeLocalEvent<ItemToggleExamineComponent, ExaminedEvent>(OnExamined); | ||
} | ||
|
||
private void OnExamined(Entity<ItemToggleExamineComponent> ent, ref ExaminedEvent args) | ||
{ | ||
var msg = _toggle.IsActivated(ent.Owner) ? ent.Comp.On : ent.Comp.Off; | ||
args.PushMarkup(Loc.GetString(msg)); | ||
} | ||
} |
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
Binary file added
BIN
+2.11 KB
Resources/Textures/Objects/Specific/Mining/ore_bag_holding.rsi/icon_on.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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