diff options
-rw-r--r-- | mesecons/settings.lua | 6 | ||||
-rw-r--r-- | mesecons_extrawires/corner.lua | 4 | ||||
-rw-r--r-- | mesecons_extrawires/depends.txt | 1 | ||||
-rw-r--r-- | mesecons_extrawires/tjunction.lua | 4 | ||||
-rw-r--r-- | mesecons_insulated/depends.txt | 1 | ||||
-rw-r--r-- | mesecons_insulated/init.lua | 4 | ||||
-rw-r--r-- | mesecons_mvps/init.lua | 2 | ||||
-rw-r--r-- | screenshot.png | bin | 0 -> 184513 bytes |
8 files changed, 18 insertions, 4 deletions
diff --git a/mesecons/settings.lua b/mesecons/settings.lua index 1ebbfde..0220707 100644 --- a/mesecons/settings.lua +++ b/mesecons/settings.lua @@ -1,15 +1,15 @@ -- SETTINGS function mesecon.setting(setting, default) if type(default) == "boolean" then - local read = minetest.setting_getbool("mesecon."..setting) + local read = minetest.settings:get_bool("mesecon."..setting) if read == nil then return default else return read end elseif type(default) == "string" then - return minetest.setting_get("mesecon."..setting) or default + return minetest.settings:get("mesecon."..setting) or default elseif type(default) == "number" then - return tonumber(minetest.setting_get("mesecon."..setting) or default) + return tonumber(minetest.settings:get("mesecon."..setting) or default) end end diff --git a/mesecons_extrawires/corner.lua b/mesecons_extrawires/corner.lua index 830ea4c..d0b01f9 100644 --- a/mesecons_extrawires/corner.lua +++ b/mesecons_extrawires/corner.lua @@ -1,3 +1,5 @@ +local screwdriver_exists = minetest.global_exists("screwdriver") + local corner_nodebox = { type = "fixed", fixed = {{ -16/32-0.001, -17/32, -3/32, 0, -13/32, 3/32 }, @@ -48,6 +50,7 @@ minetest.register_node("mesecons_extrawires:corner_on", { offstate = "mesecons_extrawires:corner_off" }}, on_blast = mesecon.on_blastnode, + on_rotate = screwdriver_exists and screwdriver.rotate_simple, }) minetest.register_node("mesecons_extrawires:corner_off", { @@ -77,6 +80,7 @@ minetest.register_node("mesecons_extrawires:corner_off", { onstate = "mesecons_extrawires:corner_on" }}, on_blast = mesecon.on_blastnode, + on_rotate = screwdriver_exists and screwdriver.rotate_simple, }) minetest.register_craft({ diff --git a/mesecons_extrawires/depends.txt b/mesecons_extrawires/depends.txt index aca967d..369aeb7 100644 --- a/mesecons_extrawires/depends.txt +++ b/mesecons_extrawires/depends.txt @@ -1,2 +1,3 @@ default mesecons +screwdriver? diff --git a/mesecons_extrawires/tjunction.lua b/mesecons_extrawires/tjunction.lua index a30afb9..e98b066 100644 --- a/mesecons_extrawires/tjunction.lua +++ b/mesecons_extrawires/tjunction.lua @@ -1,3 +1,5 @@ +local screwdriver_exists = minetest.global_exists("screwdriver") + local tjunction_nodebox = { type = "fixed", fixed = {{ -16/32-0.001, -17/32, -3/32, 16/32+0.001, -13/32, 3/32 }, @@ -49,6 +51,7 @@ minetest.register_node("mesecons_extrawires:tjunction_on", { offstate = "mesecons_extrawires:tjunction_off" }}, on_blast = mesecon.on_blastnode, + on_rotate = screwdriver_exists and screwdriver.rotate_simple, }) minetest.register_node("mesecons_extrawires:tjunction_off", { @@ -78,6 +81,7 @@ minetest.register_node("mesecons_extrawires:tjunction_off", { onstate = "mesecons_extrawires:tjunction_on" }}, on_blast = mesecon.on_blastnode, + on_rotate = screwdriver_exists and screwdriver.rotate_simple, }) minetest.register_craft({ diff --git a/mesecons_insulated/depends.txt b/mesecons_insulated/depends.txt index acaa924..a0ba1ef 100644 --- a/mesecons_insulated/depends.txt +++ b/mesecons_insulated/depends.txt @@ -1 +1,2 @@ mesecons +screwdriver? diff --git a/mesecons_insulated/init.lua b/mesecons_insulated/init.lua index 8355be4..b917323 100644 --- a/mesecons_insulated/init.lua +++ b/mesecons_insulated/init.lua @@ -1,3 +1,5 @@ +local screwdriver_exists = minetest.global_exists("screwdriver") + local function insulated_wire_get_rules(node) local rules = {{x = 1, y = 0, z = 0}, {x =-1, y = 0, z = 0}} @@ -40,6 +42,7 @@ minetest.register_node("mesecons_insulated:insulated_on", { rules = insulated_wire_get_rules }}, on_blast = mesecon.on_blastnode, + on_rotate = screwdriver_exists and screwdriver.rotate_simple, }) minetest.register_node("mesecons_insulated:insulated_off", { @@ -74,6 +77,7 @@ minetest.register_node("mesecons_insulated:insulated_off", { rules = insulated_wire_get_rules }}, on_blast = mesecon.on_blastnode, + on_rotate = screwdriver_exists and screwdriver.rotate_simple, }) minetest.register_craft({ diff --git a/mesecons_mvps/init.lua b/mesecons_mvps/init.lua index c53946d..428c78a 100644 --- a/mesecons_mvps/init.lua +++ b/mesecons_mvps/init.lua @@ -219,7 +219,7 @@ function mesecon.mvps_move_objects(pos, dir, nodestack, movefactor) movefactor = movefactor or 1 dir = vector.multiply(dir, movefactor) for id, obj in pairs(minetest.object_refs) do - local obj_pos = obj:get_pos() + local obj_pos = obj:getpos() local cbox = obj:get_properties().collisionbox local min_pos = vector.add(obj_pos, vector.new(cbox[1], cbox[2], cbox[3])) local max_pos = vector.add(obj_pos, vector.new(cbox[4], cbox[5], cbox[6])) diff --git a/screenshot.png b/screenshot.png Binary files differnew file mode 100644 index 0000000..6f1bae5 --- /dev/null +++ b/screenshot.png |