From 101c9b73222a709826dd343dcfedbb9014c47307 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Sat, 14 Dec 2019 18:57:17 +0100 Subject: [PATCH] Use minetest.LIGHT_MAX --- mods/ITEMS/REDSTONE/mesecons_lightstone/init.lua | 7 ++++--- .../mesecons_lightstone/locale/mesecons_lightstone.de.tr | 2 +- .../ITEMS/REDSTONE/mesecons_lightstone/locale/template.txt | 2 +- mods/ITEMS/mcl_core/nodes_liquid.lua | 6 ++---- mods/ITEMS/mcl_end/building.lua | 4 ++-- mods/ITEMS/mcl_farming/pumpkin.lua | 3 +-- mods/ITEMS/mcl_fire/init.lua | 6 ++---- mods/ITEMS/mcl_nether/init.lua | 3 +-- mods/ITEMS/mcl_ocean/init.lua | 3 +-- mods/ITEMS/mcl_torches/init.lua | 4 ++-- 10 files changed, 17 insertions(+), 23 deletions(-) diff --git a/mods/ITEMS/REDSTONE/mesecons_lightstone/init.lua b/mods/ITEMS/REDSTONE/mesecons_lightstone/init.lua index 97ef544aa..822aa3be9 100644 --- a/mods/ITEMS/REDSTONE/mesecons_lightstone/init.lua +++ b/mods/ITEMS/REDSTONE/mesecons_lightstone/init.lua @@ -1,11 +1,13 @@ local S = minetest.get_translator("mesecons_lightstone") +local light = minetest.LIGHT_MAX + minetest.register_node("mesecons_lightstone:lightstone_off", { tiles = {"jeija_lightstone_gray_off.png"}, groups = {handy=1, mesecon_effector_off = 1, mesecon = 2}, is_ground_content = false, description= S("Redstone Lamp"), - _doc_items_longdesc = S("Redstone lamps are simple redstone components which glow brightly (light level 14) when they receive redstone power."), + _doc_items_longdesc = S("Redstone lamps are simple redstone components which glow brightly (light level @1) when they receive redstone power.", light), sounds = mcl_sounds.node_sound_glass_defaults(), mesecons = {effector = { action_on = function (pos, node) @@ -23,8 +25,7 @@ minetest.register_node("mesecons_lightstone:lightstone_on", { drop = "node mesecons_lightstone:lightstone_off", is_ground_content = false, paramtype = "light", - -- Real light level: 15 (Minetest caps at 14) - light_source = 14, + light_source = light, sounds = mcl_sounds.node_sound_glass_defaults(), mesecons = {effector = { action_off = function (pos, node) diff --git a/mods/ITEMS/REDSTONE/mesecons_lightstone/locale/mesecons_lightstone.de.tr b/mods/ITEMS/REDSTONE/mesecons_lightstone/locale/mesecons_lightstone.de.tr index dd39b80d9..44b52180e 100644 --- a/mods/ITEMS/REDSTONE/mesecons_lightstone/locale/mesecons_lightstone.de.tr +++ b/mods/ITEMS/REDSTONE/mesecons_lightstone/locale/mesecons_lightstone.de.tr @@ -1,3 +1,3 @@ # textdomain: mesecons_lightstone Redstone Lamp=Redstonelampe -Redstone lamps are simple redstone components which glow brightly (light level 14) when they receive redstone power.=Redstonelampen sind einfache Redstonekomponenten, die hell aufleuchten (Helligkeitspegel von 14), wenn sie Redstoneenergie erhalten. +Redstone lamps are simple redstone components which glow brightly (light level @1) when they receive redstone power.=Redstonelampen sind einfache Redstonekomponenten, die hell aufleuchten (Helligkeitspegel von @1), wenn sie Redstoneenergie erhalten. diff --git a/mods/ITEMS/REDSTONE/mesecons_lightstone/locale/template.txt b/mods/ITEMS/REDSTONE/mesecons_lightstone/locale/template.txt index 3261d768a..b8a5bf4d8 100644 --- a/mods/ITEMS/REDSTONE/mesecons_lightstone/locale/template.txt +++ b/mods/ITEMS/REDSTONE/mesecons_lightstone/locale/template.txt @@ -1,3 +1,3 @@ # textdomain: mesecons_lightstone Redstone Lamp= -Redstone lamps are simple redstone components which glow brightly (light level 14) when they receive redstone power.= +Redstone lamps are simple redstone components which glow brightly (light level @1) when they receive redstone power.= diff --git a/mods/ITEMS/mcl_core/nodes_liquid.lua b/mods/ITEMS/mcl_core/nodes_liquid.lua index 815fd6fe1..5ba3c2dae 100644 --- a/mods/ITEMS/mcl_core/nodes_liquid.lua +++ b/mods/ITEMS/mcl_core/nodes_liquid.lua @@ -118,8 +118,7 @@ minetest.register_node("mcl_core:lava_flowing", { }, paramtype = "light", paramtype2 = "flowingliquid", - -- Real light level: 15 (but Minetest caps at 14) - light_source = 14, + light_source = minetest.LIGHT_MAX, sounds = mcl_sounds.node_sound_lava_defaults(), walkable = false, pointable = false, @@ -175,9 +174,8 @@ S("• When lava is directly above water, the water turns into stone."), backface_culling = false, } }, - -- Real light level: 15 (but Minetest caps at 14) paramtype = "light", - light_source = 14, + light_source = minetest.LIGHT_MAX, sounds = mcl_sounds.node_sound_lava_defaults(), walkable = false, pointable = false, diff --git a/mods/ITEMS/mcl_end/building.lua b/mods/ITEMS/mcl_end/building.lua index 4dbfb5639..31b4bd553 100644 --- a/mods/ITEMS/mcl_end/building.lua +++ b/mods/ITEMS/mcl_end/building.lua @@ -66,9 +66,9 @@ minetest.register_node("mcl_end:end_rod", { is_ground_content = false, paramtype = "light", paramtype2 = "facedir", - light_source = 14, + light_source = minetest.LIGHT_MAX, sunlight_propagates = true, - groups = { dig_immediate=3, deco_block=1, destroy_by_lava_flow=1, }, + groups = { dig_immediate=3, deco_block=1, destroy_by_lava_flow=1, falling_node=1 }, node_box = { type = "fixed", fixed = { diff --git a/mods/ITEMS/mcl_farming/pumpkin.lua b/mods/ITEMS/mcl_farming/pumpkin.lua index d10437479..8c87447ca 100644 --- a/mods/ITEMS/mcl_farming/pumpkin.lua +++ b/mods/ITEMS/mcl_farming/pumpkin.lua @@ -125,8 +125,7 @@ minetest.register_node("mcl_farming:pumpkin_face_light", { stack_max = 64, paramtype = "light", paramtype2 = "facedir", - -- Real light level: 15 (Minetest caps at 14) - light_source = 14, + light_source = minetest.LIGHT_MAX, tiles = {"farming_pumpkin_top.png", "farming_pumpkin_top.png", "farming_pumpkin_side.png", "farming_pumpkin_side.png", "farming_pumpkin_side.png", "farming_pumpkin_face_light.png"}, groups = {handy=1,axey=1, building_block=1, dig_by_piston=1 }, sounds = mcl_sounds.node_sound_wood_defaults(), diff --git a/mods/ITEMS/mcl_fire/init.lua b/mods/ITEMS/mcl_fire/init.lua index ea36d1ce1..ca61d9a43 100644 --- a/mods/ITEMS/mcl_fire/init.lua +++ b/mods/ITEMS/mcl_fire/init.lua @@ -57,8 +57,7 @@ minetest.register_node("mcl_fire:fire", { }, inventory_image = "fire_basic_flame.png", paramtype = "light", - -- Real light level: 15 (but Minetest caps at 14) - light_source = 14, + light_source = minetest.LIGHT_MAX, walkable = false, buildable_to = true, sunlight_propagates = true, @@ -142,8 +141,7 @@ minetest.register_node("mcl_fire:eternal_fire", { }, inventory_image = "fire_basic_flame.png", paramtype = "light", - -- Real light level: 15 (but Minetest caps at 14) - light_source = 14, + light_source = minetest.LIGHT_MAX, walkable = false, buildable_to = true, sunlight_propagates = true, diff --git a/mods/ITEMS/mcl_nether/init.lua b/mods/ITEMS/mcl_nether/init.lua index 116fe789c..62c5dc416 100644 --- a/mods/ITEMS/mcl_nether/init.lua +++ b/mods/ITEMS/mcl_nether/init.lua @@ -18,8 +18,7 @@ minetest.register_node("mcl_nether:glowstone", { } }, paramtype = "light", - -- Real light level: 15 (but Minetest caps at 14) - light_source = 14, + light_source = minetest.LIGHT_MAX, sounds = mcl_sounds.node_sound_glass_defaults(), _mcl_blast_resistance = 1.5, _mcl_hardness = 0.3, diff --git a/mods/ITEMS/mcl_ocean/init.lua b/mods/ITEMS/mcl_ocean/init.lua index b84bbeac6..90626cfa9 100644 --- a/mods/ITEMS/mcl_ocean/init.lua +++ b/mods/ITEMS/mcl_ocean/init.lua @@ -8,8 +8,7 @@ minetest.register_node("mcl_ocean:sea_lantern", { paramtype2 = "facedir", is_ground_content = false, stack_max = 64, - -- Real light level: 15 (but Minetest caps at 14) - light_source = 14, + light_source = minetest.LIGHT_MAX, drop = { max_items = 1, items = { diff --git a/mods/ITEMS/mcl_torches/init.lua b/mods/ITEMS/mcl_torches/init.lua index 6d869e9ca..ea7c1a2a2 100644 --- a/mods/ITEMS/mcl_torches/init.lua +++ b/mods/ITEMS/mcl_torches/init.lua @@ -47,7 +47,7 @@ mcl_torches.register_torch = function(substring, description, doc_items_longdesc local itemstring = minetest.get_current_modname()..":"..substring local itemstring_wall = minetest.get_current_modname()..":"..substring.."_wall" - if light == nil then light = 14 end + if light == nil then light = minetest.LIGHT_MAX end if mesh_floor == nil then mesh_floor = "mcl_torches_torch_floor.obj" end if mesh_wall == nil then mesh_wall = "mcl_torches_torch_wall.obj" end if groups == nil then groups = {} end @@ -189,7 +189,7 @@ mcl_torches.register_torch("torch", name = "default_torch_on_floor_animated.png", animation = {type = "vertical_frames", aspect_w = 16, aspect_h = 16, length = 3.3} }}, - 14, + minetest.LIGHT_MAX, {dig_immediate=3, torch=1, deco_block=1}, mcl_sounds.node_sound_wood_defaults(), {_doc_items_hidden = false})