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
depends = smc__api__api_loader

View File

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

View File

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

View File

@@ -161,4 +161,47 @@ planksFactory:registerItems({
tiles = { logTileSheet:t(10, 4) },
},
},
})
-- сундучки
---@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