Lothrazar / RootsClassic

Port of Roots 1 originally by Elucent (based on latest public MIT version, with permission from EpicSquid)
MIT License
3 stars 13 forks source link

Turn rituals into data-driven recipes #85

Closed PssbleTrngle closed 1 year ago

PssbleTrngle commented 1 year ago

Implementation for #84

Altar TileEntities no longer store their ritual when saved. This can be re-implemented using a recipe lookup instead, but as rituals are all more or less instantaneous, it did not feel like they needed to be saved when closing the world. They now only sync the ritual level & color to the client instead, since these are needed for client-side effects.

The research pages for rituals now only get added when the actual recipe behind them is defined, enabling data-pack authors to disable specific rituals and removing them from the tablet.

PssbleTrngle commented 1 year ago

Don't be too overwhelmed by the amount of changed files, most of these are either json files for the ritual recipes, or the same simple change in the ritual instances

PssbleTrngle commented 1 year ago

Is there a reason for not targeting latest (1.19.x)? I fixed a bunch of the level requirements there.

Not really, my brain has not fully moved on to 1.19 yet and the default branch of roots was trunk/1.18, I did not realize their was a branch for 1.19 already

Mrbysco commented 1 year ago

The trunk/1.18 branch is really outdated ;) I haven't merged my 1.18.x branch in there in a while

Mrbysco commented 1 year ago

That and since I'm not the repository owner I can't change default branches

PssbleTrngle commented 1 year ago

Oh okay, sorry for that. I've changed to colors to be stored as hex string in the json files, since I think that is the most user-friendly approach, and use a Color object in code. I will try to create a second PR merging into 1.19 and resolve the merge conflicts, but I would of course still be nice if this also gets merged into 1.18

PssbleTrngle commented 1 year ago

Ok I've added another PR (#87) for 1.19, making the same changes to the 1.19.x branch. I also saw the level changes you were talking about, since they are now simply reflected in the recipes json files, I could also add them to the 1.18 PR

PssbleTrngle commented 1 year ago

Hey, just wanted to check in, if this is to big of a PR to get reviewed at all, I am totally open to try again with a smaller one that only changes the things that are really necessary to make it work without all the weird tiny changes I did for some reason

Mrbysco commented 1 year ago

I rather have multiple smaller prs than 1 giant one that changes a bunch of things

PssbleTrngle commented 1 year ago

Totally understandable, I am sorry this one turned out as big as it is. I'll try again with a smaller PR in a few days that keeps the changes to a minimum