Compare commits

10 Commits

Author SHA1 Message Date
a71fd2fd15 Merge branch 'blaboing-patch-1' 2023-01-22 22:48:47 +01:00
3d13feb605 merged mod.conf 2023-01-22 22:48:23 +01:00
40090995b8 Merge pull request #12 from zeuner/integration
add mod.conf
2023-01-22 22:46:12 +01:00
6c73bdd8c4 Merge pull request #8 from nanepiwo/patch-1
Add dependency
2023-01-22 22:45:26 +01:00
d2091badd7 replaced deprecated getpos function 2023-01-22 22:43:47 +01:00
2aa8284558 add missing mod.conf 2023-01-20 22:02:20 +01:00
d79a7eaa2d add mod.conf 2017-10-10 09:48:09 +02:00
ad3c999f64 made compatible with newest version of MT 2017-07-04 20:54:54 +02:00
c09e8c0e1c use settings instead of dofile; increased max area size by factor 4 2017-05-16 03:18:08 +02:00
6d3db925a0 Add dependency
It depends on default to craft the markers and area stones :)
2015-05-25 21:17:47 -04:00
6 changed files with 41 additions and 5 deletions

View File

@ -478,7 +478,7 @@ end
markers.form_input_handler_areas = function( player, formname, fields) markers.form_input_handler_areas = function( player, formname, fields)
local pname = player:get_player_name(); local pname = player:get_player_name();
local ppos = player:getpos() local ppos = player:get_pos()
if( formname ~= "markers:info" if( formname ~= "markers:info"
or not( player ) or not( player )

View File

@ -12,7 +12,7 @@ markers.EXPIRE_AFTER = 60*60*24;
markers.MAX_HEIGHT = 100; markers.MAX_HEIGHT = 100;
-- only areas up to this size (in square meters) can be protected -- only areas up to this size (in square meters) can be protected
markers.MAX_SIZE = 1024; -- 32m * 32m = 1024 m^2 markers.MAX_SIZE = 4096; -- 64m * 64m= 4096 m^2
-- show only areas withhin this range when showing the list of ALL areas -- show only areas withhin this range when showing the list of ALL areas
-- (else it does get too crowded on multiplayer servers) -- (else it does get too crowded on multiplayer servers)
@ -30,7 +30,18 @@ end
-- for most cases, the default values ought to work -- for most cases, the default values ought to work
--markers.AREA_RANGE = 100000; --markers.AREA_RANGE = 100000;
if( io.open(minetest.get_worldpath().."/markers_settings.txt","r")) then local settings = Settings( minetest.get_worldpath().."/markers_settings.txt");
io.close() if( settings ) then
dofile(minetest.get_worldpath().."/markers_settings.txt") if( settings:get( "markers_MAX_MARKERS" )) then
markers.MAX_MARKERS = tonumber(settings:get( "markers_MAX_MARKERS"));
end
if( settings:get( "markers_EXPIRE_AFTER" )) then
markers.EXPIRE_AFTER = tonumber(settings:get( "markers_EXPIRE_AFTER"));
end
if( settings:get( "markers_MAX_HEIGHT" )) then
markers.MAX_HEIGHT = tonumber(settings:get( "markers_MAX_HEIGHT"));
end
if( settings:get( "markers_MAX_SIZE" )) then
markers.MAX_SIZE = tonumber(settings:get( "markers_MAX_SIZE"));
end
end end

View File

@ -1 +1,2 @@
areas areas
default

View File

@ -9,6 +9,7 @@ minetest.register_tool( "markers:land_title_register",
wield_scale = {x=1,y=1,z=1}, wield_scale = {x=1,y=1,z=1},
stack_max = 1, -- there is no need to have more than one stack_max = 1, -- there is no need to have more than one
liquids_pointable = true, -- ground with only water on can be owned as well liquids_pointable = true, -- ground with only water on can be owned as well
--[[
-- the tool_capabilities are completely irrelevant here - no need to dig -- the tool_capabilities are completely irrelevant here - no need to dig
tool_capabilities = { tool_capabilities = {
full_punch_interval = 1.0, full_punch_interval = 1.0,
@ -19,6 +20,7 @@ minetest.register_tool( "markers:land_title_register",
choppy={times={[3]=0.90}, maxwear=0.05, maxlevel=0} choppy={times={[3]=0.90}, maxwear=0.05, maxlevel=0}
} }
}, },
--]]
node_placement_prediction = nil, node_placement_prediction = nil,
on_place = function(itemstack, placer, pointed_thing) on_place = function(itemstack, placer, pointed_thing)

19
markers_settings.txt Normal file
View File

@ -0,0 +1,19 @@
# copy this to your worldpath if you want to override these values
# store the positions of that many markers for each player (until server restart)
# default: 50
markers_MAX_MARKERS = 50
# the protection against digging of the marker by other players expires after this time
# default: 60*60*24 (1 day)
markers_EXPIRE_AFTER = 86400
# self-protected areas can not get higher than this
# default: 100
markers_MAX_HEIGHT = 100
# only areas up to this size (in square meters) can be protected
# default: 4096
markers_MAX_SIZE = 4096

3
mod.conf Normal file
View File

@ -0,0 +1,3 @@
name = markers
description = markers for the Minetest mod "areas"
depends = areas