cosmere icon indicating copy to clipboard operation
cosmere copied to clipboard

Saves power states and removes keybind modifiers.

Open SoaringEaqle opened this issue 8 months ago • 2 comments

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.

SoaringEaqle avatar May 03 '25 22:05 SoaringEaqle

Related discussion on discord https://discord.com/channels/828383636465123328/1351674880831262860

leafreynolds avatar May 05 '25 22:05 leafreynolds

Should resolve the following issues: #119 #106

SoaringEaqle avatar May 07 '25 13:05 SoaringEaqle

I really should have actually checked this ages ago, I'm very sorry.

Anyway, found a bug.

  1. Save a state
  2. Load that state
  3. Save a different state to the same slot
  4. Load again, the state will unload instead
  5. 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?

Gerbagel avatar Jun 21 '25 18:06 Gerbagel

I never did translations. I’ll tackle that with the bug fixes. I’ll also add a patchouli guide for navigating the keybinds.

SoaringEaqle avatar Jun 27 '25 22:06 SoaringEaqle

Done with the bug fixes.

SoaringEaqle avatar Jul 01 '25 02:07 SoaringEaqle

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.

Gerbagel avatar Jul 06 '25 12:07 Gerbagel

I think I'm finally done. It might break on multiplayer, but I can't really test that.

SoaringEaqle avatar Jul 10 '25 01:07 SoaringEaqle

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?

leafreynolds avatar Jul 10 '25 04:07 leafreynolds

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.

SoaringEaqle avatar Jul 12 '25 18:07 SoaringEaqle

Upon further reflection and learning, I can say with 97% confidence that this will have zero issues on multiplayer.

SoaringEaqle avatar Jul 24 '25 03:07 SoaringEaqle

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.

Gerbagel avatar Aug 23 '25 17:08 Gerbagel