Add kneeling bench

This commit is contained in:
Thomas--S 2021-03-20 11:56:41 +01:00
parent d6a34f398f
commit 3efb796721
2 changed files with 22 additions and 0 deletions

View File

@ -3,6 +3,7 @@ ts_furniture = {}
-- If true, you can sit on chairs and benches, when right-click them. -- If true, you can sit on chairs and benches, when right-click them.
ts_furniture.enable_sitting = minetest.settings:get_bool("ts_furniture.enable_sitting", true) ts_furniture.enable_sitting = minetest.settings:get_bool("ts_furniture.enable_sitting", true)
ts_furniture.globalstep = minetest.settings:get_bool("ts_furniture.globalstep", true) ts_furniture.globalstep = minetest.settings:get_bool("ts_furniture.globalstep", true)
ts_furniture.kneeling_bench = minetest.settings:get_bool("ts_furniture.kneeling_bench", false)
-- Used for localization -- Used for localization
local S = minetest.get_translator("ts_furniture") local S = minetest.get_translator("ts_furniture")
@ -147,6 +148,26 @@ local furnitures = {
} }
} }
if ts_furniture.kneeling_bench then
furnitures.kneeling_bench = {
description = "Kneeling Bench",
nodebox = {
{ -0.5, -0.5, 0.4, 0.5, 0.5, 0.5 },
{ -0.4, -0.5, -0.2, -0.3, -0.3, 0.5 },
{ 0.3, -0.5, -0.2, 0.4, -0.3, 0.5 },
{ -0.5, -0.3, -0.2, 0.5, -0.2, 0.2},
{ -0.5, 0.4, 0.15, 0.5, 0.5, 0.55},
},
craft = function(recipe)
local bench_name = "ts_furniture:" .. recipe:gsub(":", "_") .. "_bench"
return {
{ recipe, "" },
{ recipe, bench_name }
}
end
}
end
local ignore_groups = { local ignore_groups = {
["wood"] = true, ["wood"] = true,
["stone"] = true ["stone"] = true

View File

@ -1,2 +1,3 @@
ts_furniture.enable_sitting (Enable sitting) bool true ts_furniture.enable_sitting (Enable sitting) bool true
ts_furniture.globalstep (Enable globalstep) bool true ts_furniture.globalstep (Enable globalstep) bool true
ts_furniture.kneeling_bench (Enable kneeling benches) bool false