1
0
Fork 0

make splash potions activate target

This commit is contained in:
AFCMS 2022-02-26 22:42:27 +01:00 committed by cora
parent 6299cd07fa
commit 1a1c592452
1 changed files with 5 additions and 0 deletions

View File

@ -1,6 +1,8 @@
local S = minetest.get_translator(minetest.get_current_modname())
local GRAVITY = tonumber(minetest.settings:get("movement_gravity"))
local mod_target = minetest.get_modpath("mcl_target")
local function splash_image(colorstring, opacity)
if not opacity then
opacity = 127
@ -66,6 +68,9 @@ function mcl_potions.register_splash(name, descr, color, def)
local g = minetest.get_item_group(n, "liquid")
local d = 0.1
local redux_map = {7/8,0.5,0.25}
if mod_target and n == "mcl_target:target_off" then
mcl_target.hit(vector.round(pos), 0.4) --4 redstone ticks
end
if n ~= "air" and n ~= "mcl_portals:portal" and n ~= "mcl_portals:portal_end" and g == 0 or mcl_potions.is_obj_hit(self, pos) then
minetest.sound_play("mcl_potions_breaking_glass", {pos = pos, max_hear_distance = 16, gain = 1})
local texture, acc