Skip to content

Commit

Permalink
more engraveable items, system "fixes"
Browse files Browse the repository at this point in the history
  • Loading branch information
whatston3 committed Dec 28, 2024
1 parent 382c837 commit bf62afd
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 13 deletions.
6 changes: 3 additions & 3 deletions Content.Server/_CD/Engraving/EngraveableComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,17 @@ public sealed partial class EngraveableComponent : Component
/// The inspect text to use when there is no engraving
/// </summary>
[DataField]
public LocId NoEngravingText = "engraving-dogtags-no-message";
public LocId NoEngravingText = "engraving-generic-no-message"; // Frontier: "dogtags"<"generic"

/// <summary>
/// The message to use when successfully engraving the item
/// </summary>
[DataField]
public LocId EngraveSuccessMessage = "engraving-dogtags-succeed";
public LocId EngraveSuccessMessage = "engraving-generic-succeed"; // Frontier: "dogtags"<"generic"

/// <summary>
/// The inspect text to use when there is an engraving. The message will be shown seperately afterwards.
/// </summary>
[DataField]
public LocId HasEngravingText = "engraving-dogtags-has-message";
public LocId HasEngravingText = "engraving-generic-has-message"; // Frontier: "dogtags"<"generic"
}
14 changes: 7 additions & 7 deletions Content.Server/_CD/Engraving/EngraveableSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ public override void Initialize()
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));
// Frontier: don't localize the message, use args in fluent entries
if (ent.Comp.EngravedMessage == string.Empty)
msg.AddMarkupOrThrow(Loc.GetString(ent.Comp.NoEngravingText, ("object", ent)));
else
msg.AddMarkupOrThrow(Loc.GetString(ent.Comp.HasEngravingText, ("object", ent), ("message", ent.Comp.EngravedMessage)));
// End Frontier

args.PushMessage(msg, 1);
}
Expand Down Expand Up @@ -66,7 +66,7 @@ private void AddEngraveVerb(Entity<EngraveableComponent> ent, ref GetVerbsEvent<
return;

ent.Comp.EngravedMessage = message;
_popup.PopupEntity(Loc.GetString(ent.Comp.EngraveSuccessMessage),
_popup.PopupEntity(Loc.GetString(ent.Comp.EngraveSuccessMessage, ("object", ent)),
actor.PlayerSession.AttachedEntity.Value,
actor.PlayerSession,
PopupType.Medium);
Expand Down
7 changes: 4 additions & 3 deletions Resources/Locale/en-US/_CD/engraving/engraving.ftl
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
engraving-verb-engrave = Engrave
engraving-popup-ui-message = Description
engraving-dogtags-no-message = The dogtags don't seem to have any kind of engraving.
engraving-dogtags-has-message = The dogtags are engraved with a message that reads:{" "}
engraving-dogtags-succeed = You successfully engrave the dogtags with your message.
# Frontier: generic engraving messages
engraving-generic-no-message = There isn't anything engraved on {THE($object)}.
engraving-generic-has-message = There's a message engraved on {THE($object)}. It reads: {$message}
engraving-generic-succeed = You successfully engrave {THE($object)} with your message.
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@
Gold: 200 # 2 bars
- type: StaticPrice
price: 300
- type: Engraveable # Frontier - base rings may not be metallic

- type: entity
abstract: true
Expand All @@ -86,3 +87,4 @@
Silver: 200 # 2 bars
- type: StaticPrice
price: 275
- type: Engraveable # Frontier - base rings may not be metallic
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
components:
- type: Sprite
sprite: Objects/Consumable/Drinks/shinyflask.rsi
- type: Engraveable # Frontier

- type: entity
parent: FlaskBase
Expand Down Expand Up @@ -46,6 +47,7 @@
components:
- type: Sprite
sprite: Objects/Consumable/Drinks/detflask.rsi
- type: Engraveable # Frontier

- type: entity
parent: FlaskBase
Expand All @@ -55,6 +57,7 @@
components:
- type: Sprite
sprite: Objects/Consumable/Drinks/hosflask.rsi
- type: Engraveable # Frontier

- type: entity
parent: FlaskBase
Expand All @@ -64,6 +67,7 @@
components:
- type: Sprite
sprite: Objects/Consumable/Drinks/flask.rsi
- type: Engraveable # Frontier

- type: entity
parent: FlaskBase
Expand All @@ -73,6 +77,7 @@
components:
- type: Sprite
sprite: Objects/Consumable/Drinks/barflask.rsi
- type: Engraveable # Frontier

- type: entity
parent: FlaskBase
Expand All @@ -82,6 +87,7 @@
components:
- type: Sprite
sprite: Objects/Consumable/Drinks/flask_old.rsi
- type: Engraveable # Frontier

- type: entity
parent: FlaskBase
Expand All @@ -91,6 +97,7 @@
components:
- type: Sprite
sprite: Objects/Consumable/Drinks/lithiumflask.rsi
- type: Engraveable # Frontier

- type: entity
parent: FlaskBase
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,4 @@
sprite: Objects/Devices/goldwatch.rsi
- type: StaticPrice
price: 500 #if you ever increase the price of kidneys, increase this too.
- type: Engraveable # Frontier
1 change: 1 addition & 0 deletions Resources/Prototypes/Entities/Objects/Tools/lighters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@
- type: UseDelay
- type: IgnitionSource
ignited: false
- type: Engraveable # Frontier

- type: entity
name: flippo engraved lighter
Expand Down

0 comments on commit bf62afd

Please sign in to comment.