Paper Visualizer (#4811)
This commit is contained in:
@@ -72,9 +72,9 @@ namespace Content.Server.Paper
|
||||
|
||||
Content += msg.Text + '\n';
|
||||
|
||||
if (Owner.TryGetComponent(out SpriteComponent? sprite))
|
||||
if (Owner.TryGetComponent(out AppearanceComponent? appearance))
|
||||
{
|
||||
sprite.LayerSetState(0, "paper_words");
|
||||
appearance.SetData(PaperVisuals.Status, PaperStatus.Written);
|
||||
}
|
||||
|
||||
Owner.Description = "";
|
||||
|
||||
@@ -57,5 +57,18 @@ namespace Content.Shared.Paper
|
||||
Stamp
|
||||
}
|
||||
|
||||
[Serializable, NetSerializable]
|
||||
public enum PaperVisuals : byte
|
||||
{
|
||||
Status
|
||||
}
|
||||
|
||||
[Serializable, NetSerializable]
|
||||
public enum PaperStatus : byte
|
||||
{
|
||||
Blank,
|
||||
Written
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
components:
|
||||
- type: Sprite
|
||||
sprite: Objects/Misc/bureaucracy.rsi
|
||||
netsync: false
|
||||
layers:
|
||||
- state: paper
|
||||
- type: Paper
|
||||
@@ -13,14 +14,26 @@
|
||||
interfaces:
|
||||
- key: enum.PaperUiKey.Key
|
||||
type: PaperBoundUserInterface
|
||||
- type: Appearance
|
||||
visuals:
|
||||
- type: GenericEnumVisualizer
|
||||
key: enum.PaperVisuals.Status
|
||||
layer: 0
|
||||
states:
|
||||
# This default isn't actually explicitly used right now.
|
||||
enum.PaperStatus.Blank: paper
|
||||
enum.PaperStatus.Written: paper_words
|
||||
|
||||
- type: entity
|
||||
parent: Paper
|
||||
id: PaperWritten
|
||||
abstract: true
|
||||
components:
|
||||
- type: Paper
|
||||
- type: Sprite
|
||||
layers:
|
||||
# Changing it here is fine - if the PaperStatus key is actually added,
|
||||
# something happened, so that ought to override this either way.
|
||||
- state: paper_words
|
||||
|
||||
- type: entity
|
||||
|
||||
Reference in New Issue
Block a user