forked from mtcontrib/homedecor_modpack
Lower resolution of roof slopes/corners from 256 to 16.
This commit is contained in:
parent
aa25496468
commit
8cb236a105
10
slopes.lua
10
slopes.lua
|
@ -11,13 +11,13 @@ end
|
||||||
|
|
||||||
-- Corner shingle nodes, courtesy Bas080
|
-- Corner shingle nodes, courtesy Bas080
|
||||||
|
|
||||||
homedecor_detail_level = 256
|
homedecor_detail_level = 16
|
||||||
|
|
||||||
homedecor_register_outer_corner = function(modname, subname, groups, images, description)
|
homedecor_register_outer_corner = function(modname, subname, groups, images, description)
|
||||||
local slopeboxedge = {}
|
local slopeboxedge = {}
|
||||||
local detail = homedecor_detail_level
|
local detail = homedecor_detail_level
|
||||||
for i = 0, detail-1 do
|
for i = 0, detail-1 do
|
||||||
slopeboxedge[i+1]={-0.5, -0.5+(4/detail), (i/detail)-0.5, 0.5-(i/detail), (i/detail)-0.5+(5/detail), 0.5}
|
slopeboxedge[i+1]={-0.5, -0.5+(1/detail), (i/detail)-0.5, 0.5-(i/detail), (i/detail)-0.5+(1.25/detail), 0.5}
|
||||||
end
|
end
|
||||||
minetest.register_node(modname..":shingle_outer_corner_" .. subname, {
|
minetest.register_node(modname..":shingle_outer_corner_" .. subname, {
|
||||||
description = S(description.. " (outer corner)"),
|
description = S(description.. " (outer corner)"),
|
||||||
|
@ -47,8 +47,8 @@ homedecor_register_inner_corner = function(modname, subname, groups, images, des
|
||||||
local slopeboxedge = {}
|
local slopeboxedge = {}
|
||||||
local detail = homedecor_detail_level
|
local detail = homedecor_detail_level
|
||||||
for i = 0, detail-1 do
|
for i = 0, detail-1 do
|
||||||
slopeboxedge[i+1]={-0.5, -0.5+(4/detail), -0.5, 0.5-(i/detail), (i/detail)-0.5+(5/detail), 0.5}
|
slopeboxedge[i+1]={-0.5, -0.5+(1/detail), -0.5, 0.5-(i/detail), (i/detail)-0.5+(1.25/detail), 0.5}
|
||||||
slopeboxedge[i+detail+1]={-0.5, -0.5+(4/detail), (i/detail)-0.5, 0.5, (i/detail)-0.5+(5/detail), 0.5}
|
slopeboxedge[i+detail+1]={-0.5, -0.5+(1/detail), (i/detail)-0.5, 0.5, (i/detail)-0.5+(1.25/detail), 0.5}
|
||||||
end
|
end
|
||||||
minetest.register_node(modname..":shingle_inner_corner_" .. subname, {
|
minetest.register_node(modname..":shingle_inner_corner_" .. subname, {
|
||||||
description = S(description.. " (inner corner)"),
|
description = S(description.. " (inner corner)"),
|
||||||
|
@ -73,7 +73,7 @@ homedecor_register_slope = function(modname, subname, recipeitem, groups, images
|
||||||
local slopeboxedge = {}
|
local slopeboxedge = {}
|
||||||
local detail = homedecor_detail_level
|
local detail = homedecor_detail_level
|
||||||
for i = 0, detail-1 do
|
for i = 0, detail-1 do
|
||||||
slopeboxedge[i+1]={-0.5, -0.5+(4/detail), (i/detail)-0.5, 0.5, (i/detail)-0.5+(5/detail), 0.5}
|
slopeboxedge[i+1]={-0.5, -0.5+(1/detail), (i/detail)-0.5, 0.5, (i/detail)-0.5+(1.25/detail), 0.5}
|
||||||
end
|
end
|
||||||
minetest.register_node(modname..":shingle_side_" .. subname, {
|
minetest.register_node(modname..":shingle_side_" .. subname, {
|
||||||
description = S(description),
|
description = S(description),
|
||||||
|
|
Loading…
Reference in New Issue
Block a user