document the new options for unswappable nodes and spears adjustment

This commit is contained in:
Tai Kedzierski 2019-01-08 11:25:50 +00:00
parent 5a99350b72
commit 785d23f0d2
3 changed files with 22 additions and 5 deletions

View File

@ -11,7 +11,7 @@ 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`
* see [LICENSE.txt](LICENSE.txt) and [license_notes.md](license_notes.md) for info on the license update
* Copyright NPX Team and contributors
* License for non-code assets: see `LICENSE_ART.txt`
* License for non-code assets: see `LICENSE_MEDIA.txt`
## Core Dependencies
@ -29,8 +29,15 @@ This mod provides some extra settings for fine tuning the experience:
* `nssm.energy_lights` - allows placing energy as temporary light sources
* `nssm.unswappable_nodes` - Various mobs and tools replace nodes int he environment as part of their attacks and movements.
* This list defines nodes that cannot be swapped by such activities
* `bones:bones` and `default:chest_locked` are always unswappable
## Some notes from NPX Team !
* `nssm.spearmodifier` - Allows slowing down spears. `1` for default speed, `0.5` for half speed
* Impact is still preserved
* Use this setting if the server experiences lag ; fast spears on laggy servers rarely get collision-detected
## The original notes from NPX Team ! --¬
We suggest that you play nssm with:
@ -54,3 +61,5 @@ Here are the trailers of the mod:
* nssm 2.1: <https://www.youtube.com/watch?v=ccLUt58mo0k>
* nssm 3.0: <https://www.youtube.com/watch?v=ZBuAi1sQJxQ>
NPX Team ~

View File

@ -5,14 +5,22 @@ local c_obsidian = minetest.get_content_id("default:obsidian")
local c_brick = minetest.get_content_id("default:obsidianbrick")
local c_chest = minetest.get_content_id("default:chest_locked")
nssm.unswappable_nodes[#nssm.unswappable_nodes+1] = "bones:bones"
nssm.unswappable_nodes[#nssm.unswappable_nodes+1] = "default:chest_locked"
local always_unswappable_nodes = {
"bones:bones",
"default:chest_locked",
}
for _,v in ipairs(always_unswappable_nodes) do
if not nssm.unswappable_nodes[v] then
nssm.unswappable_nodes[#nssm.unswappable_nodes+1] = v
end
end
-- Return true if the original_node should not be swapped
nssm.unswappable_node = function (pos, node_list)
local _, node, original_node
original_node = minetest.env:get_node(pos).name
-- Return true if the original_node should not be swapped
if original_node ~= "air" and not minetest.registered_nodes[original_node] then
-- remnant unknown block
return true