support for wielded_light shining

supports also wielded_light.register_item_light("throwing:arrow", light_level) to set the light level
This commit is contained in:
Alexander Weber 2018-05-08 22:42:19 +02:00 committed by Pierre-Adrien Langrognet
parent be9d9753c4
commit 90b85cdb2e
2 changed files with 5 additions and 0 deletions

View File

@ -1,2 +1,3 @@
mesecons?
mesecons_button?
wielded_light?

View File

@ -195,6 +195,10 @@ local function arrow_step(self, dtime)
end
end
-- Support for shining items using wielded light
if minetest.global_exists("wielded_light") and self.object then
wielded_light.update_light_by_item(self.item, self.object:get_pos())
end
self.last_pos = pos -- Used by the build arrow
end