diff --git a/CHANGELOG.md b/CHANGELOG.md index af21550..1edd7b9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -36,7 +36,7 @@ Other Game Changes: - Make crop hitbox smaller - Fireworks now damage entities when they're too close to the explosion - Added new damage types `fireworks` and `projectile` - +- Add healing information to food descriptions Code Changes: diff --git a/mods/ENTITIES/pyutest_mobs/init.lua b/mods/ENTITIES/pyutest_mobs/init.lua index 573cf0f..28761a9 100644 --- a/mods/ENTITIES/pyutest_mobs/init.lua +++ b/mods/ENTITIES/pyutest_mobs/init.lua @@ -1,7 +1,6 @@ local modpath = core.get_modpath("pyutest_mobs") mobs.fallback_node = "pyutest_blocks:dirt_block" - dofile(modpath .. "/api.lua") dofile(modpath .. "/basic.lua") @@ -47,6 +46,18 @@ if not PyuTest.is_flat() then day_toggle = true, }) + mobs:spawn({ + name = "pyutest_mobs:pig", + nodes = { "group:ground" }, + interval = 3, + chance = 4, + active_object_count = 7, + min_light = 9, + max_light = 15, + min_height = PyuTest.OVERWORLD_SURFACE_BOTTOM, + day_toggle = true, + }) + mobs:spawn({ name = "pyutest_mobs:mimic", nodes = { "group:ground" }, diff --git a/mods/ITEMS/pyutest_tools/api.lua b/mods/ITEMS/pyutest_tools/api.lua index 8946dbd..4529b65 100644 --- a/mods/ITEMS/pyutest_tools/api.lua +++ b/mods/ITEMS/pyutest_tools/api.lua @@ -50,7 +50,7 @@ PyuTest.make_sword = function(nsname, desc, texture, damage, durability, atkspee end PyuTest.make_food = function(nsname, desc, wield_image, health_fill, cook_into, extra_code) - PyuTest.make_item(nsname, desc, { + PyuTest.make_item(nsname, desc .. string.format("\nHeals %d health", health_fill), { food = 1 }, wield_image, { on_use = function(itemstack, user, pt) diff --git a/mods/PLAYER/pyutest_hud/init.lua b/mods/PLAYER/pyutest_hud/init.lua index 1e9bb50..e308afb 100644 --- a/mods/PLAYER/pyutest_hud/init.lua +++ b/mods/PLAYER/pyutest_hud/init.lua @@ -52,7 +52,8 @@ local enable_damage = core.settings:get_bool("enable_damage") if enable_damage then PyuTest.Hudbar:add("health", { - text = "pyutest-bar-health.png", + text = "pyutest-heart.png", + text2 = "pyutest-heart-empty.png", number = core.PLAYER_MAX_HP_DEFAULT, item = core.PLAYER_MAX_HP_DEFAULT, }, function (idx, player) @@ -60,7 +61,8 @@ if enable_damage then end) PyuTest.Hudbar:add("breath", { - text = "pyutest-bar-breath.png", + text = "pyutest-bubble.png", + text2 = "pyutest-bubble-empty.png", number = core.PLAYER_MAX_BREATH_DEFAULT, item = core.PLAYER_MAX_BREATH_DEFAULT, }, function (idx, player) diff --git a/textures/pyutest-bubble-empty.png b/textures/pyutest-bubble-empty.png new file mode 100644 index 0000000..a4185ec Binary files /dev/null and b/textures/pyutest-bubble-empty.png differ diff --git a/textures/pyutest-bubble.png b/textures/pyutest-bubble.png new file mode 100644 index 0000000..8b712bf Binary files /dev/null and b/textures/pyutest-bubble.png differ diff --git a/textures/pyutest-heart-empty.png b/textures/pyutest-heart-empty.png new file mode 100644 index 0000000..67aeb93 Binary files /dev/null and b/textures/pyutest-heart-empty.png differ diff --git a/textures/pyutest-heart.png b/textures/pyutest-heart.png new file mode 100644 index 0000000..06fc732 Binary files /dev/null and b/textures/pyutest-heart.png differ diff --git a/textures/pyutest-pig.png b/textures/pyutest-pig.png index 6cb810f..24f355b 100644 Binary files a/textures/pyutest-pig.png and b/textures/pyutest-pig.png differ