Skip to content
Snippets Groups Projects
Commit aafe31c1 authored by 12Me21's avatar 12Me21 Committed by Paramat
Browse files

Stairs: Safer slab name check

Before, it checked if the node name *contained* "stairs:slab_", which could detect
things like "xxxxxstairs:slab_xxxx". Changed the pattern to "^stairs:slab_".
parent ef20f9e1
Branches
No related tags found
No related merge requests found
......@@ -185,7 +185,7 @@ function stairs.register_slab(subname, recipeitem, groups, images, description,
local creative_enabled = (creative and creative.is_enabled_for
and creative.is_enabled_for(player_name))
if under and under.name:find("stairs:slab_") then
if under and under.name:find("^stairs:slab_") then
-- place slab using under node orientation
local dir = minetest.dir_to_facedir(vector.subtract(
pointed_thing.above, pointed_thing.under), true)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment