screenshots:
crafting:
flood light: M=mese_crystall E=empty S=steel_ingot
(E)(M)(E)
(E)(S)(E)
(S)(S)(S)
Code: LGPLv2.1+, textures: CC BY-SA 3.0 Unported
Mod dependencies: default
Download: https://github.com/zander999/flood_light
zip:
minetest.override_item("default:wood", {
on_construct = function(pos)
local pos1 = vector.add(pos, -5)
local pos2 = vector.add(pos, 5)
-- Get the vmanip object and the area and nodes
local manip = minetest.get_voxel_manip()
local e1, e2 = manip:read_from_map(pos1, pos2)
local area = VoxelArea:new{MinEdge=e1, MaxEdge=e2}
local data = manip:get_light_data()
-- set non-sunlight everywhere to 15
for i in area:iterp(pos1, pos2) do
-- 4 Bit independent light, 4 Bit sunlight
data[i] = 0xf0 + data[i] % 0x10
end
-- Return the changed, change map and show it to the players
manip:set_light_data(data)
manip:write_to_map()
end
})
Users browsing this forum: No registered users and 39 guests