mirror of
https://git.minetest.land/MineClone2/MineClone2.git
synced 2024-11-25 04:13:44 +01:00
Replace bow_0 and bow_1 after shoot
This commit is contained in:
parent
64ae08073a
commit
feca7cf694
@ -78,6 +78,7 @@ minetest.register_tool("mcl_throwing:bow_0", {
|
|||||||
on_secondary_use = powerup_function("mcl_throwing:bow_1"),
|
on_secondary_use = powerup_function("mcl_throwing:bow_1"),
|
||||||
on_use = function(itemstack, user, pointed_thing)
|
on_use = function(itemstack, user, pointed_thing)
|
||||||
local wear = itemstack:get_wear()
|
local wear = itemstack:get_wear()
|
||||||
|
itemstack:replace("mcl_throwing:bow")
|
||||||
itemstack:add_wear(wear)
|
itemstack:add_wear(wear)
|
||||||
if player_shoot_arrow(itemstack, user, pointed_thing) then
|
if player_shoot_arrow(itemstack, user, pointed_thing) then
|
||||||
if not minetest.setting_getbool("creative_mode") then
|
if not minetest.setting_getbool("creative_mode") then
|
||||||
@ -97,6 +98,7 @@ minetest.register_tool("mcl_throwing:bow_1", {
|
|||||||
on_secondary_use = powerup_function("mcl_throwing:bow_2"),
|
on_secondary_use = powerup_function("mcl_throwing:bow_2"),
|
||||||
on_use = function(itemstack, user, pointed_thing)
|
on_use = function(itemstack, user, pointed_thing)
|
||||||
local wear = itemstack:get_wear()
|
local wear = itemstack:get_wear()
|
||||||
|
itemstack:replace("mcl_throwing:bow")
|
||||||
itemstack:add_wear(wear)
|
itemstack:add_wear(wear)
|
||||||
if player_shoot_arrow(itemstack, user, pointed_thing) then
|
if player_shoot_arrow(itemstack, user, pointed_thing) then
|
||||||
if not minetest.setting_getbool("creative_mode") then
|
if not minetest.setting_getbool("creative_mode") then
|
||||||
|
Loading…
Reference in New Issue
Block a user