2012-07-12 23:56:15 +02:00
|
|
|
-- Home Decor mod by VanessaE
|
2013-03-18 00:09:42 +01:00
|
|
|
-- 2013-03-17
|
2012-07-12 23:56:15 +02:00
|
|
|
--
|
|
|
|
-- Mostly my own code, with bits and pieces lifted from Minetest's default
|
Various changes
Recipe changes:
Brass and wrought iron poles, table legs, and fences/railings were too
expensive in practice. Increased recipe outputs.
Small square glass table now comes from one small round table (instead of
three-to-two). Large square glass comes from one small square insted of two. Small round, small square, and large wooden tables follow the same pattern.
All glass tables can be recycled back into glass blocks via the Vessels mod's
recipes. All are 3:1 with glass fragments (and thus, 3:1 with glass blocks),
so there's no glass wasted.
All wooden tables can be crafted into sticks by putting three of a given item
onto the crafting grid. Any such craft yields 4 sticks, so there's no waste.
Other changes:
3d-ified nightstands, improved their textures somewhat.
New nodes:
* Added working oven (really just a furnace with new textures)
* Added mini-fridge that stores 24 slots
* Added kitchen cabinet that stores 24 slots
* Added half-size kitchen cabinet that stores 12 slots (6x2)
* Added kitchen sink with under-sink cabinet that stores 16 slots.
* Added slab-sized and half-slab-sized glowlights (e.g. ceiling fixtures)
* Added curtains in 6 colors: red, green, blue, purple, pink, white
Notes:
This mod now requires Moreblocks for some recipes - namely fridge and oven.
2012-09-30 07:51:59 +02:00
|
|
|
-- lua files and from ironzorg's flowers mod. Many thanks to GloopMaster
|
|
|
|
-- for helping me figure out the inventories used in the nightstands/dressers.
|
2012-07-12 23:56:15 +02:00
|
|
|
--
|
Various changes
Recipe changes:
Brass and wrought iron poles, table legs, and fences/railings were too
expensive in practice. Increased recipe outputs.
Small square glass table now comes from one small round table (instead of
three-to-two). Large square glass comes from one small square insted of two. Small round, small square, and large wooden tables follow the same pattern.
All glass tables can be recycled back into glass blocks via the Vessels mod's
recipes. All are 3:1 with glass fragments (and thus, 3:1 with glass blocks),
so there's no glass wasted.
All wooden tables can be crafted into sticks by putting three of a given item
onto the crafting grid. Any such craft yields 4 sticks, so there's no waste.
Other changes:
3d-ified nightstands, improved their textures somewhat.
New nodes:
* Added working oven (really just a furnace with new textures)
* Added mini-fridge that stores 24 slots
* Added kitchen cabinet that stores 24 slots
* Added half-size kitchen cabinet that stores 12 slots (6x2)
* Added kitchen sink with under-sink cabinet that stores 16 slots.
* Added slab-sized and half-slab-sized glowlights (e.g. ceiling fixtures)
* Added curtains in 6 colors: red, green, blue, purple, pink, white
Notes:
This mod now requires Moreblocks for some recipes - namely fridge and oven.
2012-09-30 07:51:59 +02:00
|
|
|
-- The code for ovens, nightstands, refrigerators are basically modified
|
|
|
|
-- copies of the code for chests and furnaces.
|
2012-07-12 23:56:15 +02:00
|
|
|
--
|
2013-03-18 00:09:42 +01:00
|
|
|
-- License: LGPL 2.0 or higher
|
2012-07-12 23:56:15 +02:00
|
|
|
--
|
|
|
|
|
2013-10-09 18:47:22 +02:00
|
|
|
homedecor = {}
|
|
|
|
|
2013-10-10 02:14:52 +02:00
|
|
|
homedecor.debug = 0
|
2013-10-09 18:47:22 +02:00
|
|
|
|
|
|
|
homedecor.modpath = minetest.get_modpath("homedecor")
|
|
|
|
homedecor.intllib_modpath = minetest.get_modpath("intllib")
|
2012-07-12 23:56:15 +02:00
|
|
|
|
2013-03-05 08:18:56 +01:00
|
|
|
-- Boilerplate to support localized strings if intllib mod is installed.
|
|
|
|
local S
|
2013-10-09 18:47:22 +02:00
|
|
|
if homedecor.intllib_modpath then
|
|
|
|
dofile(homedecor.intllib_modpath.."/intllib.lua")
|
2013-03-05 08:18:56 +01:00
|
|
|
S = intllib.Getter(minetest.get_current_modname())
|
|
|
|
else
|
|
|
|
S = function ( s ) return s end
|
|
|
|
end
|
|
|
|
|
2013-08-13 09:36:06 +02:00
|
|
|
-- Global stuff
|
|
|
|
|
2013-10-09 18:47:22 +02:00
|
|
|
homedecor.disable_signs = minetest.setting_getbool("homedecor.disable_signs")
|
2013-08-13 09:36:06 +02:00
|
|
|
|
2013-02-11 01:23:29 +01:00
|
|
|
-- Various Functions
|
2012-07-12 23:56:15 +02:00
|
|
|
|
|
|
|
local dbg = function(s)
|
2013-10-09 18:47:22 +02:00
|
|
|
if homedecor.debug == 1 then
|
2012-07-12 23:56:15 +02:00
|
|
|
print('[HomeDecor] ' .. s)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2013-10-09 18:47:22 +02:00
|
|
|
function homedecor.node_is_owned(pos, placer)
|
2013-02-11 01:23:29 +01:00
|
|
|
local ownername = false
|
|
|
|
if type(IsPlayerNodeOwner) == "function" then -- node_ownership mod
|
|
|
|
if HasOwner(pos, placer) then -- returns true if the node is owned
|
|
|
|
if not IsPlayerNodeOwner(pos, placer:get_player_name()) then
|
|
|
|
if type(getLastOwner) == "function" then -- ...is an old version
|
|
|
|
ownername = getLastOwner(pos)
|
|
|
|
elseif type(GetNodeOwnerName) == "function" then -- ...is a recent version
|
|
|
|
ownername = GetNodeOwnerName(pos)
|
|
|
|
else
|
2013-03-05 08:18:56 +01:00
|
|
|
ownername = S("someone")
|
2013-02-11 01:23:29 +01:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
elseif type(isprotect)=="function" then -- glomie's protection mod
|
|
|
|
if not isprotect(5, pos, placer) then
|
2013-03-05 08:18:56 +01:00
|
|
|
ownername = S("someone")
|
2013-02-11 01:23:29 +01:00
|
|
|
end
|
2013-05-20 20:15:41 +02:00
|
|
|
elseif type(protector)=="table" and type(protector.can_dig)=="function" then -- Zeg9's protection mod
|
|
|
|
if not protector.can_dig(5, pos, placer) then
|
|
|
|
ownername = S("someone")
|
|
|
|
end
|
2013-02-11 01:23:29 +01:00
|
|
|
end
|
|
|
|
|
|
|
|
if ownername ~= false then
|
2013-03-05 08:18:56 +01:00
|
|
|
minetest.chat_send_player( placer:get_player_name(), S("Sorry, %s owns that spot."):format(ownername) )
|
2013-02-11 01:23:29 +01:00
|
|
|
return true
|
|
|
|
else
|
|
|
|
return false
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2013-04-17 09:14:09 +02:00
|
|
|
if minetest.get_modpath("unified_inventory") or not minetest.setting_getbool("creative_mode") then
|
2013-10-09 18:47:22 +02:00
|
|
|
homedecor.expect_infinite_stacks = false
|
2013-04-17 09:14:09 +02:00
|
|
|
else
|
2013-10-09 18:47:22 +02:00
|
|
|
homedecor.expect_infinite_stacks = true
|
2013-04-17 09:14:09 +02:00
|
|
|
end
|
|
|
|
|
2013-10-09 18:47:22 +02:00
|
|
|
dofile(homedecor.modpath.."/misc_nodes.lua") -- the catch-all for all misc nodes
|
|
|
|
dofile(homedecor.modpath.."/tables.lua")
|
|
|
|
dofile(homedecor.modpath.."/electronics.lua")
|
|
|
|
dofile(homedecor.modpath.."/shutters.lua")
|
|
|
|
dofile(homedecor.modpath.."/shingles.lua")
|
|
|
|
dofile(homedecor.modpath.."/slopes.lua")
|
Various changes
Recipe changes:
Brass and wrought iron poles, table legs, and fences/railings were too
expensive in practice. Increased recipe outputs.
Small square glass table now comes from one small round table (instead of
three-to-two). Large square glass comes from one small square insted of two. Small round, small square, and large wooden tables follow the same pattern.
All glass tables can be recycled back into glass blocks via the Vessels mod's
recipes. All are 3:1 with glass fragments (and thus, 3:1 with glass blocks),
so there's no glass wasted.
All wooden tables can be crafted into sticks by putting three of a given item
onto the crafting grid. Any such craft yields 4 sticks, so there's no waste.
Other changes:
3d-ified nightstands, improved their textures somewhat.
New nodes:
* Added working oven (really just a furnace with new textures)
* Added mini-fridge that stores 24 slots
* Added kitchen cabinet that stores 24 slots
* Added half-size kitchen cabinet that stores 12 slots (6x2)
* Added kitchen sink with under-sink cabinet that stores 16 slots.
* Added slab-sized and half-slab-sized glowlights (e.g. ceiling fixtures)
* Added curtains in 6 colors: red, green, blue, purple, pink, white
Notes:
This mod now requires Moreblocks for some recipes - namely fridge and oven.
2012-09-30 07:51:59 +02:00
|
|
|
|
2013-10-09 18:47:22 +02:00
|
|
|
dofile(homedecor.modpath.."/door_models.lua")
|
|
|
|
dofile(homedecor.modpath.."/doors_and_gates.lua")
|
2013-01-23 11:45:42 +01:00
|
|
|
|
2013-10-09 18:47:22 +02:00
|
|
|
dofile(homedecor.modpath.."/signs_lib.lua")
|
2013-08-13 09:36:06 +02:00
|
|
|
|
2013-10-09 18:47:22 +02:00
|
|
|
dofile(homedecor.modpath.."/fences.lua")
|
2013-02-08 08:31:40 +01:00
|
|
|
|
2013-10-09 18:47:22 +02:00
|
|
|
dofile(homedecor.modpath.."/lighting.lua")
|
|
|
|
dofile(homedecor.modpath.."/kitchen_cabinet.lua")
|
|
|
|
dofile(homedecor.modpath.."/refrigerator.lua")
|
|
|
|
dofile(homedecor.modpath.."/furnaces.lua")
|
|
|
|
dofile(homedecor.modpath.."/nightstands.lua")
|
2013-01-23 11:45:42 +01:00
|
|
|
|
2013-10-09 18:47:22 +02:00
|
|
|
dofile(homedecor.modpath.."/crafts.lua")
|
2013-01-23 11:45:42 +01:00
|
|
|
|
2013-10-09 18:47:22 +02:00
|
|
|
dofile(homedecor.modpath.."/furniture.lua")
|
|
|
|
dofile(homedecor.modpath.."/furniture_medieval.lua")
|
|
|
|
dofile(homedecor.modpath.."/furniture_bathroom.lua")
|
|
|
|
dofile(homedecor.modpath.."/furniture_recipes.lua")
|
2013-03-26 12:05:22 +01:00
|
|
|
|
2013-10-09 18:47:22 +02:00
|
|
|
dofile(homedecor.modpath.."/locked.lua")
|
2013-07-12 22:41:11 +02:00
|
|
|
|
2013-03-05 08:18:56 +01:00
|
|
|
print("[HomeDecor] "..S("Loaded!"))
|