diff options
author | Vanessa Dannenberg <vanessa.e.dannenberg@gmail.com> | 2018-06-23 17:26:11 -0400 |
---|---|---|
committer | Vanessa Dannenberg <vanessa.e.dannenberg@gmail.com> | 2018-06-23 17:26:11 -0400 |
commit | 2a6246016b9272e7fecd82846e138810c87f06b4 (patch) | |
tree | d7b4e2a8d8d5ce2807eaab7eea5bb762a8db99f1 /homedecor | |
parent | cd9258383449f9065f486100ae6e8cab4a30ec48 (diff) | |
download | dreambuilder_modpack-2a6246016b9272e7fecd82846e138810c87f06b4.tar dreambuilder_modpack-2a6246016b9272e7fecd82846e138810c87f06b4.tar.gz dreambuilder_modpack-2a6246016b9272e7fecd82846e138810c87f06b4.tar.bz2 dreambuilder_modpack-2a6246016b9272e7fecd82846e138810c87f06b4.tar.xz dreambuilder_modpack-2a6246016b9272e7fecd82846e138810c87f06b4.zip |
update currency, homedecor, unified inventory
Diffstat (limited to 'homedecor')
-rw-r--r-- | homedecor/climate-control.lua | 1 | ||||
-rw-r--r-- | homedecor/crafts.lua | 36 | ||||
-rw-r--r-- | homedecor/furniture.lua | 2 | ||||
-rw-r--r-- | homedecor/furniture_recipes.lua | 18 | ||||
-rw-r--r-- | homedecor/handlers/mt_game_beds_functions.lua | 13 | ||||
-rw-r--r-- | homedecor/handlers/water_particles.lua | 8 | ||||
-rw-r--r-- | homedecor/init.lua | 4 |
7 files changed, 55 insertions, 27 deletions
diff --git a/homedecor/climate-control.lua b/homedecor/climate-control.lua index b47960d..412fedf 100644 --- a/homedecor/climate-control.lua +++ b/homedecor/climate-control.lua @@ -25,7 +25,6 @@ minetest.register_entity("homedecor:mesh_desk_fan", { }) local add_mesh_desk_fan_entity = function(pos) - print("in add_mesh_desk_fan_entity()") local param2 = minetest.get_node(pos).param2 local entity = minetest.add_entity(pos, "homedecor:mesh_desk_fan") if param2 == 0 then diff --git a/homedecor/crafts.lua b/homedecor/crafts.lua index e59fc2d..69616de 100644 --- a/homedecor/crafts.lua +++ b/homedecor/crafts.lua @@ -2950,23 +2950,29 @@ minetest.register_craft({ }, }) -minetest.register_craft({ - type = "shapeless", - output = "homedecor:coin 5", - recipe = {"moreblocks:micro_goldblock_1", "default:sword_stone"} -}) +if minetest.settings:get_bool("homedecor.disable_coin_crafting") == false then + minetest.register_craft({ + type = "shapeless", + output = "homedecor:coin 5", + recipe = {"moreblocks:micro_goldblock_1", "default:sword_stone"} + }) -minetest.register_craft({ - type = "shapeless", - output = "homedecor:coin 15", - recipe = {"default:gold_ingot", "default:sword_steel"} -}) + minetest.register_craft({ + type = "shapeless", + output = "homedecor:coin 15", + recipe = {"default:gold_ingot", "default:sword_steel"} + }) -minetest.register_craft({ - type = "shapeless", - output = "homedecor:coin 50", - recipe = {"default:goldblock", "default:sword_mese"} -}) + minetest.register_craft({ + type = "shapeless", + output = "homedecor:coin 50", + recipe = {"default:goldblock", "default:sword_mese"} + }) +else + if minetest.settings:get("log_mods") then + minetest.log("[HomeDecor] " .. S("coin crafting is disabled!")) + end +end minetest.register_craft({ output = "homedecor:lattice_wood 8", diff --git a/homedecor/furniture.lua b/homedecor/furniture.lua index 37cca25..6c4526c 100644 --- a/homedecor/furniture.lua +++ b/homedecor/furniture.lua @@ -235,8 +235,6 @@ minetest.register_lbm({ local param2 = paletteidx + new_fdir local newname = "homedecor:armchair" - print(name, dump(a), dump(b), dump(color).."("..dump(paletteidx)..")", dump(param2)) - if node.name == "homedecor:chair" then newname = "homedecor:kitchen_chair_wood" elseif string.find(node.name, "homedecor:chair_") then diff --git a/homedecor/furniture_recipes.lua b/homedecor/furniture_recipes.lua index c8f3bca..fea13cf 100644 --- a/homedecor/furniture_recipes.lua +++ b/homedecor/furniture_recipes.lua @@ -131,6 +131,24 @@ minetest.register_craft({ }) minetest.register_craft({ + output = "homedecor:table_lamp_off", + recipe = { + { "wool:white", "default:torch", "wool:white"}, + { "", "group:stick", ""}, + { "", "moreblocks:slab_wood", "" }, + }, +}) + +minetest.register_craft({ + output = "homedecor:table_lamp_off", + recipe = { + { "cottages:wool", "default:torch", "cottages:wool"}, + { "", "group:stick", ""}, + { "", "moreblocks:slab_wood", "" }, + }, +}) + +minetest.register_craft({ output = "homedecor:standing_lamp_off", recipe = { { "homedecor:table_lamp_off"}, diff --git a/homedecor/handlers/mt_game_beds_functions.lua b/homedecor/handlers/mt_game_beds_functions.lua index eafad93..8c93763 100644 --- a/homedecor/handlers/mt_game_beds_functions.lua +++ b/homedecor/handlers/mt_game_beds_functions.lua @@ -2,7 +2,6 @@ -- with changes needed for homedecor's beds. local pi = math.pi -local player_in_bed = 0 local is_sp = minetest.is_singleplayer() local enable_respawn = minetest.settings:get_bool("enable_bed_respawn") if enable_respawn == nil then @@ -49,6 +48,14 @@ local function check_in_beds(players) return #players > 0 end +local function get_player_in_bed() + local player_in_bed = 0 + for k,v in pairs(beds.player) do + player_in_bed = player_in_bed + 1 + end + return player_in_bed +end + local function lay_down(player, pos, bed_pos, state, skip) local name = player:get_player_name() local hud_flags = player:hud_get_flags() @@ -62,7 +69,6 @@ local function lay_down(player, pos, bed_pos, state, skip) local p = beds.pos[name] or nil if beds.player[name] ~= nil then beds.player[name] = nil - player_in_bed = player_in_bed - 1 end -- skip here to prevent sending player specific changes (used for leaving players) if skip then @@ -84,8 +90,6 @@ local function lay_down(player, pos, bed_pos, state, skip) else beds.player[name] = 1 beds.pos[name] = pos - player_in_bed = player_in_bed + 1 - -- physics, eye_offset, etc player:set_eye_offset({x = 0, y = -13, z = 0}, {x = 0, y = 0, z = 0}) local yaw, fdir = get_look_yaw(bed_pos) @@ -109,6 +113,7 @@ end local function update_formspecs(finished) local ges = #minetest.get_connected_players() + local player_in_bed = get_player_in_bed() local form_n local is_majority = (ges / 2) < player_in_bed diff --git a/homedecor/handlers/water_particles.lua b/homedecor/handlers/water_particles.lua index c514e9a..d318d58 100644 --- a/homedecor/handlers/water_particles.lua +++ b/homedecor/handlers/water_particles.lua @@ -30,8 +30,8 @@ function homedecor.start_particle_spawner(pos, node, particledef, soundname) end, s_handle) end minetest.delete_particlespawner(id) - this_spawner_meta:set_int("active", nil) - this_spawner_meta:set_int("sound", nil) + this_spawner_meta:set_int("active", 0) + this_spawner_meta:set_int("sound", 0) return end @@ -109,6 +109,6 @@ function homedecor.stop_particle_spawner(pos) end, s_handle) end - this_spawner_meta:set_int("active", nil) - this_spawner_meta:set_int("sound", nil) + this_spawner_meta:set_int("active", 0) + this_spawner_meta:set_int("sound", 0) end diff --git a/homedecor/init.lua b/homedecor/init.lua index e38cd81..1b54359 100644 --- a/homedecor/init.lua +++ b/homedecor/init.lua @@ -119,4 +119,6 @@ dofile(modpath.."/wardrobe.lua") dofile(modpath.."/crafts.lua") -print("[HomeDecor] " .. S("Loaded!")) +if minetest.settings:get_bool("log_mod") then + minetest.log("action", "[HomeDecor] " .. S("Loaded!")) +end |