Saves power states and removes keybind modifiers.
Changes proposed in this pull request:
Removes unappreciated modifier keybinds for individual activators
Adds power save states.
Power save states can be saved by holding the "save power save" key and pressing a hotbar slot key, while having at least one manifestation active.
Power save states can be activated by holding the "activate power save" key and pressing the hotbar key tied to the power save you wish to recall.
Future Plans for These Features:
Chat message when power save state is saved or activated Save state toggle, turning those powers back off after use.
Related discussion on discord https://discord.com/channels/828383636465123328/1351674880831262860
Should resolve the following issues: #119 #106
I really should have actually checked this ages ago, I'm very sorry.
Anyway, found a bug.
- Save a state
- Load that state
- Save a different state to the same slot
- Load again, the state will unload instead
- Attempt to load again, only some changes will be reflected. When testing, I set f-gold to store at 1, and a-steel to flare, and only a-steel changed while f-gold remained at 0
Also, I'm almost certain this is just me struggling with datagen again, but I'm only getting translation strings for each of the individual power hotkeys as well as the activate and save hotkeys. Could you confirm it works on your end?
I never did translations. I’ll tackle that with the bug fixes. I’ll also add a patchouli guide for navigating the keybinds.
Done with the bug fixes.
Works mostly as expected, though it still has to unload before loading a save state again.
Looking at the code, you either need to set isActive to false when the state changes, or check if the current state is different from the state the player is attempting to load.
I think I'm finally done. It might break on multiplayer, but I can't really test that.
I think I'm finally done. It might break on multiplayer, but I can't really test that.
doesn't it let you runServer and runClient to connect to it?
I don't think I can test multiple players. The only reason I say it might break is because the power save states are copied to the sprirtweb as nbt data, and I have no clue how the server and client interact with that use case. It probably works, I just don't know how.
Upon further reflection and learning, I can say with 97% confidence that this will have zero issues on multiplayer.
No more issues that I can see. Multiplayer didn't crash, and it seems synced. Should be fine to merge if Leaf has nothing else.