From fef9fecbd81b5db643380ebda61c9f0b37c9e3bc Mon Sep 17 00:00:00 2001 From: AntumDeluge Date: Thu, 8 Jun 2017 17:34:23 -0700 Subject: [PATCH] Do not use 'ilights': 'ilights' now supports node coloring. --- depends.txt | 1 - ilights.lua | 148 ---------------------------------------------------- init.lua | 6 --- 3 files changed, 155 deletions(-) delete mode 100644 ilights.lua diff --git a/depends.txt b/depends.txt index 827d976..1a371da 100644 --- a/depends.txt +++ b/depends.txt @@ -1,4 +1,3 @@ -ilights? default xpanes wool diff --git a/ilights.lua b/ilights.lua deleted file mode 100644 index a0ecd34..0000000 --- a/ilights.lua +++ /dev/null @@ -1,148 +0,0 @@ -local ilights_types = { - {"white", "White", "#ffffff" }, - {"grey", "Grey", "#a0a0a0" }, - {"black", "Black", "#000000" }, - {"red", "Red", "#ff0000" }, - {"yellow", "Yellow", "#ffff00" }, - {"green", "Green", "#00ff00" }, - {"cyan", "Cyan", "#00ffff" }, - {"blue", "Blue", "#0000ff" }, - {"magenta", "Magenta", "#ff00ff" }, - {"orange", "Orange", "#ff8000" }, - {"violet", "Violet", "#8000ff" }, - {"dark_grey", "Dark Grey", "#404040" }, - {"dark_green", "Dark Green", "#008000" }, - {"pink", "Pink", "#ffb0ff" }, - {"brown", "Brown", "#604000" }, -} - -local lamp_cbox = { - type = "fixed", - fixed = { -11/32, -8/16, -11/32, 11/32, 4/16, 11/32 } -} - -for _, row in ipairs(ilights_types) do - local name = row[1] - local desc = row[2] - local colordef = row[3] - - -minetest.override_item("ilights:light_"..name, { - light_source = "0", -}) - - -- Node Definition - - minetest.register_node("mylights:ilight_30w"..name, { - description = desc.." Industrial Light", - drawtype = "mesh", - mesh = "ilights_lamp.obj", - tiles = { - "ilights_lamp_base.png", - "ilights_lamp_cage.png", - "ilights_lamp_bulb.png^[colorize:"..colordef..":200", - "ilights_lamp_bulb_base.png", - "ilights_lamp_lens.png^[colorize:"..colordef.."20:75" - }, - use_texture_alpha = true, - groups = {cracky=3, not_in_creative_inventory=1}, - paramtype = "light", - paramtype2 = "facedir", - light_source = "5", - selection_box = lamp_cbox, - collision_box = lamp_cbox, - on_place = minetest.rotate_node - }) -minetest.register_craft({ - output = "mylights:ilight_30w"..name.." 1", - recipe = { - {'ilights:light_'..name,'mylights:lightbulb30',''}, - {'','',''}, - {'','',''} - } -}) - minetest.register_node("mylights:ilight_60w"..name, { - description = desc.." Industrial Light", - drawtype = "mesh", - mesh = "ilights_lamp.obj", - tiles = { - "ilights_lamp_base.png", - "ilights_lamp_cage.png", - "ilights_lamp_bulb.png^[colorize:"..colordef..":200", - "ilights_lamp_bulb_base.png", - "ilights_lamp_lens.png^[colorize:"..colordef.."20:75" - }, - use_texture_alpha = true, - groups = {cracky=3, not_in_creative_inventory=1}, - paramtype = "light", - paramtype2 = "facedir", - light_source = "8", - selection_box = lamp_cbox, - collision_box = lamp_cbox, - on_place = minetest.rotate_node - }) - minetest.register_craft({ - output = "mylights:ilight_60w"..name.." 1", - recipe = { - {'ilights:light_'..name,'mylights:lightbulb60',''}, - {'','',''}, - {'','',''} - } -}) - minetest.register_node("mylights:ilight_90w"..name, { - description = desc.." Industrial Light", - drawtype = "mesh", - mesh = "ilights_lamp.obj", - tiles = { - "ilights_lamp_base.png", - "ilights_lamp_cage.png", - "ilights_lamp_bulb.png^[colorize:"..colordef..":200", - "ilights_lamp_bulb_base.png", - "ilights_lamp_lens.png^[colorize:"..colordef.."20:75" - }, - use_texture_alpha = true, - groups = {cracky=3, not_in_creative_inventory=1}, - paramtype = "light", - paramtype2 = "facedir", - light_source = "11", - selection_box = lamp_cbox, - collision_box = lamp_cbox, - on_place = minetest.rotate_node - }) - minetest.register_craft({ - output = "mylights:ilight_90w"..name.." 1", - recipe = { - {'ilights:light_'..name,'mylights:lightbulb90',''}, - {'','',''}, - {'','',''} - } -}) - minetest.register_node("mylights:ilight_120w"..name, { - description = desc.." Industrial Light", - drawtype = "mesh", - mesh = "ilights_lamp.obj", - tiles = { - "ilights_lamp_base.png", - "ilights_lamp_cage.png", - "ilights_lamp_bulb.png^[colorize:"..colordef..":200", - "ilights_lamp_bulb_base.png", - "ilights_lamp_lens.png^[colorize:"..colordef.."20:75" - }, - use_texture_alpha = true, - groups = {cracky=3, not_in_creative_inventory=1}, - paramtype = "light", - paramtype2 = "facedir", - light_source = "14", - selection_box = lamp_cbox, - collision_box = lamp_cbox, - on_place = minetest.rotate_node - }) - minetest.register_craft({ - output = "mylights:ilight_120w"..name.." 1", - recipe = { - {'ilights:light_'..name,'mylights:lightbulb120',''}, - {'','',''}, - {'','',''} - } -}) -end diff --git a/init.lua b/init.lua index c4a3d33..489dff9 100644 --- a/init.lua +++ b/init.lua @@ -11,9 +11,3 @@ dofile(minetest.get_modpath("mylights").."/machine_bulbs.lua") dofile(minetest.get_modpath("mylights").."/machine_cubes.lua") dofile(minetest.get_modpath("mylights").."/aliases.lua") print ("mylights loaded") - -if minetest.get_modpath("ilights") then - dofile(minetest.get_modpath("mylights").."/ilights.lua") - return - end -