Skip to content

Commit

Permalink
Add touch_interaction to grenades
Browse files Browse the repository at this point in the history
  • Loading branch information
grorp authored and LoneWolfHT committed Sep 27, 2024
1 parent a2a8a84 commit f9eae34
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mods/ctf/ctf_modes/ctf_mode_nade_fight/tool.lua
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,8 @@ for idx, info in ipairs(grenade_list) do
return swap_next_grenade(itemstack, user, pointed)
end
end,
on_secondary_use = swap_next_grenade
on_secondary_use = swap_next_grenade,
touch_interaction = "short_dig_long_place", -- throw with short tap
})
end

Expand Down
1 change: 1 addition & 0 deletions mods/pvp/grenades/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ function grenades.register_grenade(name, def)
newdef.description = def.description
newdef.stack_max = math.max(1, def.stack_max or 1)
newdef.inventory_image = def.image
newdef.touch_interaction = "short_dig_long_place" -- throw with short tap
local on_use = function(itemstack, user, pointed_thing)
if pointed_thing.type ~= "node" then
grenades.throw_grenade(name, 17, user)
Expand Down

0 comments on commit f9eae34

Please sign in to comment.