Add: shield
parent
3ada5f6810
commit
157b6382e9
|
@ -0,0 +1 @@
|
|||
name = pvp_pack
|
|
@ -0,0 +1,61 @@
|
|||
License of source code
|
||||
----------------------
|
||||
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2020 Coder12
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
||||
For more details:
|
||||
https://opensource.org/licenses/MIT
|
||||
|
||||
Licenses of textures
|
||||
----------------------------
|
||||
Files:
|
||||
pvp_shields_steel.png
|
||||
|
||||
are under the license below:
|
||||
|
||||
Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0)
|
||||
https://creativecommons.org/licenses/by-sa/3.0/
|
||||
Copyright (c) 2020 Coder12
|
||||
|
||||
Licenses of sound effects
|
||||
----------------------------
|
||||
both audio files shield_equip.ogg and, shield_dequip.ogg are edited versions of samrbyrne's metal armour:
|
||||
https://freesound.org/people/samrbyrne/sounds/476626/
|
||||
|
||||
Attribution 3.0 Unported (CC BY 3.0)
|
||||
https://creativecommons.org/licenses/by/3.0/
|
||||
Copyright (c) 2019 samrbyrne
|
||||
|
||||
audio file shield_impact1.ogg is an edited version of jorickhoofd's Metal hit with metal bar resonance:
|
||||
https://freesound.org/people/jorickhoofd/sounds/160045/
|
||||
|
||||
Attribution 3.0 Unported (CC BY 3.0)
|
||||
https://creativecommons.org/licenses/by/3.0/
|
||||
Copyright (c) 2012 jorickhoofd
|
||||
|
||||
audio file shield_guard_break.ogg is an edited version of farbin's metal_drop_2:
|
||||
https://freesound.org/people/farbin/sounds/36633/
|
||||
|
||||
Sampling Plus 1.0
|
||||
https://creativecommons.org/licenses/sampling+/1.0/
|
||||
Copyright (c) 2007 farbin
|
|
@ -0,0 +1 @@
|
|||
|
|
@ -0,0 +1,37 @@
|
|||
local sound_play = minetest.sound_play
|
||||
|
||||
minetest.register_tool("pvp_shields:shield_steel", {
|
||||
description = "Steel Shield",
|
||||
inventory_image = "pvp_shields_steel.png",
|
||||
groups = {armor_shield = 1, -- Is a shield.
|
||||
block_pool = 50, -- 50 guard points.
|
||||
duration = 10000000 -- 10 seconds.
|
||||
},
|
||||
on_block_activate = function(player)
|
||||
sound_play("shield_equip", {
|
||||
pos = player:get_pos(),
|
||||
gain = 0.5,
|
||||
}, true)
|
||||
end,
|
||||
|
||||
on_block_deactivated = function(player)
|
||||
sound_play("shield_dequip", {
|
||||
pos = player:get_pos(),
|
||||
gain = 0.5,
|
||||
}, true)
|
||||
end,
|
||||
|
||||
on_block_damage = function(player, damage)
|
||||
sound_play("shield_impact1", {
|
||||
pos = player:get_pos(),
|
||||
gain = 0.5,
|
||||
}, true)
|
||||
end,
|
||||
|
||||
on_guard_break = function(player)
|
||||
sound_play("shield_guard_break", {
|
||||
pos = player:get_pos(),
|
||||
gain = 0.8,
|
||||
}, true)
|
||||
end
|
||||
})
|
|
@ -0,0 +1,2 @@
|
|||
name = pvp_shields
|
||||
depends = pvp_revamped
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
After Width: | Height: | Size: 229 B |
Loading…
Reference in New Issue