minertools: add flashlight setting for UMG.
UMG can be a light source when enabled in mod settings. This works with wielded_light or similar mods, otherwise it does not matter. Signed-off-by: Michal Cieslakiewicz <michal.cieslakiewicz@wp.pl>
This commit is contained in:
parent
d832814daa
commit
a652652310
@ -17,6 +17,13 @@ minertools = {}
|
||||
---------
|
||||
]]--
|
||||
|
||||
-- parameters
|
||||
if minetest.settings:get_bool("minertools_flashlight_on") then
|
||||
light_level = minetest.LIGHT_MAX
|
||||
else
|
||||
light_level = 0
|
||||
end
|
||||
|
||||
-- recognized ores
|
||||
local find_ore_list = { "default:stone_with_coal",
|
||||
"default:stone_with_iron",
|
||||
@ -841,6 +848,7 @@ minetest.register_tool("minertools:ultimate_mining_gizmo", {
|
||||
wield_image = "minertools_umg_hand.png",
|
||||
wield_scale = { x = 1, y = 1, z = 1 },
|
||||
inventory_image = "minertools_umg_inv.png",
|
||||
light_source = light_level,
|
||||
stack_max = 1,
|
||||
range = 12, -- AMA + 2
|
||||
_init_metadata = multidevice_init_metadata,
|
||||
|
3
minertools/settingtypes.txt
Normal file
3
minertools/settingtypes.txt
Normal file
@ -0,0 +1,3 @@
|
||||
# Make Ultimate Mining Gizmo a light source, works only if wielded_light
|
||||
# or similar mod is active, otherwise does nothing (and doesn't hurt either)
|
||||
minertools_flashlight_on (UMG has flashlight - requires mod like wielded_light) bool false
|
Loading…
x
Reference in New Issue
Block a user