More unused var cleanup
This commit is contained in:
parent
a761c9323f
commit
dc8cc1e10b
@ -4,7 +4,7 @@ read_globals = {
|
|||||||
"dump", "dump2",
|
"dump", "dump2",
|
||||||
"vector",
|
"vector",
|
||||||
"VoxelManip", "VoxelArea",
|
"VoxelManip", "VoxelArea",
|
||||||
"PseudoRandom", "PcgRandom",
|
"PseudoRandom", "PcgRandom", "PerlinNoiseMap",
|
||||||
"ItemStack",
|
"ItemStack",
|
||||||
"Settings",
|
"Settings",
|
||||||
"unpack",
|
"unpack",
|
||||||
|
@ -36,7 +36,7 @@ local map_formspec_prefix = [[
|
|||||||
]];
|
]];
|
||||||
|
|
||||||
local tile = "image[%f,%f;%f,%f;%s]";
|
local tile = "image[%f,%f;%f,%f;%s]";
|
||||||
local marker = "animated_image[%f,%f;%f,%f;;%s;%d;%d]";
|
local player_marker = "animated_image[%f,%f;%f,%f;;%s;%d;%d]";
|
||||||
|
|
||||||
-- Generate formspec markup for an unknown biome tile
|
-- Generate formspec markup for an unknown biome tile
|
||||||
-- x: The x position of the tile
|
-- x: The x position of the tile
|
||||||
@ -113,7 +113,7 @@ local function generate_map(x, y, w, h, player_x, player_y, detail, map_scale, h
|
|||||||
|
|
||||||
if i == player_x and j == player_y then
|
if i == player_x and j == player_y then
|
||||||
local player_icon = cartographer.detail_texture(cartographer.skin.player_icons, detail);
|
local player_icon = cartographer.detail_texture(cartographer.skin.player_icons, detail);
|
||||||
str = str..marker:format(fx, fy - height,
|
str = str .. player_marker:format(fx, fy - height,
|
||||||
TILE_SIZE, TILE_SIZE,
|
TILE_SIZE, TILE_SIZE,
|
||||||
player_icon.texture .. ".png",
|
player_icon.texture .. ".png",
|
||||||
player_icon.frame_count,
|
player_icon.frame_count,
|
||||||
|
15
scanner.lua
15
scanner.lua
@ -43,15 +43,11 @@ local function get_mapgen_biome(min, max, mmin, mmax)
|
|||||||
local heights = minetest.get_mapgen_object("heightmap");
|
local heights = minetest.get_mapgen_object("heightmap");
|
||||||
|
|
||||||
local xx = max.x - min.x;
|
local xx = max.x - min.x;
|
||||||
local yy = max.y - min.y;
|
|
||||||
local zz = max.z - min.z;
|
local zz = max.z - min.z;
|
||||||
|
|
||||||
local xxx = mmax.x - mmin.x;
|
local xxx = mmax.x - mmin.x;
|
||||||
local yyy = mmax.y - mmin.y;
|
|
||||||
local zzz = mmax.z - mmin.z;
|
|
||||||
|
|
||||||
local startx = min.x - mmin.x;
|
local startx = min.x - mmin.x;
|
||||||
local starty = min.y - mmin.y;
|
|
||||||
local startz = min.z - mmin.z;
|
local startz = min.z - mmin.z;
|
||||||
|
|
||||||
local scan_biomes = {};
|
local scan_biomes = {};
|
||||||
@ -89,10 +85,6 @@ local function get_biome(min, max)
|
|||||||
local DEFAULT = minetest.get_biome_id("default");
|
local DEFAULT = minetest.get_biome_id("default");
|
||||||
local WATER_SOURCE = minetest.registered_aliases["mapgen_water_source"];
|
local WATER_SOURCE = minetest.registered_aliases["mapgen_water_source"];
|
||||||
|
|
||||||
local xx = max.x - min.x;
|
|
||||||
local yy = max.y - min.y;
|
|
||||||
local zz = max.z - min.z;
|
|
||||||
|
|
||||||
local scan_biomes = {};
|
local scan_biomes = {};
|
||||||
local scan_heights = {};
|
local scan_heights = {};
|
||||||
|
|
||||||
@ -131,12 +123,7 @@ local function get_biome(min, max)
|
|||||||
return biome, avg_height;
|
return biome, avg_height;
|
||||||
end
|
end
|
||||||
|
|
||||||
local function on_generated(min, max, blockseed)
|
local function on_generated(min, max, _)
|
||||||
local chunk = {
|
|
||||||
x = tochunk(min.x),
|
|
||||||
y = tochunk(min.z),
|
|
||||||
};
|
|
||||||
|
|
||||||
for i = tochunk(min.x),tochunk(max.x),1 do
|
for i = tochunk(min.x),tochunk(max.x),1 do
|
||||||
for j = tochunk(min.z),tochunk(max.z),1 do
|
for j = tochunk(min.z),tochunk(max.z),1 do
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user