Move mob capturing tool functions around
This commit is contained in:
parent
ad10832839
commit
c9daa409db
@ -5,8 +5,6 @@ local capture_tools = {}
|
|||||||
rp_mobs.register_capture_tool = function(toolname, def)
|
rp_mobs.register_capture_tool = function(toolname, def)
|
||||||
capture_tools[toolname] = { uses = def.tool_uses, sound = def.sound, sound_gain = def.sound_gain, sound_max_hear_distance = def.sound_max_hear_distance }
|
capture_tools[toolname] = { uses = def.tool_uses, sound = def.sound, sound_gain = def.sound_gain, sound_max_hear_distance = def.sound_max_hear_distance }
|
||||||
end
|
end
|
||||||
rp_mobs.register_capture_tool("rp_mobs:lasso", { uses = 43, sound = "mobs_lasso_swing", sound_gain = 0.3, sound_max_hear_distance = 24})
|
|
||||||
rp_mobs.register_capture_tool("rp_mobs:net", { uses = 17, sound = "mobs_swing", sound_gain = 0.2, sound_max_hear_distance = 16})
|
|
||||||
|
|
||||||
rp_mobs.attempt_capture = function(self, clicker, capture_chances, force_take, replace_with)
|
rp_mobs.attempt_capture = function(self, clicker, capture_chances, force_take, replace_with)
|
||||||
if clicker:is_player() and clicker:get_inventory() and not self.child then
|
if clicker:is_player() and clicker:get_inventory() and not self.child then
|
||||||
|
@ -67,6 +67,8 @@ crafting.register_craft(
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
rp_mobs.register_capture_tool("rp_mobs:net", { uses = 17, sound = "mobs_swing", sound_gain = 0.2, sound_max_hear_distance = 16})
|
||||||
|
|
||||||
-- Lasso
|
-- Lasso
|
||||||
|
|
||||||
minetest.register_tool(
|
minetest.register_tool(
|
||||||
@ -90,6 +92,9 @@ crafting.register_craft(
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
rp_mobs.register_capture_tool("rp_mobs:lasso", { uses = 43, sound = "mobs_lasso_swing", sound_gain = 0.3, sound_max_hear_distance = 24})
|
||||||
|
|
||||||
|
|
||||||
-- Compability with Repixture 3.10.0 and earlier
|
-- Compability with Repixture 3.10.0 and earlier
|
||||||
minetest.register_alias("mobs:net", "rp_mobs:net")
|
minetest.register_alias("mobs:net", "rp_mobs:net")
|
||||||
minetest.register_alias("mobs:lasso", "rp_mobs:lasso")
|
minetest.register_alias("mobs:lasso", "rp_mobs:lasso")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user