Minetest_game: PB&J Pup: Healing and barking stops when server shuts down

Created on 30 Mar 2017  ·  8Comments  ·  Source: minetest/minetest_game

If you eat a PB&J pup, you normally get a healing and barking in 15s intervals for 5min. But only as long the server runs. When the server is shuts down and restarted again, your remaining regeneration is completely forgotten, even if your regeneration was not yet complete.

Looking at the code, this is because of the way how minetest.after works: https://github.com/minetest/minetest/issues/5488

Low priority Request / Suggestion

Most helpful comment

Just a thought, maybe this would be a good time to invent a potion effect API?

All 8 comments

Just a thought, maybe this would be a good time to invent a potion effect API?

Already exists, it's called “playereffects”:
https://forum.minetest.net/viewtopic.php?f=11&t=9689

Unless you mean it should be added into the engine, then I would love to read your detailed and well thought-out suggestion/plan in a new Minetest issue (if developers have no problem with that).

@Wuzzy2 One in the engine might be nice, although I would be fine with a lua API version. Especially now that player-specific variables exist.

Any kind of effect API should also work for mobs (or entities in general), not only players. And it should not be limited to potions

The non-persistency of the buff was on purpose.

To solve the problem, we should determine if persistency is needed and add something structural for this. But, since it's a rare gimmick, I didn't want to bother for just a single and rare buff.

If we get actual buff food/drinks on a large scale, we can invent something for this, or use playereffects.

I agree, it's not really important if this is lost after a restart because it's a very rare gimmick in normal gameplay and not meant serious.

Yeah i would rather not add code to store remaining player buff over a restart.

Closing as PB&J pup was removed; please move issue to https://github.com/minetest-mods/pbj_pup

Was this page helpful?
0 / 5 - 0 ratings

Related issues

HybridDog picture HybridDog  ·  4Comments

benrob0329 picture benrob0329  ·  4Comments

cx384 picture cx384  ·  6Comments

paanrama picture paanrama  ·  4Comments

Fixer-007 picture Fixer-007  ·  6Comments