Pigs now spawn naturally, new hudbar textures, and add healing information to foods

This commit is contained in:
IamPyu 2024-12-07 15:47:51 -06:00
parent f3acc9a3dc
commit 274c8f1261
9 changed files with 18 additions and 5 deletions

View File

@ -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:

View File

@ -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" },

View File

@ -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)

View File

@ -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)

Binary file not shown.

After

Width:  |  Height:  |  Size: 145 B

BIN
textures/pyutest-bubble.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 163 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 162 B

BIN
textures/pyutest-heart.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 187 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 676 B

After

Width:  |  Height:  |  Size: 668 B