mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-17 00:21:07 +01:00
make lingering potions activate target (+ indentation fix)
This commit is contained in:
parent
1a1c592452
commit
fb35af4dba
1 changed files with 66 additions and 61 deletions
|
@ -1,5 +1,7 @@
|
||||||
local S = minetest.get_translator(minetest.get_current_modname())
|
local S = minetest.get_translator(minetest.get_current_modname())
|
||||||
|
|
||||||
|
local mod_target = minetest.get_modpath("mcl_target")
|
||||||
|
|
||||||
local function lingering_image(colorstring, opacity)
|
local function lingering_image(colorstring, opacity)
|
||||||
if not opacity then
|
if not opacity then
|
||||||
opacity = 127
|
opacity = 127
|
||||||
|
@ -141,6 +143,9 @@ minetest.register_entity(id.."_flying",{
|
||||||
local n = node.name
|
local n = node.name
|
||||||
local g = minetest.get_item_group(n, "liquid")
|
local g = minetest.get_item_group(n, "liquid")
|
||||||
local d = 4
|
local d = 4
|
||||||
|
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
|
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})
|
minetest.sound_play("mcl_potions_breaking_glass", {pos = pos, max_hear_distance = 16, gain = 1})
|
||||||
add_lingering_effect(pos, color, def, name == "water")
|
add_lingering_effect(pos, color, def, name == "water")
|
||||||
|
|
Loading…
Reference in a new issue