Disallow machine-petting

...on relevant versions of NC that support the "cuddly" group.

More automated ways to get furballs from cats MAY be supported, but
it probably doesn't make sense to use the "petting" mechanic,
especially since it only ever worked as long as a player is within
5m of the cat anyway.

Maybe something involving a brush/rake?
This commit is contained in:
Aaron Suen 2023-04-26 07:25:31 -04:00
parent 627adce2ee
commit 570a634ec8

View File

@ -115,10 +115,11 @@ function myapi.notpurring(pos)
return not purrtime and {}
end
local petgroups = minetest.registered_items[""].tool_capabilities.groupcaps.cuddly and {cuddly = 1} or {thumpy = 1}
nodecore.register_craft({
label = "pet cat",
action = "pummel",
toolgroups = {thumpy = 1},
toolgroups = petgroups,
indexkeys = {"group:" .. modname .. "_face"},
check = function(pos)
return myapi.notpurring(pos) and playernear(pos)