mirror of
https://github.com/LoneWolfHT/grenades_basic.git
synced 2024-11-27 01:03:48 +01: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
|
@ -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
|
3
init.lua
3
init.lua
@ -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
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