Summoning refinements / QOL easing

- Allow "air equivalent" nodes (e.g. scaling
  and light sources) in the target area.  Players
  can now use torches during summon.
- Summon "sparkles" emit light to help player
  navigate to an exit.
master
Aaron Suen 2020-05-31 16:08:35 -04:00
parent be3fa4a390
commit a8321a4dd1
3 changed files with 8 additions and 6 deletions

View File

@ -73,8 +73,7 @@ minetest.register_chatcommand("exmachina_summon", {
for x = minpos.x, maxpos.x do
for y = minpos.y, maxpos.y do
for z = minpos.z, maxpos.z do
if minetest.get_node({x = x, y = y, z = z}).name
~= "air" then
if not (minetest.registered_nodes[minetest.get_node({x = x, y = y, z = z}).name] or {}).air_equivalent then
return false, "Area not fully cleared"
end
end

View File

@ -36,6 +36,7 @@ minetest.register_node(modname .. ":field", {
backface_culling = false
}},
paramtype = "light",
light_source = 3,
sunlight_propagates = true,
walkable = false,
pointable = false,

View File

@ -82,16 +82,18 @@ local function mkcraftnodes(key)
return data
end
local aireq = {air_equivalent = true}
exmachina.craftnodes_summon = mkcraftnodes({
_ = "air",
c = "air",
_ = aireq,
c = aireq,
x = "nc_tree:eggcorn",
f = "air",
f = aireq,
e = "nc_tree:eggcorn",
})
exmachina.craftnodes_banish = mkcraftnodes({
_ = "air",
_ = aireq,
c = "nc_terrain:cobble",
x = modname .. ":core",
f = modname .. ":frame",