Move PaperSystem to Shared (#30592)
* Fix paper system late localization * IS THIS WHAT YOU WANT * well I guess this is happening now * fix the BUI * did that even do anything before? * again with the escapeformatting... * Dirtying * Move dirty to function * Rename PaperSystem to PaperVisualizerSystem * Fix namespace * how many namespace changes must I suffer through * SetContent is for Setting Content * minor shuffling * review --------- Co-authored-by: plykiya <plykiya@protonmail.com> Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
using Content.Shared.Paper;
|
||||
using Content.Shared.StoryGen;
|
||||
|
||||
namespace Content.Server.Paper;
|
||||
@@ -11,10 +12,10 @@ public sealed class PaperRandomStorySystem : EntitySystem
|
||||
{
|
||||
base.Initialize();
|
||||
|
||||
SubscribeLocalEvent<PaperRandomStoryComponent, MapInitEvent>(OnMapinit);
|
||||
SubscribeLocalEvent<PaperRandomStoryComponent, MapInitEvent>(OnMapInit);
|
||||
}
|
||||
|
||||
private void OnMapinit(Entity<PaperRandomStoryComponent> paperStory, ref MapInitEvent ev)
|
||||
private void OnMapInit(Entity<PaperRandomStoryComponent> paperStory, ref MapInitEvent ev)
|
||||
{
|
||||
if (!TryComp<PaperComponent>(paperStory, out var paper))
|
||||
return;
|
||||
@@ -22,6 +23,6 @@ public sealed class PaperRandomStorySystem : EntitySystem
|
||||
if (!_storyGen.TryGenerateStoryFromTemplate(paperStory.Comp.Template, out var story))
|
||||
return;
|
||||
|
||||
_paper.SetContent(paperStory.Owner, story, paper);
|
||||
_paper.SetContent((paperStory.Owner, paper), story);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user