mirror of
https://notabug.org/TenPlus1/protector.git
synced 2025-01-08 11:27:29 +01:00
add radius limiter of 22 so node volume of 4096000 isnt exceeded
This commit is contained in:
parent
6d09dd559c
commit
6f07d66d3c
@ -60,7 +60,7 @@ Change log:
|
||||
- 3.0 - Added PlayerFactions support, 'protector_hud_interval' setting and listing in advanced settings for mod values.
|
||||
- 3.1 - Ability to hide protection blocks using /protector_hide and /protector_show , italian local added (thanks Hamlet)
|
||||
- 3.2 - Defaults to Minetest translation if found, otherwise intllib fallback if loaded, locale files updated for both. Added 'protector_msg' setting for player text.
|
||||
- 3.3 - Added support for playerfactions new api (thanks louisroyer)
|
||||
- 3.3 - Added support for playerfactions new api (thanks louisroyer), added limiter to protection radius of 22.
|
||||
|
||||
Lucky Blocks: 10
|
||||
|
||||
|
4
hud.lua
4
hud.lua
@ -1,6 +1,10 @@
|
||||
|
||||
local S = protector.intllib
|
||||
local radius = (tonumber(minetest.setting_get("protector_radius")) or 5)
|
||||
|
||||
-- radius limiter (minetest cannot handle node volume of more than 4096000)
|
||||
if radius > 22 then radius = 22 end
|
||||
|
||||
local hud = {}
|
||||
local hud_timer = 0
|
||||
local hud_interval = (tonumber(minetest.setting_get("protector_hud_interval")) or 5)
|
||||
|
4
init.lua
4
init.lua
@ -34,6 +34,10 @@ local protector_show = tonumber(minetest.settings:get("protector_show_interval")
|
||||
local protector_recipe = minetest.settings:get_bool("protector_recipe") ~= false
|
||||
local protector_msg = minetest.settings:get_bool("protector_msg") ~= false
|
||||
|
||||
-- radius limiter (minetest cannot handle node volume of more than 4096000)
|
||||
if protector_radius > 22 then protector_radius = 22 end
|
||||
|
||||
|
||||
-- get static spawn position
|
||||
local statspawn = minetest.string_to_pos(minetest.settings:get("static_spawnpoint"))
|
||||
or {x = 0, y = 2, z = 0}
|
||||
|
@ -1,5 +1,5 @@
|
||||
# Size of protected area around protection node limiting player interaction
|
||||
protector_radius (Protector Radius) int 5
|
||||
protector_radius (Protector Radius [max 22]) int 5
|
||||
|
||||
# Flips player around when accessing protected area to stop lag griefing
|
||||
protector_flip (Protector Flip) bool false
|
||||
|
3
tool.lua
3
tool.lua
@ -6,6 +6,9 @@ local S = protector.intllib
|
||||
-- get protection radius
|
||||
local r = tonumber(minetest.settings:get("protector_radius")) or 5
|
||||
|
||||
-- radius limiter (minetest cannot handle node volume of more than 4096000)
|
||||
if r > 22 then r = 22 end
|
||||
|
||||
minetest.register_craftitem("protector:tool", {
|
||||
description = S("Protector Placer Tool (stand near protector, face direction and use)"),
|
||||
inventory_image = "protector_display.png^protector_logo.png",
|
||||
|
Loading…
Reference in New Issue
Block a user