Infinity books (#25840)

* setup text data

* roundstart reshuffling keywords with gibberish words

* saved data categorized

* add book with hints

* start redrawing books

* +4 book design

* +books +random visual upgrade

* finish first file

* finish lore file

* finish with books.rsi now authorbooks.rsi...

* aurora! and some fix

* nuke author books

* speelbuke update

* finish respriting work

* fix scientist guide visual

* setup datasets

* setup stupid funny random story

* restore author books, upgrade hint generation

* add variety to story generator

* add learning system

* minor textgen edit

* file restruct, hint count variation

* more restruct

* more renaming
add basis learning system logic. Spears locked for special book for test.

* nuke all systems, for splitting PR gods

* typo fix

* update migration with deleted books

* add random story books to maint

* Update construction-system.ftl

* Update Resources/Prototypes/Datasets/Names/books.yml

Co-authored-by: chromiumboy <50505512+chromiumboy@users.noreply.github.com>

* Update Resources/Prototypes/Datasets/Names/books.yml

Co-authored-by: chromiumboy <50505512+chromiumboy@users.noreply.github.com>

* Update Resources/Prototypes/Datasets/Names/books.yml

Co-authored-by: chromiumboy <50505512+chromiumboy@users.noreply.github.com>

* Update Resources/Prototypes/Datasets/Names/books.yml

Co-authored-by: chromiumboy <50505512+chromiumboy@users.noreply.github.com>

* Update Resources/Prototypes/Datasets/Names/books.yml

Co-authored-by: chromiumboy <50505512+chromiumboy@users.noreply.github.com>

* Update Resources/Prototypes/Datasets/Names/books.yml

Co-authored-by: chromiumboy <50505512+chromiumboy@users.noreply.github.com>

* Update Resources/Prototypes/Datasets/Names/books.yml

Co-authored-by: Hrosts <35345601+Hrosts@users.noreply.github.com>

* Update Resources/Prototypes/Datasets/Names/books.yml

Co-authored-by: chromiumboy <50505512+chromiumboy@users.noreply.github.com>

* Update Resources/Prototypes/Datasets/Names/books.yml

Co-authored-by: chromiumboy <50505512+chromiumboy@users.noreply.github.com>

* Update Resources/Prototypes/Datasets/Names/books.yml

Co-authored-by: chromiumboy <50505512+chromiumboy@users.noreply.github.com>

* Update Resources/Prototypes/Datasets/Names/books.yml

Co-authored-by: chromiumboy <50505512+chromiumboy@users.noreply.github.com>

* Update Resources/Prototypes/Datasets/Names/books.yml

Co-authored-by: chromiumboy <50505512+chromiumboy@users.noreply.github.com>

* typo fix

* interchangeably

* final

* Update Resources/Prototypes/Datasets/Names/books.yml

Co-authored-by: Hrosts <35345601+Hrosts@users.noreply.github.com>

* "."

* Update Content.Server/Paper/PaperRandomStorySystem.cs

Co-authored-by: Hrosts <35345601+Hrosts@users.noreply.github.com>

* Ubazer fix

* inadequate

* localized

* Update meta.json

* fuck merge conflicts

* fix jani book

---------

Co-authored-by: chromiumboy <50505512+chromiumboy@users.noreply.github.com>
Co-authored-by: Hrosts <35345601+Hrosts@users.noreply.github.com>
This commit is contained in:
Ed
2024-04-02 00:00:10 +03:00
committed by GitHub
parent eace2378e7
commit 7464d8284c
149 changed files with 1476 additions and 533 deletions

View File

@@ -0,0 +1,29 @@
using Content.Server.RandomMetadata;
namespace Content.Server.Paper;
public sealed class PaperRandomStorySystem : EntitySystem
{
[Dependency] private readonly RandomMetadataSystem _randomMeta = default!;
public override void Initialize()
{
base.Initialize();
SubscribeLocalEvent<PaperRandomStoryComponent, MapInitEvent>(OnMapinit);
}
private void OnMapinit(Entity<PaperRandomStoryComponent> paperStory, ref MapInitEvent ev)
{
if (!TryComp<PaperComponent>(paperStory, out var paper))
return;
if (paperStory.Comp.StorySegments == null)
return;
var story = _randomMeta.GetRandomFromSegments(paperStory.Comp.StorySegments, paperStory.Comp.StorySeparator);
paper.Content += $"\n{story}";
}
}