From 8555f75acc050f29508d88f1e57159f79cb948d1 Mon Sep 17 00:00:00 2001 From: Vanessa Dannenberg Date: Mon, 1 Apr 2019 19:38:47 -0400 Subject: update blox, castles, cottages, technic, farming_redo, gloopblocks, homedecor, led_marquee, locks, maptools, mesecons, plantlife, moreblocks, nixie_tubes, replacer, travelnet, and unified inventory --- cottages/init.lua | 2 ++ cottages/nodes_feldweg.lua | 8 +++++++- cottages/nodes_furniture.lua | 10 +++++----- cottages/nodes_pitchfork.lua | 8 ++++---- cottages/nodes_water.lua | 3 ++- 5 files changed, 20 insertions(+), 11 deletions(-) (limited to 'cottages') diff --git a/cottages/init.lua b/cottages/init.lua index b6c412b..3874218 100644 --- a/cottages/init.lua +++ b/cottages/init.lua @@ -4,6 +4,8 @@ -- License: GPLv3 -- -- Modified: +-- 11.03.19 Adjustments for MT 5.x +-- cottages_feldweg_mode is now a setting in minetest.conf -- 27.07.15 Moved into its own repository. -- Made sure textures and craft receipe indigrents are available or can be replaced. -- Took care of "unregistered globals" warnings. diff --git a/cottages/nodes_feldweg.lua b/cottages/nodes_feldweg.lua index d81cc02..9205952 100644 --- a/cottages/nodes_feldweg.lua +++ b/cottages/nodes_feldweg.lua @@ -15,8 +15,14 @@ local S = cottages.S -- * flat: each node is a full node; junction, t-junction and corner are included -- * nodebox: like flat - except that each node has a nodebox that fits to that road node -- * mesh: like nodebox - except that it uses a nice roundish model -if( not( cottages_feldweg_mode )) then +local cottages_feldweg_mode = minetest.settings:get("cottages_feldweg_mode") +if( cottages_feldweg_mode ~= "mesh" + and cottages_feldweg_mode ~= "flat" + and cottages_feldweg_mode ~= "nodebox" + and cottages_feldweg_mode ~= "flat") then cottages_feldweg_mode = "mesh"; + -- add the setting to the minetest.conf so that the player can set it there + minetest.settings:set("cottages_feldweg_mode", "mesh") end local function register_recipes(include_end) diff --git a/cottages/nodes_furniture.lua b/cottages/nodes_furniture.lua index 5705c76..65e229d 100644 --- a/cottages/nodes_furniture.lua +++ b/cottages/nodes_furniture.lua @@ -393,7 +393,7 @@ cottages.sit_on_bench = function( pos, node, clicker, itemstack, pointed_thing ) if( animation and animation.animation=="sit") then default.player_attached[pname] = false - clicker:setpos({x=pos.x,y=pos.y-0.5,z=pos.z}) + clicker:set_pos({x=pos.x,y=pos.y-0.5,z=pos.z}) clicker:set_eye_offset({x=0,y=0,z=0}, {x=0,y=0,z=0}) clicker:set_physics_override(1, 1, 1) default.player_set_animation(clicker, "stand", 30) @@ -411,7 +411,7 @@ cottages.sit_on_bench = function( pos, node, clicker, itemstack, pointed_thing ) end clicker:set_eye_offset({x=0,y=-7,z=2}, {x=0,y=0,z=0}) - clicker:setpos( p2 ) + clicker:set_pos( p2 ) default.player_set_animation(clicker, "sit", 30) clicker:set_physics_override(0, 0, 0) default.player_attached[pname] = true @@ -441,7 +441,7 @@ cottages.sleep_in_bed = function( pos, node, clicker, itemstack, pointed_thing ) -- let players get back up if( animation and animation.animation=="lay" ) then default.player_attached[pname] = false - clicker:setpos({x=pos.x,y=pos.y-0.5,z=pos.z}) + clicker:set_pos({x=pos.x,y=pos.y-0.5,z=pos.z}) clicker:set_eye_offset({x=0,y=0,z=0}, {x=0,y=0,z=0}) clicker:set_physics_override(1, 1, 1) default.player_set_animation(clicker, "stand", 30) @@ -542,7 +542,7 @@ cottages.sleep_in_bed = function( pos, node, clicker, itemstack, pointed_thing ) -- no sleeping on this place else default.player_attached[pname] = false - clicker:setpos({x=pos.x,y=pos.y-0.5,z=pos.z}) + clicker:set_pos({x=pos.x,y=pos.y-0.5,z=pos.z}) clicker:set_eye_offset({x=0,y=0,z=0}, {x=0,y=0,z=0}) clicker:set_physics_override(1, 1, 1) default.player_set_animation(clicker, "stand", 30) @@ -553,7 +553,7 @@ cottages.sleep_in_bed = function( pos, node, clicker, itemstack, pointed_thing ) clicker:set_eye_offset({x=0,y=-7,z=2}, {x=0,y=0,z=0}) - clicker:setpos( p ); + clicker:set_pos( p ); default.player_set_animation(clicker, new_animation, 30) clicker:set_physics_override(0, 0, 0) default.player_attached[pname] = true diff --git a/cottages/nodes_pitchfork.lua b/cottages/nodes_pitchfork.lua index 666393a..8e0cad9 100644 --- a/cottages/nodes_pitchfork.lua +++ b/cottages/nodes_pitchfork.lua @@ -30,9 +30,9 @@ minetest.register_tool("cottages:pitchfork", { full_punch_interval = 1.0, max_drop_level=1, groupcaps={ - fleshy={times={[2]=0.80, [3]=0.40}, maxwear=0.05, maxlevel=1, uses=40}, - snappy={times={[2]=0.80, [3]=0.40}, maxwear=0.05, maxlevel=1, uses=40}, - hay ={times={[2]=0.10, [3]=0.10}, maxwear=0.05, maxlevel=1, uses=40}, + fleshy={times={[2]=0.80, [3]=0.40}, maxlevel=1, uses=1/0.002 }, + snappy={times={[2]=0.80, [3]=0.40}, maxlevel=1, uses=1/0.002 }, + hay ={times={[2]=0.10, [3]=0.10}, maxlevel=1, uses=1/0.002 }, }, damage_groups = {fleshy=5}, -- slightly stronger than a stone sword }, @@ -73,7 +73,7 @@ minetest.register_node("cottages:pitchfork_placed", { paramtype = "light", paramtype2 = "facedir", is_ground_content = false, - groups = {snappy = 2, dig_immediate = 3, falling_node = 1, attached_node = 1}, + groups = {snappy = 2, dig_immediate = 3, falling_node = 1, attached_node = 1, not_in_creative_inventory=1}, sounds = cottages.sounds.wood, node_box = { type = "fixed", diff --git a/cottages/nodes_water.lua b/cottages/nodes_water.lua index c2bb118..44e4119 100644 --- a/cottages/nodes_water.lua +++ b/cottages/nodes_water.lua @@ -202,7 +202,8 @@ minetest.register_node("cottages:water_gen", { return stack:get_count() end, allow_metadata_inventory_take = function(pos, listname, index, stack, player) - if not(cottages.player_can_use(meta:get_string(pos), player)) then + local meta = minetest.get_meta(pos) + if not(cottages.player_can_use(meta, player)) then return 0 end return stack:get_count() -- cgit v1.2.3