Merge branch 'MihailRis:main' into main
This commit is contained in:
@@ -1,5 +1,26 @@
|
||||
{
|
||||
"texture": "leaves",
|
||||
"material": "base:grass",
|
||||
"draw-group": 5,
|
||||
"culling": "optional",
|
||||
"particles": {
|
||||
"lifetime": 4.0,
|
||||
"spawn_interval": 1000.0,
|
||||
"acceleration": [0, -0.1, 0],
|
||||
"velocity": [0.2, -2.5, 0.3],
|
||||
"explosion": [0, 0, 0],
|
||||
"collision": false,
|
||||
"size": [0.3, 0.3, 0.3],
|
||||
"size_spread": 0.2,
|
||||
"spawn_shape": "box",
|
||||
"spawn_spread": [0.2, 0.2, 0.2],
|
||||
"angle_spread": 1.0,
|
||||
"min_angular_vel": 0.5,
|
||||
"max_angular_vel": 2.0,
|
||||
"lighting": true,
|
||||
"frames": [
|
||||
"particles:leaf_0"
|
||||
]
|
||||
},
|
||||
"base:durability": 0.7
|
||||
}
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 6.4 KiB After Width: | Height: | Size: 899 B |
Binary file not shown.
|
After Width: | Height: | Size: 6.4 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 5.1 KiB |
@@ -41,4 +41,5 @@ function on_open()
|
||||
create_setting("graphics.fog-curve", "Fog Curve", 0.1)
|
||||
create_setting("graphics.gamma", "Gamma", 0.05, "", "graphics.gamma.tooltip")
|
||||
create_checkbox("graphics.backlight", "Backlight", "graphics.backlight.tooltip")
|
||||
create_checkbox("graphics.dense-render", "Dense blocks render", "graphics.dense-render.tooltip")
|
||||
end
|
||||
|
||||
@@ -72,9 +72,14 @@ function data_buffer:put_byte(byte)
|
||||
end
|
||||
|
||||
function data_buffer:put_bytes(bytes)
|
||||
for i = 1, #bytes do
|
||||
self:put_byte(bytes[i])
|
||||
end
|
||||
if type(self.bytes) == 'table' then
|
||||
for i = 1, #bytes do
|
||||
self:put_byte(bytes[i])
|
||||
end
|
||||
else
|
||||
self.bytes:insert(self.pos, bytes)
|
||||
self.pos = self.pos + #bytes
|
||||
end
|
||||
end
|
||||
|
||||
function data_buffer:put_single(single)
|
||||
@@ -308,4 +313,4 @@ end
|
||||
|
||||
setmetatable(data_buffer, data_buffer)
|
||||
|
||||
return data_buffer
|
||||
return data_buffer
|
||||
|
||||
+24
-2
@@ -1,6 +1,6 @@
|
||||
-- Check if given table is an array
|
||||
function is_array(x)
|
||||
if #t > 0 then
|
||||
if #x > 0 then
|
||||
return true
|
||||
end
|
||||
for k, v in pairs(x) do
|
||||
@@ -51,6 +51,19 @@ function math.rand(low, high)
|
||||
return low + (high - low) * math.random()
|
||||
end
|
||||
|
||||
function math.normalize(num, conf)
|
||||
conf = conf or 1
|
||||
|
||||
return (num / conf) % 1
|
||||
end
|
||||
|
||||
function math.round(num, places)
|
||||
places = places or 0
|
||||
|
||||
local mult = 10 ^ places
|
||||
return math.floor(num * mult + 0.5) / mult
|
||||
end
|
||||
|
||||
----------------------------------------------
|
||||
|
||||
function table.copy(t)
|
||||
@@ -74,7 +87,7 @@ function table.deep_copy(t)
|
||||
end
|
||||
end
|
||||
|
||||
return copied
|
||||
return setmetatable(copied, getmetatable(t))
|
||||
end
|
||||
|
||||
function table.count_pairs(t)
|
||||
@@ -91,6 +104,15 @@ function table.random(t)
|
||||
return t[math.random(1, #t)]
|
||||
end
|
||||
|
||||
function table.shuffle(t)
|
||||
for i = #t, 2, -1 do
|
||||
local j = math.random(i)
|
||||
t[i], t[j] = t[j], t[i]
|
||||
end
|
||||
|
||||
return t
|
||||
end
|
||||
|
||||
----------------------------------------------
|
||||
|
||||
local pattern_escape_replacements = {
|
||||
|
||||
@@ -17,7 +17,7 @@ vec3 pick_sky_color(samplerCube cubemap) {
|
||||
vec3 skyLightColor = texture(cubemap, vec3(0.4f, 0.0f, 0.4f)).rgb;
|
||||
skyLightColor *= SKY_LIGHT_TINT;
|
||||
skyLightColor = min(vec3(1.0), skyLightColor*SKY_LIGHT_MUL);
|
||||
skyLightColor = max(MAX_SKY_LIGHT, skyLightColor);
|
||||
skyLightColor = max(MIN_SKY_LIGHT, skyLightColor);
|
||||
return skyLightColor;
|
||||
}
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
// lighting
|
||||
#define SKY_LIGHT_MUL 2.9
|
||||
#define SKY_LIGHT_TINT vec3(0.9, 0.8, 1.0)
|
||||
#define MAX_SKY_LIGHT vec3(0.1, 0.11, 0.14)
|
||||
#define MIN_SKY_LIGHT vec3(0.2, 0.25, 0.33)
|
||||
|
||||
// fog
|
||||
#define FOG_POS_SCALE vec3(1.0, 0.2, 1.0)
|
||||
|
||||
@@ -16,6 +16,7 @@ devtools.traceback=Traceback (most recent call first)
|
||||
# Tooltips
|
||||
graphics.gamma.tooltip=Lighting brightness curve
|
||||
graphics.backlight.tooltip=Backlight to prevent total darkness
|
||||
graphics.dense-render.tooltip=Enables transparency in blocks like leaves
|
||||
|
||||
# settings
|
||||
settings.Controls Search Mode=Search by attached button name
|
||||
|
||||
@@ -28,6 +28,7 @@ pack.remove-confirm=Удалить весь поставляемый паком/
|
||||
# Подсказки
|
||||
graphics.gamma.tooltip=Кривая яркости освещения
|
||||
graphics.backlight.tooltip=Подсветка, предотвращающая полную темноту
|
||||
graphics.dense-render.tooltip=Включает прозрачность блоков, таких как листья.
|
||||
|
||||
# Меню
|
||||
menu.Apply=Применить
|
||||
@@ -67,6 +68,7 @@ world.delete-confirm=Удалить мир безвозвратно?
|
||||
# Настройки
|
||||
settings.Ambient=Фон
|
||||
settings.Backlight=Подсветка
|
||||
settings.Dense blocks render=Плотный рендер блоков
|
||||
settings.Camera Shaking=Тряска Камеры
|
||||
settings.Camera Inertia=Инерция Камеры
|
||||
settings.Camera FOV Effects=Эффекты поля зрения
|
||||
|
||||
Reference in New Issue
Block a user