forked from space-wizards/space-station-14
-
-
Notifications
You must be signed in to change notification settings - Fork 87
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1378 from hivehum/dogtag
dogtag update from CD
- Loading branch information
Showing
4 changed files
with
43 additions
and
23 deletions.
There are no files selected for viewing
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,5 @@ | ||
using Content.Shared._CD.Engraving; | ||
|
||
namespace Content.Client._CD.Engraving; | ||
|
||
public sealed class EngraveableSystem : SharedEngraveableSystem; |
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
9 changes: 6 additions & 3 deletions
9
...ver/_CD/Engraving/EngraveableComponent.cs → ...red/_CD/Engraving/EngraveableComponent.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
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,27 @@ | ||
using Content.Shared.Examine; | ||
using Robust.Shared.Utility; | ||
|
||
namespace Content.Shared._CD.Engraving; | ||
|
||
public abstract class SharedEngraveableSystem : EntitySystem | ||
{ | ||
public override void Initialize() | ||
{ | ||
base.Initialize(); | ||
|
||
SubscribeLocalEvent<EngraveableComponent, ExaminedEvent>(OnExamined); | ||
} | ||
|
||
private void OnExamined(Entity<EngraveableComponent> ent, ref ExaminedEvent args) | ||
{ | ||
var msg = new FormattedMessage(); | ||
msg.AddMarkupOrThrow(Loc.GetString(ent.Comp.EngravedMessage == string.Empty | ||
? ent.Comp.NoEngravingText | ||
: ent.Comp.HasEngravingText)); | ||
|
||
if (ent.Comp.EngravedMessage != string.Empty) | ||
msg.AddMarkupPermissive(Loc.GetString(ent.Comp.EngravedMessage)); | ||
|
||
args.PushMessage(msg, 1); | ||
} | ||
} |