Lançamento inicial
parent
d245b796d0
commit
8ae76f60b9
27
README.md
27
README.md
|
@ -1 +1,26 @@
|
|||
antipvp
|
||||
# AntiPVP v1.0.0
|
||||
|
||||
[![Baixar](https://img.shields.io/badge/Baixar-v1.0.0-green.svg)](https://github.com/BrunoMine/antipvp/archive/v1.0.0.zip)
|
||||
[![Projeto](https://img.shields.io/badge/Git-Projeto-green.svg)](https://github.com/BrunoMine/antipvp)
|
||||
[![!Bower](https://img.shields.io/badge/Bower-Projeto-green.svg)](https://minetest-bower.herokuapp.com/mods/antipvp)
|
||||
[![Licença](https://img.shields.io/badge/Licença-LGPL_v3.0-blue.svg)](https://github.com/BrunoMine/antipvp/blob/master/LICENSE)
|
||||
|
||||
## Descrição
|
||||
Adiciona itens que impedem PVP em areas
|
||||
|
||||
## Recursos do projeto
|
||||
|
||||
* [Baixar](https://github.com/BrunoMine/antipvp/archive/v1.0.0.zip)
|
||||
* [Projeto](https://github.com/BrunoMine/antipvp)
|
||||
* [Bower](https://minetest-bower.herokuapp.com/mods/antipvp)
|
||||
|
||||
## Licença
|
||||
Veja LICENSE.txt para informações detalhadas da licença LGPL 3.0
|
||||
|
||||
### Autores do código fonte
|
||||
|
||||
Originalmente por BrunoMine, Bruno Borges <borgesdossantosbruno@gmail.com> (LGPL 3.0)
|
||||
|
||||
### Autores de mídias (texturas, modelos and sons)
|
||||
|
||||
BrunoMine, Bruno Borges <borgesdossantosbruno@gmail.com> (CC BY-SA 3.0)
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
default
|
|
@ -0,0 +1 @@
|
|||
Carpete anti PVP
|
|
@ -0,0 +1,48 @@
|
|||
--[[
|
||||
Mod AntiPVP para Minetest
|
||||
Copyright (C) 2017 BrunoMine (https://github.com/BrunoMine)
|
||||
|
||||
Recebeste uma cópia da GNU Lesser General
|
||||
Public License junto com esse software,
|
||||
se não, veja em <http://www.gnu.org/licenses/>.
|
||||
|
||||
Carpete Anti PVP
|
||||
]]
|
||||
|
||||
-- Raio (em blocos) de alcance do Carpete AntPVP
|
||||
local RAIO_ANTPVP = tonumber(minetest.setting_get("antipvp_dist") or 25)
|
||||
|
||||
-- Carpete AntPVP
|
||||
minetest.register_node("antipvp:placa", {
|
||||
description = "Placa Anti PVP",
|
||||
tiles = {"default_sign_wall_wood.png^antipvp_placa.png"},
|
||||
inventory_image = "default_sign_wood.png^antipvp_placa.png",
|
||||
wield_image = "default_sign_wood.png^antipvp_placa.png",
|
||||
drawtype = "nodebox",
|
||||
paramtype = "light",
|
||||
paramtype2 = "wallmounted",
|
||||
is_ground_content = false,
|
||||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
groups = {oddly_breakable_by_hand=3},
|
||||
node_box = {
|
||||
type = "wallmounted",
|
||||
wall_top = {-0.4375, 0.4375, -0.3125, 0.4375, 0.5, 0.3125},
|
||||
wall_bottom = {-0.4375, -0.5, -0.3125, 0.4375, -0.4375, 0.3125},
|
||||
wall_side = {-0.5, -0.3125, -0.4375, -0.4375, 0.3125, 0.4375},
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_on_punchplayer(function(player, hitter)
|
||||
if minetest.find_node_near(player:getpos(), RAIO_ANTPVP, "antipvp:placa") then
|
||||
if hitter then
|
||||
if hitter:is_player() then
|
||||
minetest.chat_send_player(hitter:get_player_name(),"Area Anti PVP. Proibido atacar jogadores nesse local.")
|
||||
else
|
||||
hitter:remove()
|
||||
end
|
||||
return true
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
# Configurações aplicaveis para o menu gráfico
|
||||
|
||||
# Dintancia em blocos que um carpete anti PVP atua
|
||||
antipvp_dist (Distancia de efeito do carpete) int 25 1 50
|
||||
|
||||
|
||||
|
Binary file not shown.
After Width: | Height: | Size: 272 B |
Loading…
Reference in New Issue