[Mod] Flood Light [flood_light]

Post Reply
User avatar
zm78
Member
Posts: 72
Joined: Thu Dec 17, 2015 22:34
GitHub: zander999
IRC: [none]
In-game: zm78

[Mod] Flood Light [flood_light]

by zm78 » Post

adds a flood light.

screenshots: Image

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:
flood_light.zip
(1.07 KiB) Downloaded 127 times
Attachments
2017-03-16-093955_1920x1080_scrot.png
2017-03-16-093955_1920x1080_scrot.png (11.86 KiB) Viewed 486 times
Last edited by zm78 on Thu Mar 16, 2017 03:48, edited 1 time in total.

User avatar
octacian
Member
Posts: 597
Joined: Mon Dec 21, 2015 22:18
GitHub: octacian
IRC: octacian
In-game: octacian
Location: Canada

Re: [Mod]flood light[flood_light]

by octacian » Post

The meselamp is already as bright as possible (in 0.4.15). Also, rather than uploading a ZIP, since your mod is on GitHub you can just link to https://github.com/zander999/flood_ligh ... master.zip (the same goes for anything on GitHub - to get this link click "Clone or Download", right-click "Download ZIP" and select "Copy Address").
MicroExpansion, Working Computers, All Projects - Check out my YouTube channel! (octacian)
I'm currently inactive in the Minetest community! So if I don't respond, that's why.

User avatar
zm78
Member
Posts: 72
Joined: Thu Dec 17, 2015 22:34
GitHub: zander999
IRC: [none]
In-game: zm78

Re: [Mod]flood light[flood_light]

by zm78 » Post

ok just made it for fun

User avatar
octacian
Member
Posts: 597
Joined: Mon Dec 21, 2015 22:18
GitHub: octacian
IRC: octacian
In-game: octacian
Location: Canada

Re: [Mod]flood light[flood_light]

by octacian » Post

Yep, that's what mods are for :D
MicroExpansion, Working Computers, All Projects - Check out my YouTube channel! (octacian)
I'm currently inactive in the Minetest community! So if I don't respond, that's why.

User avatar
Diamond knight
Member
Posts: 475
Joined: Sun Apr 19, 2015 19:50
GitHub: Diamondknight
In-game: Ferrumprinceps
Location: Chilling in Constantinople
Contact:

Re: [Mod]flood light[flood_light]

by Diamond knight » Post

The brightness of 15 being highest needs to change sometime.
You should make it generate airlike nodes around it that each have a brightness of 15 (by abm) as a hacky way for right now.

User avatar
Hybrid Dog
Member
Posts: 2834
Joined: Thu Nov 01, 2012 12:46
GitHub: HybridDog

by Hybrid Dog » Post

You don't need additional nodes, you can set the light manually using vmanip.

Code: Select all

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
})
Image
l need to rework my shadows mod…
Attachments
screenshot_20170316_205942.png
screenshot_20170316_205942.png (623.17 KiB) Viewed 485 times

‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪

User avatar
zm78
Member
Posts: 72
Joined: Thu Dec 17, 2015 22:34
GitHub: zander999
IRC: [none]
In-game: zm78

Re: [Mod]flood light[flood_light]

by zm78 » Post

ok but it was made a bright decoration

User avatar
azekill_DIABLO
Member
Posts: 7507
Joined: Wed Oct 29, 2014 20:05
GitHub: azekillDIABLO
In-game: azekill_DIABLO
Location: OMICRON
Contact:

Re: [Mod] Flood Light [flood_light]

by azekill_DIABLO » Post

is this still continued? :D
Gone, but not dead. Contact me on discord: azekill_DIABLO#6565
DMs are always open if you want to get in touch!

User avatar
Hybrid Dog
Member
Posts: 2834
Joined: Thu Nov 01, 2012 12:46
GitHub: HybridDog

Re: [Mod] Flood Light [flood_light]

by Hybrid Dog » Post

Doesn't look it.

‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪

Post Reply

Who is online

Users browsing this forum: No registered users and 34 guests