mirror of
https://codeberg.org/tenplus1/mobs_redo.git
synced 2025-11-08 03:05:21 +01:00
show mob repellent area when punched using vizlib (thx SwissalpS)
This commit is contained in:
@@ -207,7 +207,14 @@ core.register_node("mobs:mob_repellent", {
|
|||||||
tiles = {"mobs_repellent.png"},
|
tiles = {"mobs_repellent.png"},
|
||||||
is_ground_content = false,
|
is_ground_content = false,
|
||||||
groups = {handy = 1, cracky = 3},
|
groups = {handy = 1, cracky = 3},
|
||||||
sounds = mobs.node_sound_stone_defaults()
|
sounds = mobs.node_sound_stone_defaults(),
|
||||||
|
on_punch = function(pos, node, player, pointed_thing)
|
||||||
|
|
||||||
|
if minetest.get_modpath("vizlib") and player
|
||||||
|
and player:get_wielded_item():get_name() == "" then
|
||||||
|
vizlib.draw_cube(pos, 16.5, {color = "#6f1a1a", player = player})
|
||||||
|
end
|
||||||
|
end
|
||||||
})
|
})
|
||||||
|
|
||||||
core.register_craft({
|
core.register_craft({
|
||||||
|
|||||||
2
mod.conf
2
mod.conf
@@ -1,4 +1,4 @@
|
|||||||
name = mobs
|
name = mobs
|
||||||
description = Adds a mob api for mods to add animals or monsters etc.
|
description = Adds a mob api for mods to add animals or monsters etc.
|
||||||
optional_depends = default, tnt, invisibility, lucky_block, cmi, toolranks, pathfinder, player_api, mtobjid, visual_harm_1ndicators, mcl_sounds, mesecons
|
optional_depends = default, tnt, invisibility, lucky_block, cmi, toolranks, pathfinder, player_api, mtobjid, visual_harm_1ndicators, mcl_sounds, mesecons, vizlib
|
||||||
min_minetest_version = 5.0
|
min_minetest_version = 5.0
|
||||||
|
|||||||
@@ -34,6 +34,7 @@ https://forum.minetest.net/viewtopic.php?f=11&t=9917
|
|||||||
* Fixed fall damage check when riding mob
|
* Fixed fall damage check when riding mob
|
||||||
* Calculate damage before do_punch function called
|
* Calculate damage before do_punch function called
|
||||||
* Add function to check for dropped items and for mob to do something with them
|
* Add function to check for dropped items and for mob to do something with them
|
||||||
|
* Add vizlib support to draw mob repellent area when punched
|
||||||
|
|
||||||
### Version 1.61
|
### Version 1.61
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user