1
0
mirror of https://github.com/mt-mods/homedecor_modpack.git synced 2025-07-23 07:40:17 +02:00

Compare commits

...

18 Commits

Author SHA1 Message Date
5c6a994698 Merge branch 'nalc-1.2' of yunohost:nalc/homedecor_modpack into nalc-1.2 2019-05-26 19:11:29 +02:00
1eec6e3615 Merge branch 'master' into nalc-1.2 2019-05-26 19:07:00 +02:00
7cdfc3b49c move wall switch up a bit (almost centered now) 2019-05-26 02:17:21 -04:00
bf7e47342f remove "on" switch from creative inv
add proper "receiver" group
remove color from switch buttons
2019-05-26 01:59:14 -04:00
b85278fbaa make wall switch work (mesecons) 2019-05-26 01:33:22 -04:00
cacf04e2d1 Add mesecons support for the rest of the other relevant lights
Each light connects only according to what sides make sense.

For example:

* a plasma lamp cube or large lattice lamp will connect from all 6 sides
* a ground lantern will only connect from its NSEW sides, not its top or
  bottom
* a glowlight slab, glowlight cube, or lattice cube uses the same rules as
  mesecons lamps, so its four edges and it back/bottom, whatever its
  orientation, but not its top/front.
* a (kitchen) ceiling lamp, and a (hanging, exterior) ceiling lantern will
  only connect from the top.

Rope lights are defined as a conductor, just like a mesecons wire,
so if mesecons is present, they will default to off unless powered by
a mesecons wire/switch/etc.

You can still right-click-toggle individual segments on/off.

Ceiling rope light connection rules are a little funky, but they work
(I wanted them to only connect from the top, but I couldn't get it
just right).  Floor-orientation connections are straightforward.
2019-05-26 00:44:37 -04:00
07141bff47 fill-out mesecons support for first few lights,
also removed debug prints

Lights are forced-on when placed, and remain so
until they receive a mesecons "off" signal.

Lights can be toggled on/off independent of the
mesecon signal state by right click, which will
persist until the next signal transition,
which will change the light to follow.
2019-05-25 22:51:49 -04:00
542f688c09 fix global warnings 2019-05-25 21:46:08 -04:00
fee09943e3 mesecons support, wip 2019-05-25 21:35:38 -04:00
bed4d1e6f8 make table- and standing-lamps return "hi"
brightness version, instead of "off".  do
the same for their crafts.
2019-05-25 20:59:19 -04:00
798ff29b0a add drops 2019-05-25 20:50:30 -04:00
7491fd4aa8 Allow most light sources to be toggled on/off
with right-click.

Rework glowlight slab and cube textures, simplify,
use overlays and compositing, so that the bulk
of the light can switch between a dark, matte surface,
and a bright surface with central glare gradient, and
so that the surface and eging respond to param2 color.

Tweak all other relevant nodes so that their light
source changes to a darkened (or even translucent
texture) when off.

On/off switching doesn't affect things like oil lamps,
candles, chandeliers, etc.  Just basically the stuff
that would be electric-powered in real life.

If in a protected area, only that area's owner can
turn the light on/off.
2019-05-25 19:35:14 -04:00
0753606eb0 Merge branch 'master' into nalc-1.2 2019-05-25 15:36:01 +02:00
778b5493c7 Merge branch 'master' into nalc-1.2 2019-05-09 22:11:30 +02:00
fb0ca9a15c Supprime 2 dossiers non supprimés par le merge précédent 2019-05-04 20:45:50 +02:00
1520d27a73 Merge branch 'master' into nalc-1.2 2019-05-04 19:25:15 +02:00
5d4c64d3b2 Corrige problème de stack des lampes dans inventaire après récolte.
L'auteur du mod a oublié de définir la variable drop des objets
concernés :
- homedecor:glowlight_half,
- homedecor:glowlight_quarter,
- homedecor:glowlight_small_cube,
- homedecor:standing_lamp_off,
- homedecor:desk_lamp.
2019-04-07 14:04:00 +02:00
4eb9ffb088 Ajoute messages de chargement des mods dans le journal "action" 2018-12-25 17:41:16 +01:00
49 changed files with 899 additions and 503 deletions

View File

@ -5,3 +5,6 @@ dofile(modpath.."/alias.lua")
dofile(modpath.."/node_stairs.lua")
dofile(modpath.."/others.lua")
dofile(modpath.."/recipes.lua")
minetest.log("action", "[building_blocks] loaded.")

View File

@ -97,3 +97,5 @@ dofile(MODPATH.."/computers.lua")
dofile(MODPATH.."/miscitems.lua")
dofile(MODPATH.."/recipes.lua")
dofile(MODPATH.."/tetris.lua")
minetest.log("action", "[computer] loaded.")

View File

@ -214,3 +214,5 @@ minetest.register_alias("fake_fire:smokeless_ice_fire", "fake_fire:ice_fire")
minetest.register_alias("fake_fire:smokeless_chimney_top_stone", "fake_fire:chimney_top_stone")
minetest.register_alias("fake_fire:smokeless_chimney_top_sandstone", "fake_fire:chimney_top_sandstone")
minetest.register_alias("fake_fire:flint", "fake_fire:flint_and_steel")
minetest.log("action", "[fake_fire] loaded.")

View File

@ -89,3 +89,5 @@ if minetest.get_modpath("moreblocks") then
}
})
end
minetest.log("action", "[homedecor_3d_extra] loaded.")

View File

@ -77,6 +77,6 @@ dofile(modpath.."/mt_game_beds_functions.lua")
dofile(modpath.."/sit.lua")
dofile(modpath.."/crafts.lua")
if minetest.settings:get_bool("log_mod") then
if minetest.settings:get_bool("log_mods") then
minetest.log("action", "[HomeDecor API] " .. S("Loaded!"))
end

View File

@ -1,3 +1,5 @@
homedecor_common
default
basic_materials
mesecons?
mesecons_receiver?

View File

@ -1,6 +1,40 @@
local S = homedecor.gettext
function homedecor.toggle_switch(pos, node, clicker, itemstack, pointed_thing)
if minetest.is_protected(pos, clicker:get_player_name()) then
minetest.record_protection_violation(pos,
sender:get_player_name())
return false
end
local sep = string.find(node.name, "_o", -5)
local onoff = string.sub(node.name, sep + 1)
local newname = string.sub(node.name, 1, sep - 1)..((onoff == "off") and "_on" or "_off")
minetest.swap_node(pos, {name = newname, param2 = node.param2})
return true
end
local on_rc
local switch_receptor
if minetest.get_modpath("mesecons") then
on_rc = function(pos, node, clicker, itemstack, pointed_thing)
local t = homedecor.toggle_switch(pos, node, clicker, itemstack, pointed_thing)
if not t then return end
if string.find(node.name, "_on", -5) then
mesecon.receptor_off(pos, mesecon.rules.buttonlike_get(node))
else
mesecon.receptor_on(pos, mesecon.rules.buttonlike_get(node))
end
end
switch_receptor = {
receptor = {
state = mesecon.state[onoff],
rules = mesecon.rules.buttonlike_get
}
}
end
homedecor.register("power_outlet", {
description = S("Power Outlet"),
tiles = {
@ -28,35 +62,52 @@ homedecor.register("power_outlet", {
walkable = false
})
homedecor.register("light_switch", {
description = S("Light switch"),
tiles = {
"homedecor_light_switch_edges.png",
"homedecor_light_switch_edges.png",
"homedecor_light_switch_edges.png",
"homedecor_light_switch_edges.png",
"homedecor_light_switch_back.png",
"homedecor_light_switch_front.png"
},
inventory_image = "homedecor_light_switch_inv.png",
node_box = {
type = "fixed",
fixed = {
{ -0.125, -0.5, 0.4375, 0.125, -0.1875, 0.5 },
{ -0.03125, -0.3125, 0.40625, 0.03125, -0.25, 0.5 },
for _, onoff in ipairs ({"on", "off"}) do
}
},
selection_box = {
type = "fixed",
fixed = {
{ -0.1875, -0.5625, 0.375, 0.1875, -0.1250, 0.5 },
}
},
groups = {cracky=3,dig_immediate=2},
walkable = false
})
local model = {
{ -0.125, -0.1875, 0.4375, 0.125, 0.125, 0.5 },
{ -0.03125, 0, 0.40625, 0.03125, 0.0625, 0.5 },
}
if onoff == "on" then
model = {
{ -0.125, -0.1875, 0.4375, 0.125, 0.125, 0.5 },
{ -0.03125, -0.125, 0.40625, 0.03125, -0.0625, 0.5 },
}
end
homedecor.register("light_switch_"..onoff, {
description = S("Light switch"),
tiles = {
"homedecor_light_switch_edges.png",
"homedecor_light_switch_edges.png",
"homedecor_light_switch_edges.png",
"homedecor_light_switch_edges.png",
"homedecor_light_switch_back.png",
"homedecor_light_switch_front_"..onoff..".png"
},
inventory_image = "homedecor_light_switch_inv.png",
node_box = {
type = "fixed",
fixed = model
},
selection_box = {
type = "fixed",
fixed = {
{ -0.1875, -0.25, 0.375, 0.1875, 0.1875, 0.5 },
}
},
groups = {cracky=3, dig_immediate=2, mesecon_needs_receiver=1, not_in_creative_inventory = (onoff == "on") and 1 or nil},
walkable = false,
drop = {
items = {
{items = {"homedecor:light_switch_off"}, inherit_color = true },
}
},
mesecons = switch_receptor,
on_rightclick = on_rc
})
end
homedecor.register("doorbell", {
tiles = { "homedecor_doorbell.png" },
@ -92,7 +143,7 @@ minetest.register_craft( {
})
minetest.register_craft( {
output = "homedecor:light_switch",
output = "homedecor:light_switch_off",
recipe = {
{"", "basic_materials:plastic_sheet", "basic_materials:copper_strip"},
{"basic_materials:plastic_sheet", "basic_materials:plastic_sheet", "basic_materials:copper_strip"},
@ -106,3 +157,7 @@ minetest.register_craft( {
{ "homedecor:light_switch", "basic_materials:energy_crystal_simple", "homedecor:speaker_driver" }
},
})
-- aliases
minetest.register_alias("homedecor:light_switch", "homedecor:light_switch_on")

Binary file not shown.

Before

Width:  |  Height:  |  Size: 310 B

After

Width:  |  Height:  |  Size: 368 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 175 B

After

Width:  |  Height:  |  Size: 167 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 142 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 281 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 284 B

View File

@ -6,3 +6,4 @@ creative
moreblocks?
building_blocks?
darkage?
mesecons?

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 83 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 95 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 93 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 106 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 94 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 104 B

View File

Before

Width:  |  Height:  |  Size: 204 B

After

Width:  |  Height:  |  Size: 204 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 96 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 95 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 100 B

View File

Before

Width:  |  Height:  |  Size: 423 B

After

Width:  |  Height:  |  Size: 423 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 307 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 96 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 97 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 313 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 187 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 93 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 423 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 360 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 661 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 210 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 377 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 493 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 282 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 379 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 493 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 287 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 450 B

View File

@ -126,3 +126,5 @@ function inbox.get_inbox_insert_formspec(pos)
"listring[]"
return formspec
end
minetest.log("action", "[inbox] loaded.")

View File

@ -300,3 +300,5 @@ if minetest.get_modpath("mesecons_mvps") then
mesecon.register_mvps_stopper("itemframes:frame")
mesecon.register_mvps_stopper("itemframes:pedestal")
end
minetest.log("action", "[itemframes] loaded.")

View File

@ -73,3 +73,5 @@ dofile(minetest.get_modpath("lrfurn").."/sofas.lua")
dofile(minetest.get_modpath("lrfurn").."/armchairs.lua")
dofile(minetest.get_modpath("lrfurn").."/coffeetable.lua")
dofile(minetest.get_modpath("lrfurn").."/endtable.lua")
minetest.log("action", "[lrfurn] loaded.")

View File

@ -186,3 +186,5 @@ minetest.register_craft({
{'group:stick', 'default:coal_lump', 'group:stick'},
}
})
minetest.log("action", "[plasmascreen] loaded.")