add energy globe sounds

This commit is contained in:
Tai Kedzierski 2018-12-26 19:26:47 +00:00
parent dec3cf95e7
commit b055abd90d
3 changed files with 10 additions and 1 deletions

View File

@ -15,7 +15,9 @@ This mod is a continuation of NPX Team's Not So Simple Mobs. Notes from the orig
* License for the code: `LGPLv2.1 or later` * License for the code: `LGPLv2.1 or later`
* see [LICENSE.txt](LICENSE.txt) and [license_notes.md](license_notes.md) for info on the license update * see [LICENSE.txt](LICENSE.txt) and [license_notes.md](license_notes.md) for info on the license update
* Copyright NPX Team and contributors * Copyright NPX Team and contributors
* License for all the models, textures and sounds: `CC-BY-SA 4.0`, attribution "NPX Team" * License for all the models, textures and sounds, except those mentioned further: `CC-BY-SA 4.0`, attribution "NPX Team"
* License for individual artistic contributions:
* `sounds/nssm_energy_powerup.ogg` - Tai Kedzierski, CC-BY-SA 4.0
## Dependencies ## Dependencies

View File

@ -47,6 +47,13 @@ local function set_player_boost(user, duration, power)
local remaining = stack_boost(user:get_player_name(), duration) local remaining = stack_boost(user:get_player_name(), duration)
minetest.chat_send_player(user:get_player_name(), "You have "..(math.floor(remaining*10)/10).."s of boost") minetest.chat_send_player(user:get_player_name(), "You have "..(math.floor(remaining*10)/10).."s of boost")
local userpos = user:get_pos()
minetest.sound_play("nssm_energy_powerup", {
pos = userpos,
max_hear_distance = 20,
gain = 1,
})
end end
minetest.register_globalstep(function(dtime) minetest.register_globalstep(function(dtime)

Binary file not shown.