Cargo: pizza & bureaucracy (#5123)
* add paper label component * git mv * rename namespace * add cargo printouts * more crates * directly attach paper * comment typo
This commit is contained in:
@@ -36,6 +36,22 @@ namespace Content.Server.Paper
|
||||
_mode = PaperAction.Read;
|
||||
UpdateUserInterface();
|
||||
}
|
||||
|
||||
public void SetContent(string content)
|
||||
{
|
||||
Content = content + '\n';
|
||||
UpdateUserInterface();
|
||||
|
||||
if (!Owner.TryGetComponent(out AppearanceComponent? appearance))
|
||||
return;
|
||||
|
||||
var status = string.IsNullOrWhiteSpace(content)
|
||||
? PaperStatus.Blank
|
||||
: PaperStatus.Written;
|
||||
|
||||
appearance.SetData(PaperVisuals.Status, status);
|
||||
}
|
||||
|
||||
private void UpdateUserInterface()
|
||||
{
|
||||
UserInterface?.SetState(new PaperBoundUserInterfaceState(Content, _mode));
|
||||
|
||||
Reference in New Issue
Block a user