[Mod] Flood Light [flood_light]

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

[Mod] Flood Light [flood_light]

by zm78 » Thu Mar 16, 2017 00:08

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

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

Re: [Mod]flood light[flood_light]

by octacian » Thu Mar 16, 2017 00:50

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").
God isn't dead!

My Coolest Mods:
MicroExpansion, Working Computers, Interchangeable Hands

Check out my YouTube channel! (octacian)
 

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

Re: [Mod]flood light[flood_light]

by zm78 » Thu Mar 16, 2017 03:47

ok just made it for fun
 

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

Re: [Mod]flood light[flood_light]

by octacian » Thu Mar 16, 2017 03:49

Yep, that's what mods are for :D
God isn't dead!

My Coolest Mods:
MicroExpansion, Working Computers, Interchangeable Hands

Check out my YouTube channel! (octacian)
 

Diamond knight
Member
 
Posts: 262
Joined: Sun Apr 19, 2015 19:50
In-game: Diamondknight or diamond_knight

Re: [Mod]flood light[flood_light]

by Diamond knight » Thu Mar 16, 2017 17:32

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.
I can never get enough MESE!!!!!!!!!

my subgame: https://forum.minetest.net/viewtopic.php?f=50&t=11901
 

Hybrid Dog
Member
 
Posts: 2460
Joined: Thu Nov 01, 2012 12:46

by Hybrid Dog » Thu Mar 16, 2017 20:08

You don't need additional nodes, you can set the light manually using vmanip.
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
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 1664 times
 

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

Re: [Mod]flood light[flood_light]

by zm78 » Thu Mar 16, 2017 20:31

ok but it was made a bright decoration
 


Return to Mod Releases

Who is online

Users browsing this forum: No registered users and 45 guests

cron