Various Paper adjustments (#3993)
* Various Paper adjustments + can now have prefilled text + cleaned up paper sprite layering a bit, + adds an AME manual as a test but doesn't put it anywhere + Paper cannot write arbitrary Examine markup * Paper component doesn't show text on examine anymore
This commit is contained in:
@@ -7,7 +7,9 @@ using Content.Shared.GameObjects.EntitySystems;
|
||||
using Content.Shared.Interfaces.GameObjects.Components;
|
||||
using Robust.Server.GameObjects;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.Serialization.Manager.Attributes;
|
||||
using Robust.Shared.Utility;
|
||||
using Robust.Shared.Localization;
|
||||
using Robust.Shared.ViewVariables;
|
||||
|
||||
namespace Content.Server.GameObjects.Components.Paper
|
||||
@@ -16,6 +18,7 @@ namespace Content.Server.GameObjects.Components.Paper
|
||||
public class PaperComponent : SharedPaperComponent, IExamine, IInteractUsing, IUse
|
||||
{
|
||||
private PaperAction _mode;
|
||||
[DataField("content")]
|
||||
public string Content { get; private set; } = "";
|
||||
|
||||
[ViewVariables] private BoundUserInterface? UserInterface => Owner.GetUIOrNull(PaperUiKey.Key);
|
||||
@@ -41,8 +44,14 @@ namespace Content.Server.GameObjects.Components.Paper
|
||||
{
|
||||
if (!inDetailsRange)
|
||||
return;
|
||||
if (Content == "")
|
||||
return;
|
||||
|
||||
message.AddMarkup(Content);
|
||||
message.AddMarkup(
|
||||
Loc.GetString(
|
||||
"paper-component-examine-detail-has-words"
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
bool IUse.UseEntity(UseEntityEventArgs eventArgs)
|
||||
@@ -66,7 +75,7 @@ namespace Content.Server.GameObjects.Components.Paper
|
||||
|
||||
if (Owner.TryGetComponent(out SpriteComponent? sprite))
|
||||
{
|
||||
sprite.LayerSetState(1, "paper_words");
|
||||
sprite.LayerSetState(0, "paper_words");
|
||||
}
|
||||
|
||||
Owner.Description = "";
|
||||
|
||||
6
Resources/Locale/en-US/components/paper-component.ftl
Normal file
6
Resources/Locale/en-US/components/paper-component.ftl
Normal file
@@ -0,0 +1,6 @@
|
||||
|
||||
### UI
|
||||
|
||||
# Shown when paper with words examined details
|
||||
paper-component-examine-detail-has-words = The paper has something written on it.
|
||||
|
||||
18
Resources/Prototypes/Catalog/Fills/Paper/manuals.yml
Normal file
18
Resources/Prototypes/Catalog/Fills/Paper/manuals.yml
Normal file
@@ -0,0 +1,18 @@
|
||||
- type: entity
|
||||
id: PaperWrittenAMEScribbles
|
||||
suffix: "AME scribbles"
|
||||
parent: PaperWritten
|
||||
components:
|
||||
- type: Paper
|
||||
content: |
|
||||
I don't know if you're trained already, so I hope this'll help.
|
||||
AME controller needs LV power and an HV wire to output to. Check the area with a crowbar if you aren't sure.
|
||||
There should be an empty room next to where you found this, that room's wired for the AME.
|
||||
You can put an AME anywhere if you can get the wires to it, though.
|
||||
3x3 grid of AME parts, multitool them to unpack. Be careful not to 'trap' anything.
|
||||
AME controller adjacent horizontally or vertically (not diagonally) to any point.
|
||||
With only 1 core (what a 3x3 grid will get you), don't turn it up above 2.
|
||||
The golden rule is 2 injection for every 1 core. You can go lower to save fuel.
|
||||
Higher will burn the engine out and eventually make it explode. Don't.
|
||||
Don't forget to refuel it, it tends to stop at the worst possible time.
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
- type: Sprite
|
||||
sprite: Objects/Misc/bureaucracy.rsi
|
||||
layers:
|
||||
- state: paper_words
|
||||
- state: paper
|
||||
- type: Paper
|
||||
- type: UserInterface
|
||||
@@ -15,6 +14,15 @@
|
||||
- key: enum.PaperUiKey.Key
|
||||
type: PaperBoundUserInterface
|
||||
|
||||
- type: entity
|
||||
parent: Paper
|
||||
id: PaperWritten
|
||||
abstract: true
|
||||
components:
|
||||
- type: Sprite
|
||||
layers:
|
||||
- state: paper_words
|
||||
|
||||
- type: entity
|
||||
name: pen
|
||||
parent: BaseItem
|
||||
|
||||
Reference in New Issue
Block a user