Fixes and improvements

This commit is contained in:
LoneWolfHT 2019-04-03 12:42:24 -07:00
parent 82d7358ebe
commit 6baa50a374
6 changed files with 10 additions and 3 deletions

@ -1,2 +0,0 @@
# grenades_basic
Adds some basic grenades using the grenades api

@ -71,4 +71,10 @@ else
always_known = true,
level = 1,
})
end
if minetest.get_modpath("ctf_treasure") then
treasurer.register_treasure("ctf_grenades:grenade_regular", 0.4, 2, 1)
treasurer.register_treasure("ctf_grenades:grenade_smoke", 0.4, 2, 1)
treasurer.register_treasure("ctf_grenades:grenade_flashbang", 0.4, 2, 1)
end

@ -64,6 +64,7 @@ grenades.register_grenade("grenades_basic:regular", {
grenades.register_grenade("grenades_basic:flashbang", {
description = "Flashbang grenade (Blinds all who look at blast)",
image = "grenades_flashbang.png",
clock = 4,
on_explode = function(pos)
for _, v in ipairs(minetest.get_objects_inside_radius(pos, 20)) do
local hit = minetest.raycast(pos, v:get_pos(), true, true):next()
@ -110,8 +111,8 @@ grenades.register_grenade("grenades_basic:flashbang", {
grenades.register_grenade("grenades_basic:smoke", {
description = "Smoke grenade (Generates smoke around blast site)",
image = "grenades_smoke_grenade.png",
clock = 2,
on_explode = function(pos)
minetest.sound_play("glasslike_break", {
pos = pos,
gain = 1.0,

2
readme.md Normal file

@ -0,0 +1,2 @@
# grenades_basic
Adds some basic grenades using the grenades API