BlockMen / hunger

Hunger mechanics for Minetest; needs Better HUD (https://github.com/BlockMen/hud)
GNU Lesser General Public License v2.1
8 stars 3 forks source link

hunger should be paused if the player is away #7

Open verymilan opened 8 years ago

verymilan commented 8 years ago

Hi, i guess its a good idea to stop the hunger after player pressed escape. We using afk kick now as workaround and im not really shure if its possible. Maybe there can be detect the esc key and the mod waits for "any key"? Im not sure about this, but it will be very useful and servers can disable afk kick again.

BlockMen commented 8 years ago

There is no way to detect if ESC has been pressed. The way hunger works are two components: 1) activity (walking, digging, etc) 2) time based hunger

So in your case it would be easier to increase this value https://github.com/BlockMen/hunger/blob/master/init.lua#L5 a lot ;)

Anyway, i will add the feature request label, it might become handy to have settings for those things. Or at least be more clear documented.