forked from nalc/homedecor_modpack
Fix screwdriver variables
This commit is contained in:
parent
f1db5635f5
commit
f1dca4e990
@ -1,4 +1,5 @@
|
|||||||
computer = { }
|
computer = {}
|
||||||
|
screwdriver = screwdriver or {}
|
||||||
|
|
||||||
computer.register = function (name, def)
|
computer.register = function (name, def)
|
||||||
local nodename = name
|
local nodename = name
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
screwdriver = screwdriver or {}
|
||||||
|
|
||||||
local function start_smoke(pos, node, clicker, chimney)
|
local function start_smoke(pos, node, clicker, chimney)
|
||||||
local this_spawner_meta = minetest.get_meta(pos)
|
local this_spawner_meta = minetest.get_meta(pos)
|
||||||
local id = this_spawner_meta:get_int("smoky")
|
local id = this_spawner_meta:get_int("smoky")
|
||||||
|
@ -99,7 +99,7 @@ function homedecor.find_ceiling(itemstack, placer, pointed_thing)
|
|||||||
return isceiling, pos
|
return isceiling, pos
|
||||||
end
|
end
|
||||||
|
|
||||||
if screwdriver == nil then screwdriver = {} end
|
screwdriver = screwdriver or {}
|
||||||
|
|
||||||
homedecor.plain_wood = "homedecor_generic_wood_plain.png^"..
|
homedecor.plain_wood = "homedecor_generic_wood_plain.png^"..
|
||||||
"(homedecor_generic_wood_boards_overlay.png^[colorize:#a7682020:100)"
|
"(homedecor_generic_wood_boards_overlay.png^[colorize:#a7682020:100)"
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
local inbox = {}
|
local inbox = {}
|
||||||
|
screwdriver = screwdriver or {}
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output ="inbox:empty",
|
output ="inbox:empty",
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
local tmp = {}
|
local tmp = {}
|
||||||
|
screwdriver = screwdriver or {}
|
||||||
|
|
||||||
minetest.register_entity("itemframes:item",{
|
minetest.register_entity("itemframes:item",{
|
||||||
hp_max = 1,
|
hp_max = 1,
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
lrfurn = {}
|
lrfurn = {}
|
||||||
|
screwdriver = screwdriver or {}
|
||||||
|
|
||||||
lrfurn.fdir_to_fwd = {
|
lrfurn.fdir_to_fwd = {
|
||||||
{ 0, 1 },
|
{ 0, 1 },
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
screwdriver = screwdriver or {}
|
||||||
|
|
||||||
minetest.register_node("plasmascreen:stand", {
|
minetest.register_node("plasmascreen:stand", {
|
||||||
description = "Plasma Screen TV Stand",
|
description = "Plasma Screen TV Stand",
|
||||||
tiles = {"plasmascreen_back.png"},
|
tiles = {"plasmascreen_back.png"},
|
||||||
@ -142,6 +144,7 @@ minetest.register_node("plasmascreen:tv_off", {
|
|||||||
light_source = 10,
|
light_source = 10,
|
||||||
selection_box = tv_cbox,
|
selection_box = tv_cbox,
|
||||||
collision_box = tv_cbox,
|
collision_box = tv_cbox,
|
||||||
|
on_rotate = screwdriver.disallow,
|
||||||
groups = {snappy=1, choppy=2, oddly_breakable_by_hand=2, not_in_creative_inventory=1},
|
groups = {snappy=1, choppy=2, oddly_breakable_by_hand=2, not_in_creative_inventory=1},
|
||||||
after_place_node = function(pos, placer, itemstack)
|
after_place_node = function(pos, placer, itemstack)
|
||||||
if not checkwall(pos) then
|
if not checkwall(pos) then
|
||||||
|
@ -11,12 +11,12 @@
|
|||||||
-- }
|
-- }
|
||||||
|
|
||||||
signs_lib = {}
|
signs_lib = {}
|
||||||
|
screwdriver = screwdriver or {}
|
||||||
|
|
||||||
local screwdriver = screwdriver or {}
|
|
||||||
signs_lib.wallmounted_rotate = function(pos, node, user, mode, new_param2)
|
signs_lib.wallmounted_rotate = function(pos, node, user, mode, new_param2)
|
||||||
if mode ~= screwdriver.ROTATE_AXIS then return false end
|
if mode ~= screwdriver.ROTATE_AXIS then return false end
|
||||||
minetest.swap_node(pos, {name = node.name, param2 = (node.param2 + 1) % 6})
|
minetest.swap_node(pos, {name = node.name, param2 = (node.param2 + 1) % 6})
|
||||||
for _, v in ipairs(minetest.get_objects_inside_radius(pos, 0.5)) do
|
for _, v in ipairs(minetest.get_objects_inside_radius(pos, 0.5)) do
|
||||||
local e = v:get_luaentity()
|
local e = v:get_luaentity()
|
||||||
if e and e.name == "signs:text" then
|
if e and e.name == "signs:text" then
|
||||||
v:remove()
|
v:remove()
|
||||||
|
Loading…
Reference in New Issue
Block a user