Definitively block placing shelves/totes inside shelves.

This commit is contained in:
Aaron Suen 2019-03-02 21:41:25 -05:00
parent 98b235511c
commit 5a83a15b48
5 changed files with 22 additions and 10 deletions

View File

@ -56,6 +56,14 @@ NEW CONTENT
------------------------------------------------------------------------
USABILITY
- Update README.
- Add "gameplay basics"
- Crafting in-world
- Pummeling
- Sensitivity to which node face
- Check inventory screen for hints
- Installation guide?
- Hint system updates.
- Need a "witness" system for spontaneous in-world processes,
such as tree growth or lode cooling. Credit players within
@ -66,7 +74,6 @@ USABILITY
- Social features
- Randomize player appearance/colors.
- Players show damage on texture?
- Players show wielditem on texture or floating ent?
------------------------------------------------------------------------

View File

@ -3,16 +3,9 @@ ROADMAP (SHORT-TERM)
------------------------------------------------------------------------
- Fix bug allowing totes to be placed into shelves.
- Update README.
- Add "gameplay basics"
- Crafting in-world
- Pummeling
- Sensitivity to which node face
- Check inventory screen for hints
- Installation guide?
- Digital logic + lighting via optics.
- Mirrors
- Change light angle
- Mirrors or Lenses
- Change light angle?
- Focus sunlight?
- Prism Node
- 1 face (back) is VCC face, must be fed light to do anything.

View File

@ -16,6 +16,13 @@ function nodecore.stack_set(pos, stack)
end
function nodecore.stack_add(pos, stack)
local node = minetest.get_node(pos)
local def = minetest.registered_items[node.name]
if def and def.stack_allow then
local ret = def.stack_allow(pos, node, stack, def)
if ret == false then return stack end
if ret and ret ~= true then return ret end
end
return nodecore.node_inv(pos):add_item("solo", ItemStack(stack))
end

View File

@ -111,6 +111,7 @@ minetest.register_node(modname .. ":handle", {
},
groups = {
snappy = 1,
container = 1,
fire_fuel = 5
},
after_dig_node = totedug,

View File

@ -30,6 +30,7 @@ minetest.register_node(modname .. ":shelf", {
flammable = 2,
fire_fuel = 3,
eject_inv_on_burn = 1,
container = 1,
totable = 1
},
paramtype = "light",
@ -57,6 +58,9 @@ minetest.register_node(modname .. ":shelf", {
if nodecore.stack_giveto(pos, digger) then
return minetest.node_dig(pos, node, digger, ...)
end
end,
stack_allow = function(pos, node, stack, def)
if def and def.groups and def.groups.container then return false end
end
})