mirror of
https://github.com/appgurueu/deathlist.git
synced 2025-02-18 11:53:43 +01:00
Updates via shellscript
This commit is contained in:
@ -19,6 +19,7 @@ Located under `<modpath/gamepath>/deathlist/default_config.json`
|
||||
"hud_base_offset": {"x":0,"y":-122},
|
||||
"enable_environmental": true,
|
||||
"enable_unknown": false,
|
||||
"enable_forbidden_playernames": true,
|
||||
"environmental_reasons": {
|
||||
"falling":{
|
||||
"name":"Falling",
|
||||
@ -63,6 +64,8 @@ X- and Y-Offset, numbers in pixels(?).
|
||||
Boolean, whether to enable environmental reasons inside kill history.
|
||||
#### `enable_unknown`
|
||||
Boolean, whether to enable unknown (none of `falling`, `drowning` or `node_damage`) reasons inside kill history.
|
||||
#### `enable_forbidden_playernames`
|
||||
Boolean, whether to disallow certain playernames in order to reduce confusion(such as "Lava", "Water", "Falling" or "Something")
|
||||
#### `environmental_reasons`
|
||||
Table/Dictionairy of possible deaths due to environment.
|
||||
##### Basic structure of a kill message
|
||||
|
@ -6,6 +6,7 @@
|
||||
"hud_base_offset": {"x":0,"y":-122},
|
||||
"enable_environmental": true,
|
||||
"enable_unknown": false,
|
||||
"enable_forbidden_playernames": true,
|
||||
"environmental_reasons": {
|
||||
"falling":{
|
||||
"name":"Falling",
|
||||
@ -29,7 +30,7 @@
|
||||
"method":"generate",
|
||||
"nodes": {
|
||||
"default:lava_flowing" : { "name" : "Lava", "color" : {"r": 244, "g": 114, "b": 9}, "method" : "fire_basic_flame.png" },
|
||||
"default:lava_source" : { "color" : {"r": 244, "g": 114, "b": 9}, "method" : "fire_basic_flame.png" }
|
||||
"default:lava_source" : { "name" : "Lava", "color" : {"r": 244, "g": 114, "b": 9}, "method" : "fire_basic_flame.png" }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
18
main.lua
18
main.lua
@ -39,6 +39,7 @@ local config=conf.import("deathlist",{
|
||||
hud_base_offset=coordinate,
|
||||
enable_environmental={type="boolean"},
|
||||
enable_unknown={type="boolean"},
|
||||
enable_forbidden_playernames={type="boolean"},
|
||||
|
||||
environmental_reasons={
|
||||
children={
|
||||
@ -65,6 +66,23 @@ local config=conf.import("deathlist",{
|
||||
|
||||
table_ext.add_all(getfenv(1), config)
|
||||
|
||||
if enable_forbidden_playernames then
|
||||
player_ext.register_forbidden_name(environmental_reasons.falling.name)
|
||||
if enable_unknown then
|
||||
player_ext.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
|
||||
player_ext.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
|
||||
player_ext.register_forbidden_name(title)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
table_ext.map(environmental_reasons, function(v)
|
||||
v.color=mt_ext.get_color_int(v.color)
|
||||
return v
|
||||
|
Reference in New Issue
Block a user