22 lines
905 B
Markdown
Raw Normal View History

2018-01-10 10:15:28 +01:00
# wielded_light mod for Minetest
2018-01-10 10:14:33 +01:00
2018-01-10 10:23:08 +01:00
Idea taken from torches_wieldlight in https://github.com/minetest-mods/torches, but written from scratch and usable for all shining items.
2018-01-10 10:14:33 +01:00
![Screenshot](https://github.com/bell07/minetest-wielded_light/raw/master/screenshot.png)
2018-01-13 15:19:06 +01:00
All bright nodes with light value > 2 lighten the player environment if wielded, with value fewer by 2. (Torch 13->11 for example)
2018-01-10 10:17:43 +01:00
2018-01-10 10:14:33 +01:00
Dependencies: none
License: [GPL-3](https://github.com/bell07/minetest-wielded_light/blob/master/LICENSE)
2018-01-13 15:19:06 +01:00
Shining API:
`function wielded_light.update_light(pos, light_level)`
Enable or update the shining at pos with light_level for 0.6 seconds. Can be used in any on_step call to get other entitys shining for example
`wielded_light.register_item_light(itemname, light_level)`
Override or set custom light level to an item. This does not change the item/node definition, just the lighting in this mod.