Version 20220212 Protection respection!

master
francisco athens 2022-02-12 16:19:01 -08:00
parent bfcff133d0
commit 26a2749bfc
6 changed files with 18 additions and 1357 deletions

View File

@ -1,6 +1,6 @@
# [witches] Witches (Mobs Redo addon) [mod] for Minetest
Witches is copyright 2020 Francisco Athens, Ramona Athens, Damon Athens and Simone Athens
Witches is copyright 2022 Francisco Athens, Ramona Athens, Damon Athens and Simone Athens
The MIT License (MIT)
* code/issue tracking :https://gitlab.com/freelikegnu/witches
@ -15,14 +15,10 @@ Witches inhabit the land! They are currently in development but, can already:
* If you are repeatedly helpful to a witch...
* Witch cottages adapted from Sokomine's basic_houses:
(https://github.com/Sokomine/basic_houses) mod under under MIT license
with permission from author.
Option requires Sokomine's handle_schematics mod (also GPLv3)
https://github.com/Sokomine/handle_schematics
Settings provided from settings menu!
* New Witch cottage code with no additional mod requirements!
* If Protection mod is available and enabled, Witches will no build in these areas!
* Some cottages will spawn over a dungeon if they are near the surface
* Have a name and origin location which they will tell player.
@ -43,8 +39,7 @@ Witches inhabit the land! They are currently in development but, can already:
* Mobs Redo git repository: https://notabug.org/TenPlus1/mobs_redo
## Optional Mods:
* For Witches Cottages: Sokomine's handle_schematics mod (GPLv3)
* git repository: https://github.com/Sokomine/handle_schematics
* Protection to prevent Witches from placing cottages in protected areas!
* Any mobs from any mobs mod attacking Witches may be turned into a sheep!
@ -72,10 +67,6 @@ Witches inhabit the land! They are currently in development but, can already:
* sheep.lua code adapted from mobs_animals by TenPlus1 and authors credited in sheep.lua
* Witch houses code adapted from Sokomine's basic_houses
(https://github.com/Sokomine/basic_houses) mod under MIT license
with permission from author.
* Sound files:
witches_magic01.ogg MATRIXXX_ December 28th, 2018 CC-BY 3.0
https://freesound.org/people/MATRIXXX_/sounds/455205/

File diff suppressed because it is too large Load Diff

View File

@ -1,3 +1,4 @@
2022/02/12: Witches honor protected nodes ("protection" mod support)
2020/08/10: Testing new cottage building code.
2020/08/06: Fixed witches not registered when handle_schematics is not loaded! D'oh!
2020/08/01: Witches have two new wands from Damon and Simone!

View File

@ -62,13 +62,16 @@ function witches.grounding(self,vol_vec,required_list,exception_list,replacement
local rlist = required_list or {"soil","crumbly"}
local elist = exception_list or {"group:stone","group:cracky","group:wood", "group:tree"}
local exceptions = minetest.find_nodes_in_area_under_air(ck_pos1, ck_pos2,elist)
local protected_area = minetest.is_area_protected(ck_pos1, ck_pos2, "", 2)
if #exceptions and #exceptions >= 1 then
print("exceptions count = "..#exceptions)
return
elseif protected_area then
print("protected area found at "..mtpts(protected_area))
return
else
print("SUCCESS!".."pos1 = ".. mtpts(pos1).."pos2 = ".. mtpts(pos2))
print("SUCCESS!".."pos1 = ".. mtpts(pos1).."pos2 = ".. mtpts(pos2))
local volume = {pos1,pos2}
local ck_volume = {ck_pos1,ck_pos2}

View File

@ -5,7 +5,7 @@
local path = minetest.get_modpath("witches")
witches = {}
witches.version = "20200816"
witches.version = "20220212"
print("This is Witches "..witches.version.."!")
-- Strips any kind of escape codes (translation, colors) from a string
@ -63,16 +63,9 @@ dofile(path .. "/nodes.lua")
dofile(path .. "/sheep.lua")
dofile(path .. "/magic.lua")
witches.cottages = false
if not minetest.get_modpath("handle_schematics") then
print("optional handle_schematics not found!\n Witch cottages not available!")
dofile(path .. "/cottages.lua")
witches.cottages = true
else
dofile(path .. "/basic_houses.lua")
print("handle_schematics found! Witch cottages enabled!")
end
dofile(path .. "/cottages.lua")
witches.cottages = true
dofile(path .. "/witches.lua")

View File

@ -1,4 +1,4 @@
name = witches
descriptions = adds witches
descriptions = adds witches and their cottages
depends = default, mobs
optional_depends = handle_schematics
optional_depends = protection