bump changes 25.12

This commit is contained in:
Van
2025-12-25 14:31:11 +03:00
parent 3646ec78cd
commit 3e9996e6a0
5 changed files with 76 additions and 49 deletions

View File

@@ -1 +1,2 @@
name = smc__core__craft_system name = smc__core__craft_system
depends = smc__api__api_loader

View File

@@ -3,8 +3,6 @@ local HASH_SPLITTER = '&'
local modInfo = Mod.getInfo('smc__core__craft_system') local modInfo = Mod.getInfo('smc__core__craft_system')
local require = modInfo.require local require = modInfo.require
local CraftTypes = require('CraftSystem.CraftTypes')
---@alias CraftSystem.shapelessCraftsList table<CraftSystem.Craft.Group, table<string, CraftSystem.ShapelessCraft[]>> ---@alias CraftSystem.shapelessCraftsList table<CraftSystem.Craft.Group, table<string, CraftSystem.ShapelessCraft[]>>
---@alias CraftSystem.processualCraftsList table<CraftSystem.Craft.Group, table<string, CraftSystem.ProcessualCraft[]>> ---@alias CraftSystem.processualCraftsList table<CraftSystem.Craft.Group, table<string, CraftSystem.ProcessualCraft[]>>
@@ -60,7 +58,7 @@ end
---@param group CraftSystem.Craft.Group ---@param group CraftSystem.Craft.Group
---@return table<string, table> ---@return table<string, table>
local function getCraftGroup(type, group) local function getCraftGroup(type, group)
local craftList = getCraftList(CraftTypes.type) local craftList = getCraftList(type)
---@type table<string, table>? ---@type table<string, table>?
local craftGroup = craftList[group] local craftGroup = craftList[group]

View File

@@ -12,20 +12,20 @@ local MapGen = mapGenRequire('MapGen')
local mapGenerator = MapGen:new({ local mapGenerator = MapGen:new({
nodes = { nodes = {
-- Special nodes -- Special nodes
air = "air", air = 'air',
-- Rocks -- Rocks
sylite = "rocks:sylite", sylite = 'rocks:sylite',
tauitite = "rocks:tauitite", tauitite = 'rocks:tauitite',
iyellite = "rocks:iyellite", iyellite = 'rocks:iyellite',
falmyte = "rocks:falmyte", falmyte = 'rocks:falmyte',
hapcoryte = "rocks:hapcoryte", hapcoryte = 'rocks:hapcoryte',
burcite = "rocks:burcite", burcite = 'rocks:burcite',
felhor = "rocks:felhor", felhor = 'rocks:felhor',
malachite = "rocks:malachite", malachite = 'rocks:malachite',
-- Liquids -- Liquids
water = "liquids:water_source", water = 'liquids:water_source',
}, },
}) })
@@ -37,16 +37,16 @@ local function calcHumidity(layer, value, height)
return value return value
end end
mapGenerator:registerLayer("world", { mapGenerator:registerLayer('midgard', {
minY = -50, minY = -256,
maxY = 50, maxY = 256,
minTemp = 0, minTemp = -100,
maxTemp = 100, maxTemp = 100,
minHumidity = 0, minHumidity = 0,
maxHumidity = 100, maxHumidity = 100,
calcTemp = calcTemp, calcTemp = calcTemp,
calcHumidity = calcHumidity, calcHumidity = calcHumidity,
biomesVerticalScattering = 10, biomesVerticalScattering = 5,
biomesGorizontalScattering = 5 biomesGorizontalScattering = 5
}) })
@@ -102,7 +102,7 @@ local climat0 = {
local v = vector.new local v = vector.new
mapGenerator:register2DPeaks("world", mapGenerator:register2DPeaks('midgard',
{ {
landscapeNoise = land1, landscapeNoise = land1,
tempNoise = climat2, tempNoise = climat2,
@@ -114,7 +114,7 @@ mapGenerator:register2DPeaks("world",
v(500, 0, -500), v(500, 0, -500),
}) })
mapGenerator:register2DPeaks("world", mapGenerator:register2DPeaks('midgard',
{ {
landscapeNoise = land2, landscapeNoise = land2,
tempNoise = climat1, tempNoise = climat1,
@@ -124,7 +124,7 @@ mapGenerator:register2DPeaks("world",
v(200, 0, -400), v(200, 0, -400),
}) })
mapGenerator:register2DPeaks("world", mapGenerator:register2DPeaks('midgard',
{ {
landscapeNoise = land2, landscapeNoise = land2,
tempNoise = climat2, tempNoise = climat2,
@@ -134,7 +134,7 @@ mapGenerator:register2DPeaks("world",
v(-300, 0, -200), v(-300, 0, -200),
}) })
mapGenerator:registerCavern('world', 'cavern1', { mapGenerator:registerCavern('midgard', 'cavern1', {
minY = -48, minY = -48,
maxY = 0, maxY = 0,
smoothDistance = 20, smoothDistance = 20,
@@ -193,40 +193,25 @@ local function generateRock(biome, mapGenerator, data, index, x, y, z)
end end
end end
---@param biome MapGen.Biome
local function generateSoil(biome, mapGenerator, data, index, x, y, z) local function generateSoil(biome, mapGenerator, data, index, x, y, z)
data[index] = biome.groundNodesId.turf data[index] = biome.groundNodesIDs.turf
end end
mapGenerator:registerBiome('world', "biome1", { mapGenerator:registerBiome('midgard', 'swamp', {
tempPoint = 0, tempPoint = 0,
humidityPoint = 0, humidityPoint = 80,
minY = -10000, minY = 100,
maxY = -25, maxY = 0,
groundNodes = { groundNodes = {
soil = "soils:clay_soil_baren", soil = 'soils:clay_soil_baren',
turf = "soils:clay_soil_baren", turf = 'soils:clay_soil_baren',
rock = "rocks:sylite", rock = 'rocks:sylite',
bottom = "soils:rocky_soil_baren", bottom = 'soils:rocky_soil_baren',
},
soilHeight = 5,
--generateRock = generateRock,
--generateSoil = generateSoil,
})
mapGenerator:registerBiome('world', "biome2", {
tempPoint = 100,
humidityPoint = 100,
minY = -25,
maxY = 1000,
groundNodes = {
soil = "soils:rocky_soil_baren",
turf = "soils:rocky_soil_baren",
rock = "rocks:felhor",
bottom = "soils:clay_soil_baren",
}, },
soilHeight = 3, soilHeight = 3,
--generateRock = generateRock, generateRock = generateRock,
--generateSoil = generateSoil, generateSoil = generateSoil,
}) })
return mapGenerator return mapGenerator

View File

@@ -162,3 +162,46 @@ planksFactory:registerItems({
}, },
}, },
}) })
-- сундучки
---@type TileSheet
local caseTileSheet = TileSheet:new("cases_sheet.png", 16, 16)
local function getCaseTiles(x, y)
return {
caseTileSheet:t(x, y),
caseTileSheet:t(x, y),
caseTileSheet:t(x, y+1),
}
end
local t = getCaseTiles
planksFactory:registerItems({
---@type Node.NodeDefinition
{
settings = {
name = "case_closed",
title = "Case",
--description = "",
tiles = t(0,0)
},
},
---@type Node.NodeDefinition
{
settings = {
name = "case_open",
title = "Case",
--description = "",
tiles = t(1,0);
drawtype = 'nodebox';
node_box = {
type = "fixed",
fixed = {
{-0.5, -0.5, -0.5, 0.5, 0.5 - 1/16*2, 0.5},
}
}
},
},
})

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB