1
0
mirror of https://github.com/mt-mods/homedecor_modpack.git synced 2025-06-28 12:56:01 +02:00

Compare commits

...

16 Commits

Author SHA1 Message Date
ea160a6519 simplify mesecons/digilines rules
replaced all "xz" and "toponly" with "alldir"
made on-floor rope lights use "alldir"
2019-06-04 01:37:02 -04:00
631813bb2d make all dimmable lights fully dimmable to any level 0-14
for backward compat, they'll resond to the usual strings, too:

"off" -> 0
"min" -> 3
"med" -> 7
"hi"  -> 11
"max"/"on" -> 14

all dimmable nodes have been renamed to bear the light value in their
names, and aliased.

the non-dimmable lights still respond as before
("off" or n < 4; "on" or n > 3)
2019-06-04 00:56:00 -04:00
f33636d473 move wall lamp and torch models to the correct dir 2019-06-03 07:17:12 -04:00
cbb41f7d98 give most doors more meaningful, distinct node names
to avoid confusion

doors:wood_glass_{oak,white,mahogany}_{a,b} --> doors:homedecor_french_{oak,white,mahogany}_{a,b}
doors:woodglass2_{a,b}                      --> doors:homedecor_carolina_{a,b}
doors:bedroom_{a,b}                         --> doors:homedecor_basic_panel_{a,b}

All others:
doors:$foo_{a,b}                            --> doors:homedecor_$foo_{a,b}
2019-06-03 03:42:06 -04:00
c98ec41ba7 move some images to the right places :P 2019-06-02 08:24:13 -04:00
84c3933fd4 fix wrong textures on a couple of lamps 2019-06-02 03:16:00 -04:00
968cdfd549 rope lights are not dimmable 2019-06-02 03:13:46 -04:00
c457874d03 fix bad not-in-creative-inventory flags on wall lamp and plasma ball 2019-06-02 02:51:41 -04:00
67acbd6d59 fix not being able to right-click table and standing lamps 2019-06-02 02:47:46 -04:00
fdb37bdaf5 fix wrong colorization table usage in table, standing, and desk lamps 2019-06-02 02:45:01 -04:00
ab8bf5586f move "medieval" wall lamp and torch to homedecor_lighting
make them mesecon/digiline controllable (on/off only, alldir rules)

also fix a couple of old texture references
2019-06-02 02:37:02 -04:00
2f3c12eb2a rename and move generic light source textures 2019-06-02 02:23:10 -04:00
4174737a1a make most presently non-dimmable lights dimmable
merge table and standing lamps into the new code

of all the relevant lights, the plasma ball is the only one that remains
on/off-only, since dimmable doesn't make sense there.

That one, and any future lights that get the on/off-only treatment, will
use the previous on/off behavior, i.e. turn off with the messages "off"
or "low" or a number < 4, and turn on with "med", "hi", "max", "on" or
a number > 3

This alters the behavior of table/standing lamps - they will no longer
cycle brightnesses by right-click.  Like all other controllable lights,
they'll just toggle on/off.  If there's enough demand for it, I'll add
that feature back in at a later date.
2019-06-02 02:11:15 -04:00
11771e12cb allow numeric messages for dimmable lamps
allow non-dimmables to respond to "off", "low", "med", "hi", "max", "on"

number messages for dimmables:
0 turns the light off
1-3 sets it to "low"
4-7 sets it to "med"
8-11 sets it to "hi"
12+ sets it to "max" (i.e. full-on)

non-dimmables:
a number > 3 or the strings "med", "hi", "max", or "on" turn the light on
a number < 4 or the strings "off" and "low" turn the light off
2019-06-01 23:13:02 -04:00
b3337921a1 fix crash (bad variable ref) 2019-05-31 08:00:46 -04:00
301ae2ee1d Rearrange mesecons, diglines, dimmable functions and related, tweak
digiline stuff to be more generic, and add various digilines connections
rules to complement mesecons rules.

Mesecons must be present to get the "wallmounted" rules for digilines nodes.
Without mesecons, nodes that want wall rules will get alldir rules instead.

Add mesecons support to table and standing lamps (off -> max -> off).

Add digilines support to all other lights that now support mesecons,
except rope lights, since they're a mesecon conductor.

(will approach that last one later)
2019-05-29 22:01:27 -04:00
25 changed files with 653 additions and 535 deletions

View File

@ -40,41 +40,41 @@ local door_list = {
custom_model = "homedecor_door_fancy"
},
{ name = "wood_glass_oak",
description = "Glass and Wood, Oak-colored",
{ name = "french_oak",
description = "French door, Oak-colored",
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
sounds = {
main = default.node_sound_glass_defaults(),
},
backface = true,
alpha = true,
custom_model = "homedecor_door_wood_glass"
custom_model = "homedecor_door_french"
},
{ name = "wood_glass_mahogany",
description = "Glass and Wood, Mahogany-colored",
{ name = "french_mahogany",
description = "French door, Mahogany-colored",
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
sounds = {
main = default.node_sound_glass_defaults(),
},
backface = true,
alpha = true,
custom_model = "homedecor_door_wood_glass"
custom_model = "homedecor_door_french"
},
{ name = "wood_glass_white",
description = "Glass and Wood, White",
{ name = "french_white",
description = "French door, White",
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
sounds = {
main = default.node_sound_glass_defaults(),
},
backface = true,
alpha = true,
custom_model = "homedecor_door_wood_glass"
custom_model = "homedecor_door_french"
},
{ name = "bedroom",
description = "White Bedroom Door",
{ name = "basic_panel",
description = "Basic white panel Door",
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
sounds = {
main = default.node_sound_wood_defaults(),
@ -95,8 +95,8 @@ local door_list = {
custom_model = "homedecor_door_wrought_iron"
},
{ name = "woodglass2",
description = "Wooden door with glass insert, type 2",
{ name = "carolina",
description = "Wooden Carolina door",
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
sounds = {
main = default.node_sound_wood_defaults(),
@ -166,7 +166,7 @@ end
local hd_3d = minetest.get_modpath("homedecor_3d_extras")
for _, door in ipairs(door_list) do
doors.register(door.name, {
doors.register("homedecor_"..door.name, {
tiles = {{ name = "homedecor_door_"..door.name..".png", backface_culling = door.backface }},
description = door.description,
inventory_image = "homedecor_door_"..door.name.."_inv.png",
@ -177,9 +177,8 @@ for _, door in ipairs(door_list) do
mesecons = mesecons
})
local nn_a = "doors:"..door.name.."_a"
local nn_b = "doors:"..door.name.."_b"
local nn_a = "doors:homedecor_"..door.name.."_a"
local nn_b = "doors:homedecor_"..door.name.."_b"
if door.alpha then
local def = hd_doors_clone_node(nn_a)
@ -204,6 +203,9 @@ for _, door in ipairs(door_list) do
old_doors[#old_doors + 1] = "homedecor:door_"..door.name.."_left"
old_doors[#old_doors + 1] = "homedecor:door_"..door.name.."_right"
minetest.register_alias("doors:"..door.name.."_a", "doors:homedecor_"..door.name.."_a")
minetest.register_alias("doors:"..door.name.."_b", "doors:homedecor_"..door.name.."_b")
end
-- Gates
@ -696,14 +698,35 @@ minetest.register_craft({
-- aliases
minetest.register_alias("homedecor:jpn_door_top", "air")
minetest.register_alias("homedecor:jpn_door_bottom", "homedecor:door_japanese_closed")
minetest.register_alias("homedecor:jpn_door_top", "air")
minetest.register_alias("homedecor:jpn_door_top_open", "air")
minetest.register_alias("homedecor:jpn_door_top_open", "air")
minetest.register_alias("homedecor:jpn_door_bottom_open", "homedecor:door_japanese_open")
minetest.register_alias("homedecor:jpn_door_bottom", "homedecor:door_japanese_closed")
minetest.register_alias("homedecor:jpn_door_bottom_open", "homedecor:door_japanese_open")
minetest.register_alias("homedecor:door_glass_right", "doors:door_glass_b")
minetest.register_alias("homedecor:door_glass_left", "doors:door_glass_a")
minetest.register_alias("homedecor:door_glass_right", "doors:door_glass_b")
minetest.register_alias("homedecor:door_glass_left", "doors:door_glass_a")
minetest.register_alias("doors:wood_glass_oak_a", "doors:homedecor_french_oak_a")
minetest.register_alias("doors:wood_glass_oak_b", "doors:homedecor_french_oak_b")
minetest.register_alias("doors:wood_glass_white_a", "doors:homedecor_french_white_a")
minetest.register_alias("doors:wood_glass_white_b", "doors:homedecor_french_white_b")
minetest.register_alias("doors:wood_glass_mahogany_a", "doors:homedecor_french_mahogany_a")
minetest.register_alias("doors:wood_glass_mahogany_b", "doors:homedecor_french_mahogany_b")
minetest.register_alias("doors:homedecor_woodglass2_a", "doors:homedecor_carolina_a")
minetest.register_alias("doors:homedecor_woodglass2_b", "doors:homedecor_carolina_b")
minetest.register_alias("doors:woodglass2_a", "doors:homedecor_carolina_a")
minetest.register_alias("doors:woodglass2_b", "doors:homedecor_carolina_b")
minetest.register_alias("doors:homedecor_bedroom_a", "doors:homedecor_basic_panel_a")
minetest.register_alias("doors:homedecor_bedroom_b", "doors:homedecor_basic_panel_b")
minetest.register_alias("doors:bedroom_a", "doors:homedecor_basic_panel_a")
minetest.register_alias("doors:bedroom_b", "doors:homedecor_basic_panel_b")
-- flip old homedecor doors around, since they use minetest_game doors API now

View File

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

View File

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

View File

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

Before

Width:  |  Height:  |  Size: 7.8 KiB

After

Width:  |  Height:  |  Size: 7.8 KiB

View File

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

View File

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

View File

@ -2,9 +2,10 @@
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())
if not clicker then return false end
local playername = clicker:get_player_name()
if minetest.is_protected(pos, playername) then
minetest.record_protection_violation(pos, playername)
return false
end
local sep = string.find(node.name, "_o", -5)

View File

@ -58,61 +58,10 @@ homedecor.register("chains", {
sounds = default.node_sound_stone_defaults(),
})
homedecor.register("torch_wall", {
description = S("Wall Torch"),
mesh = "forniture_torch.obj",
tiles = {
{
name="forniture_torch_flame.png",
animation={
type="vertical_frames",
aspect_w=40,
aspect_h=40,
length=1.0,
},
},
{ name = "homedecor_generic_metal.png", color = homedecor.color_black },
{ name = "homedecor_generic_metal.png", color = homedecor.color_med_grey },
"forniture_coal.png",
},
inventory_image="forniture_torch_inv.png",
walkable = false,
light_source = 14,
selection_box = {
type = "fixed",
fixed = { -0.15, -0.45, 0.15, 0.15,0.35, 0.5 },
},
groups = {cracky=3},
})
local wl_cbox = {
type = "fixed",
fixed = { -0.2, -0.5, 0, 0.2, 0.5, 0.5 },
}
homedecor.register("wall_lamp", {
description = S("Wall Lamp"),
mesh = "homedecor_wall_lamp.obj",
tiles = {
{ name = "homedecor_generic_metal.png", color = homedecor.color_med_grey },
homedecor.lux_wood,
"homedecor_light.png",
"homedecor_generic_metal_wrought_iron.png"
},
use_texture_alpha = true,
inventory_image = "homedecor_wall_lamp_inv.png",
groups = {snappy=3},
light_source = 11,
selection_box = wl_cbox,
walkable = false
})
minetest.register_alias("3dforniture:bars", "homedecor:bars")
minetest.register_alias("3dforniture:L_binding_bars", "homedecor:L_binding_bars")
minetest.register_alias("3dforniture:chains", "homedecor:chains")
minetest.register_alias("3dforniture:torch_wall", "homedecor:torch_wall")
minetest.register_alias('bars', 'homedecor:bars')
minetest.register_alias('binding_bars', 'homedecor:L_binding_bars')
minetest.register_alias('chains', 'homedecor:chains')
minetest.register_alias('torch_wall', 'homedecor:torch_wall')

View File

@ -7,3 +7,4 @@ moreblocks?
building_blocks?
darkage?
mesecons?
digilines?

File diff suppressed because it is too large Load Diff

View File

Before

Width:  |  Height:  |  Size: 6.2 KiB

After

Width:  |  Height:  |  Size: 6.2 KiB

View File

Before

Width:  |  Height:  |  Size: 4.0 KiB

After

Width:  |  Height:  |  Size: 4.0 KiB

View File

Before

Width:  |  Height:  |  Size: 524 B

After

Width:  |  Height:  |  Size: 524 B

View File

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB