mirror of
https://github.com/LoneWolfHT/grenades_basic.git
synced 2024-08-20 04:44:08 +02:00
Fixes and improvements
This commit is contained in:
parent
82d7358ebe
commit
6baa50a374
@ -1,2 +0,0 @@
|
|||||||
# grenades_basic
|
|
||||||
Adds some basic grenades using the grenades api
|
|
@ -72,3 +72,9 @@ else
|
|||||||
level = 1,
|
level = 1,
|
||||||
})
|
})
|
||||||
end
|
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
|
3
init.lua
3
init.lua
@ -64,6 +64,7 @@ grenades.register_grenade("grenades_basic:regular", {
|
|||||||
grenades.register_grenade("grenades_basic:flashbang", {
|
grenades.register_grenade("grenades_basic:flashbang", {
|
||||||
description = "Flashbang grenade (Blinds all who look at blast)",
|
description = "Flashbang grenade (Blinds all who look at blast)",
|
||||||
image = "grenades_flashbang.png",
|
image = "grenades_flashbang.png",
|
||||||
|
clock = 4,
|
||||||
on_explode = function(pos)
|
on_explode = function(pos)
|
||||||
for _, v in ipairs(minetest.get_objects_inside_radius(pos, 20)) do
|
for _, v in ipairs(minetest.get_objects_inside_radius(pos, 20)) do
|
||||||
local hit = minetest.raycast(pos, v:get_pos(), true, true):next()
|
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", {
|
grenades.register_grenade("grenades_basic:smoke", {
|
||||||
description = "Smoke grenade (Generates smoke around blast site)",
|
description = "Smoke grenade (Generates smoke around blast site)",
|
||||||
image = "grenades_smoke_grenade.png",
|
image = "grenades_smoke_grenade.png",
|
||||||
|
clock = 2,
|
||||||
on_explode = function(pos)
|
on_explode = function(pos)
|
||||||
|
|
||||||
minetest.sound_play("glasslike_break", {
|
minetest.sound_play("glasslike_break", {
|
||||||
pos = pos,
|
pos = pos,
|
||||||
gain = 1.0,
|
gain = 1.0,
|
||||||
|
2
readme.md
Normal file
2
readme.md
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
# grenades_basic
|
||||||
|
Adds some basic grenades using the grenades API
|
Loading…
Reference in New Issue
Block a user