11 Commits

Author SHA1 Message Date
1d78be907b Modifie le son du joueur qui mange 2020-01-05 18:31:08 +01:00
235a8652eb Merge branch 'master' of yunohost.local:mtcontrib/minetest_hbhunger into nalc-1.2-dev 2019-12-22 13:16:16 +01:00
91d6d3de5d Play sound at eater, add random pitch 2019-09-24 18:20:12 +02:00
ebf40debc6 Add Russian locale by lmk 2019-09-17 11:13:49 +02:00
564413a871 Version 1.0.1 2019-09-13 19:57:41 +02:00
96f05c4e73 Fix displaying too many decimal places 2019-09-13 19:48:48 +02:00
9989c26c65 Merge branch 'master' into nalc-1.2 2019-05-09 22:05:07 +02:00
957decb6ac Version 1.0.0 2019-04-01 13:11:27 +02:00
da66d0a1af Remove old changelog 2019-04-01 13:07:11 +02:00
f293d3c7fe Move metadata to mod.conf 2019-04-01 13:06:56 +02:00
d6b281bcab Change translation system to MT 5.0.0 2019-04-01 13:05:36 +02:00
18 changed files with 26 additions and 102 deletions

View File

@ -1,12 +1,12 @@
# Hunger with HUD bar [`hbhunger`]
* Version: 0.7.1
* Version: 1.0.1
## Using the mod
This mod adds a mechanic for hunger.
This mod depends on the HUD bars mod [`hudbars`], version 1.4.1 or any later version
starting with “1.”.
starting with “1.” or “2.”.
## About hunger
This mod adds a hunger mechanic to the game. Players get a new attribute called “satiation”:

View File

@ -1,32 +0,0 @@
hudbars
intllib?
default?
flowers?
animalmaterials?
bucket?
bushes?
bushes_classic?
cooking?
creatures?
docfarming?
dwarves?
ethereal?
farming?
farming_plus?
ferns?
fishing?
fruit?
glooptest?
jkanimals?
jkfarming?
jkwine?
kpgmobs?
mobfcooking?
mobs?
moretrees?
mtfoods?
mush45?
mushroom?
seaplants?
pizza?
nssm?

View File

@ -1 +0,0 @@
Adds a simple hunger meachanic with satiation, food poisoning and different healing.

View File

@ -79,7 +79,13 @@ function hbhunger.item_eat(hunger_change, replace_with_item, poisen, heal, sound
if h == nil or hp == nil then
return
end
minetest.sound_play({name = sound or "hbhunger_eat_generic", gain = 1}, {pos=user:getpos(), max_hear_distance = 16})
minetest.sound_play(
{name = sound or "hbhunger_eat_generic",
gain = 1},
{object=user,
max_hear_distance = 16,
pitch = 1 + math.random(-10, 10)*0.005,}
)
-- Saturation
if h < 30 and hunger_change then

View File

@ -1,9 +1,4 @@
local S
if (minetest.get_modpath("intllib")) then
S = intllib.Getter()
else
S = function ( s ) return s end
end
local S = minetest.get_translator("hbhunger")
if minetest.settings:get_bool("enable_damage") then
@ -46,7 +41,7 @@ end
dofile(minetest.get_modpath("hbhunger").."/hunger.lua")
-- register satiation hudbar
hb.register_hudbar("satiation", 0xFFFFFF, S("Satiation"), { icon = "hbhunger_icon.png", bgicon = "hbhunger_bgicon.png", bar = "hbhunger_bar.png" }, 20, 30, false)
hb.register_hudbar("satiation", 0xFFFFFF, S("Satiation"), { icon = "hbhunger_icon.png", bgicon = "hbhunger_bgicon.png", bar = "hbhunger_bar.png" }, 20, 30, false, nil, { format_value = "%.1f", format_max_value = "%d" })
-- update hud elemtens if value has changed
local function update_hud(player)

View File

@ -1 +0,0 @@
Satiation = Sättigung

2
locale/hbhunger.de.tr Normal file
View File

@ -0,0 +1,2 @@
# textdomain:hbhunger
Satiation=Sättigung

2
locale/hbhunger.it.tr Normal file
View File

@ -0,0 +1,2 @@
# textdomain:hbhunger
Satiation=Sazietà

2
locale/hbhunger.ms.tr Normal file
View File

@ -0,0 +1,2 @@
# textdomain:hbhunger
Satiation=Kekenyangan

2
locale/hbhunger.pt.tr Normal file
View File

@ -0,0 +1,2 @@
# textdomain:hbhunger
Satiation=Saciedade

2
locale/hbhunger.ru.tr Normal file
View File

@ -0,0 +1,2 @@
# textdomain:hbhunger
Satiation=голод

View File

@ -1 +0,0 @@
Satiation = Sazietà

View File

@ -1 +0,0 @@
Satiation = Kekenyangan

View File

@ -1 +0,0 @@
Satiation = Saciedade

View File

@ -1 +1,2 @@
Satiation
# textdomain:hbhunger
Satiation=

View File

@ -1 +1,4 @@
name = hbhunger
description = Adds a simple hunger meachanic with satiation, food poisoning and different healing.
depends = hudbars
optional_depends = default, flowers, animalmaterials, bucket, bushes, bushes_classic, cooking, creatures, docfarming, dwarves, ethereal, farming, farming_plus, ferns, fishing, fruit, glooptest, jkanimals, jkfarming, jkwine, kpgmobs, mobfcooking, mobs, moretrees, mtfoods, mush45, mushroom, seaplants, pizza, nssm

View File

@ -1,54 +0,0 @@
OLD CHANGELOG
-------------
0.1.0
-----
Initial release
0.2.0
-----
- Change “saturation” to “satiation”
- Rename global table to “hbhunger” to avoid collisions
- General cleanup
0.3.0
-----
- Play simple eating sound when something is eaten
0.3.1
-----
- Add Ethereal orange
- Fix exhaus variable
0.3.2
-----
- Fix another crash
0.4.0
-----
- Generic eating functionality, items using the minetest.item_eat are automatically supported
- Change health bar and icon when poisoned
- Special support for red and brown mushroom from Minetest Game [flowers]
- Special support for [pizza]
- Special support for beans from Farming Redo [farming]
- Fix crash when poisoned player leaves server
- Changed license to LGPL v2.1
0.4.1
-----
- Add foods from Not So Simple Mobs [nssm]
0.5.0
-----
- Fix custom sound not working
- Add Portuguese translation
0.5.1
-----
- Fix incompability problem with pipeworks mod
0.5.2
-----
- Fix mod not working with both intllib and mod security enabled
- Add missing screenshot
- Rewrite README and use Markdown format

Binary file not shown.