Resolve TODOs
This commit is contained in:
parent
9bcc2e717c
commit
7b7f7548ce
@ -23,8 +23,8 @@ if settings.autofill_freq ~= 0 then
|
||||
map:fill_local(pos.x, pos.z);
|
||||
end
|
||||
end
|
||||
for i = -2,2 do
|
||||
for j = -2,2 do
|
||||
for i = -4,4 do
|
||||
for j = -4,4 do
|
||||
local adjusted_pos = {
|
||||
x = pos.x + chunk.from(i),
|
||||
y = pos.y,
|
||||
|
2
init.lua
2
init.lua
@ -6,7 +6,7 @@ local settings = {
|
||||
autofill_freq = tonumber(minetest.settings:get("autofill_freq")) or 5,
|
||||
autosave_freq = tonumber(minetest.settings:get("autosave_freq")) or 60,
|
||||
backup_scan_freq = tonumber(minetest.settings:get("backup_scan_freq")) or 5,
|
||||
backup_scan_count = tonumber(minetest.settings:get("backup_scan_count")) or 10,
|
||||
backup_scan_count = tonumber(minetest.settings:get("backup_scan_count")) or 20,
|
||||
};
|
||||
|
||||
-- Includes
|
||||
|
20
map_api.lua
20
map_api.lua
@ -82,9 +82,23 @@ end
|
||||
function Map.fill_local(self, x, z)
|
||||
x, z = self:to_coordinates(x, z, true);
|
||||
|
||||
-- TODO: Adjust size to match map scale
|
||||
if x >= -2 and x <= self.w + 1 and z >= -2 and z <= self.h + 1 then
|
||||
self:fill_area(x - 2, z - 2, 5, 5);
|
||||
local scale_sizes = {
|
||||
7,
|
||||
5,
|
||||
5,
|
||||
3,
|
||||
3,
|
||||
3,
|
||||
1,
|
||||
1,
|
||||
};
|
||||
|
||||
local fill_size = scale_sizes[math.min(self.scale, #scale_sizes)];
|
||||
local fill_radius = math.floor(fill_size / 2);
|
||||
|
||||
if x >= 0 - fill_radius and x <= self.w + (fill_radius - 1)
|
||||
and z >= 0 - fill_radius and z <= self.h + (fill_radius - 1) then
|
||||
self:fill_area(x - fill_radius, z - fill_radius, fill_size, fill_size);
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -11,4 +11,4 @@ autosave_freq (Data Auto-Save Frequency) int 60 0 3600
|
||||
backup_scan_freq (Map Scan Frequency) int 5 0 3600
|
||||
|
||||
# The number of map sections that this mod scans at a time. Set to 0 to scan all relevant areas
|
||||
backup_scan_count (Map Scan Rate) int 10 0 100
|
||||
backup_scan_count (Map Scan Rate) int 20 0 100
|
||||
|
Loading…
Reference in New Issue
Block a user