[Mod] Flood Light [flood_light]

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

User avatar
octacian
Member
 
Posts: 593
Joined: Mon Dec 21, 2015 22:18
Location: BC, Canada
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").
MicroExpansion, Working Computers, All Projects - Check out my YouTube channel! (octacian)
 

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

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

User avatar
Diamond knight
Member
 
Posts: 442
Joined: Sun Apr 19, 2015 19:50
Location: stalker...
GitHub: Diamondknight
In-game: Ferrumprinceps

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.
The IMPERIVM FERRVM shall once more blossom!
viewtopic.php?f=3&t=20851

My modding team:
https://github.com/Ferrumian-modding-team
https://discord.gg/FDjC2ah
 

User avatar
Hybrid Dog
Member
 
Posts: 2684
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.
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
(623.17 KiB) Not downloaded yet

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

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

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

User avatar
Hybrid Dog
Member
 
Posts: 2684
Joined: Thu Nov 01, 2012 12:46

Re: [Mod] Flood Light [flood_light]

by Hybrid Dog » Thu Sep 28, 2017 10:10

Doesn't look it.

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


Return to Mod Releases



Who is online

Users browsing this forum: Exabot [Bot] and 4 guests