mirror of
https://github.com/appgurueu/deathlist.git
synced 2024-10-05 16:53:03 +02:00
Don't forbid playernames anymore
This commit is contained in:
parent
73aa67213e
commit
cba28a6ad5
@ -56,7 +56,6 @@ player:set_hp(0, {
|
|||||||
"hud_base_offset": {"x":0,"y":-122},
|
"hud_base_offset": {"x":0,"y":-122},
|
||||||
"enable_environmental": true,
|
"enable_environmental": true,
|
||||||
"enable_unknown": false,
|
"enable_unknown": false,
|
||||||
"enable_forbidden_playernames": true,
|
|
||||||
"environmental_reasons": {
|
"environmental_reasons": {
|
||||||
"falling":{
|
"falling":{
|
||||||
"name":"Falling",
|
"name":"Falling",
|
||||||
|
@ -6,7 +6,6 @@
|
|||||||
"hud_base_offset": {"x":0,"y":-122},
|
"hud_base_offset": {"x":0,"y":-122},
|
||||||
"enable_environmental": true,
|
"enable_environmental": true,
|
||||||
"enable_unknown": true,
|
"enable_unknown": true,
|
||||||
"enable_forbidden_playernames": true,
|
|
||||||
"environmental_reasons": {
|
"environmental_reasons": {
|
||||||
"falling":{
|
"falling":{
|
||||||
"name":"Falling",
|
"name":"Falling",
|
||||||
|
17
main.lua
17
main.lua
@ -48,7 +48,6 @@ local config = modlib.conf.import("deathlist", {
|
|||||||
hud_base_offset = coordinate,
|
hud_base_offset = coordinate,
|
||||||
enable_environmental = { type = "boolean" },
|
enable_environmental = { type = "boolean" },
|
||||||
enable_unknown = { type = "boolean" },
|
enable_unknown = { type = "boolean" },
|
||||||
enable_forbidden_playernames = { type = "boolean" },
|
|
||||||
environmental_reasons = {
|
environmental_reasons = {
|
||||||
children = {
|
children = {
|
||||||
falling = name_color_method,
|
falling = name_color_method,
|
||||||
@ -60,22 +59,6 @@ local config = modlib.conf.import("deathlist", {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
modlib.table.add_all(getfenv(1), config)
|
modlib.table.add_all(getfenv(1), config)
|
||||||
if enable_forbidden_playernames then
|
|
||||||
modlib.player.register_forbidden_name(environmental_reasons.falling.name)
|
|
||||||
if enable_unknown then
|
|
||||||
modlib.player.register_forbidden_name(environmental_reasons.unknown.name)
|
|
||||||
end
|
|
||||||
for name, node in pairs(minetest.registered_nodes) do
|
|
||||||
if (node.drowning or 0) > 0 then
|
|
||||||
local title = (environmental_reasons.drowning.nodes[name] or {}).name or node.description
|
|
||||||
modlib.player.register_forbidden_name(title)
|
|
||||||
end
|
|
||||||
if (node.damage_per_second or 0) > 0 then
|
|
||||||
local title = (environmental_reasons.node_damage.nodes[name] or {}).name or node.description
|
|
||||||
modlib.player.register_forbidden_name(title)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
for _, table in pairs{ environmental_reasons, environmental_reasons.drowning.nodes, environmental_reasons.node_damage.nodes } do
|
for _, table in pairs{ environmental_reasons, environmental_reasons.drowning.nodes, environmental_reasons.node_damage.nodes } do
|
||||||
for _, value in pairs(table) do
|
for _, value in pairs(table) do
|
||||||
if value.color then
|
if value.color then
|
||||||
|
@ -27,4 +27,3 @@ deathlist.environmental_reasons.node_damage.color.r (Deathlist environmental_rea
|
|||||||
deathlist.environmental_reasons.node_damage.color.b (Deathlist environmental_reasons node_damage color b) int 255
|
deathlist.environmental_reasons.node_damage.color.b (Deathlist environmental_reasons node_damage color b) int 255
|
||||||
deathlist.environmental_reasons.node_damage.color.g (Deathlist environmental_reasons node_damage color g) int 255
|
deathlist.environmental_reasons.node_damage.color.g (Deathlist environmental_reasons node_damage color g) int 255
|
||||||
deathlist.max_messages (Deathlist max_messages) float 5
|
deathlist.max_messages (Deathlist max_messages) float 5
|
||||||
deathlist.enable_forbidden_playernames (Deathlist enable_forbidden_playernames) bool true
|
|
Loading…
Reference in New Issue
Block a user