Various different changes

This commit is contained in:
IamPyu 2024-11-01 23:10:36 -06:00
parent 2301679757
commit 5d2866ddf2
6 changed files with 44 additions and 6 deletions

View File

@ -28,6 +28,9 @@
- Added Calcite
- Added Pumpkins
- Removed Frying Pans, why did I even add them for cooking food when we can just use furnaces?
- Since obsidian in real life is not that strong, make obsidian the same level as stone
- Added ability to delete homes with `/deletehome`
- Added a way to duplicate grass by combining it with dirt
- A lot of other changes that I forgot to document
## [Oct 19th 2024] Bugfix Update

View File

@ -92,7 +92,7 @@ PyuTest.node_beside_group = function(pos, group)
return false
end
PyuTest.create_explosion = function (pos, range, rm_pos, dmg)
PyuTest.create_explosion = function (pos, range, rm_pos, dmg, damage_whitelist)
if rm_pos then
minetest.remove_node(pos)
end
@ -109,9 +109,28 @@ PyuTest.create_explosion = function (pos, range, rm_pos, dmg)
end)
for _, v in pairs(minetest.get_objects_inside_radius(pos, range)) do
v:punch(v, nil, {
damage_groups = {fleshy = dmg}
}, nil)
local function damage()
v:punch(v, nil, {
damage_groups = {fleshy = dmg}
}, nil)
end
if damage_whitelist ~= nil then
local unsafe = true
for _, v2 in pairs(damage_whitelist) do
if v == v2 then
unsafe = false
break
end
end
if unsafe then
damage()
end
else
damage()
end
end

View File

@ -172,7 +172,7 @@ PyuTest.make_building_blocks("pyutest_blocks:basalt", "Basalt", { "pyutest-basal
}, { is_ground_content = false })
PyuTest.make_building_blocks("pyutest_blocks:obsidian", "Obsidian", { "pyutest-obsidian.png" }, nil, {
cracky = PyuTest.BLOCK_SLOW,
cracky = PyuTest.BLOCK_NORMAL,
}, { is_ground_content = false })
PyuTest.make_building_blocks("pyutest_blocks:crystal_lantern", "Crystal Lantern", { "pyutest-crystal-lantern.png" }, nil, {

View File

@ -20,6 +20,13 @@ PyuTest.make_grass = function (name, desc, groups, color, ttex, stex, dtex, econ
})
minetest.override_item(name.."_block", econf or {})
minetest.register_craft({
output = name.."_block 2",
recipe = {
name.."_block", "pyutest_blocks:dirt_block"
},
type = "shapeless"
})
end
PyuTest.make_grass("pyutest_grass:grass", "Grass", {

View File

@ -33,7 +33,8 @@ PyuTest.make_spellbook = function (nsname, desc, color, craftitem, action)
end
PyuTest.make_spellbook("pyutest_magic:explosions_spellbook", "Spellbook of Explosions", "gray", "pyutest_tools:bomb", function (itemstack, user)
PyuTest.create_explosion(user:get_pos(), 3, false, 7, user)
PyuTest.create_explosion(user:get_pos(), 3, false, 7, {user})
end)
PyuTest.make_spellbook("pyutest_magic:fire_spellbook", "Spellbook of Fire", "crimson", "pyutest_blocks:magma", function (itemstack, user)

View File

@ -45,6 +45,14 @@ minetest.register_chatcommand("listhomes", {
end
})
minetest.register_chatcommand("deletehome", {
description = "Delete a home",
func = function (name, param)
homes[name][param] = nil
return true, string.format("Home `%s` has been deleted", param)
end
})
local function save_data()
storage:set_string("player_homes", minetest.serialize(homes))
end