Merge branch 'develop' into automelt

develop
Eamon Bode 2023-01-22 04:40:10 -05:00 committed by GitHub
commit e5cbc7fd3c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 58 additions and 53 deletions

@ -256,10 +256,9 @@
"condition" : "AtLeast",
"flags" :
[
"empty",
"bag"
"empty"
],
"item_type" : "BOX",
"item_type" : "BAG",
"value" : 5
}
],
@ -310,10 +309,9 @@
"condition" : "AtLeast",
"flags" :
[
"empty",
"bag"
"empty"
],
"item_type" : "BOX",
"item_type" : "BAG",
"value" : 5
}
],
@ -725,6 +723,10 @@
},
{
"condition" : "AtMost",
"flags" :
[
"empty"
],
"item_subtype" : "ITEM_TOOL_MINECART",
"item_type" : "TOOL",
"value" : 2
@ -844,14 +846,13 @@
"condition" : "AtMost",
"flags" :
[
"empty",
"sewn_imageless"
"empty"
],
"item_type" : "BOX",
"item_type" : "BAG",
"value" : 30
}
],
"job" : "ConstructChest",
"job" : "ConstructBag",
"material_category" :
[
"leather"
@ -880,14 +881,13 @@
"condition" : "AtMost",
"flags" :
[
"empty",
"sewn_imageless"
"empty"
],
"item_type" : "BOX",
"item_type" : "BAG",
"value" : 30
}
],
"job" : "ConstructChest",
"job" : "ConstructBag",
"material_category" :
[
"silk"
@ -916,14 +916,13 @@
"condition" : "AtMost",
"flags" :
[
"empty",
"sewn_imageless"
"empty"
],
"item_type" : "BOX",
"item_type" : "BAG",
"value" : 30
}
],
"job" : "ConstructChest",
"job" : "ConstructBag",
"material_category" :
[
"cloth"
@ -952,14 +951,13 @@
"condition" : "AtMost",
"flags" :
[
"empty",
"sewn_imageless"
"empty"
],
"item_type" : "BOX",
"item_type" : "BAG",
"value" : 30
}
],
"job" : "ConstructChest",
"job" : "ConstructBag",
"material_category" :
[
"yarn"
@ -1137,8 +1135,11 @@
},
{
"condition" : "AtMost",
"item_type" : "LIQUID_MISC",
"material" : "LYE",
"contains" :
[
"lye"
],
"reaction_id" : "MAKE_SOAP_FROM_TALLOW",
"value" : 5
}
],
@ -1166,8 +1167,11 @@
},
{
"condition" : "AtLeast",
"item_type" : "LIQUID_MISC",
"material" : "LYE",
"contains" :
[
"lye"
],
"reaction_id" : "MAKE_SOAP_FROM_TALLOW",
"value" : 3
},
{
@ -1200,8 +1204,11 @@
},
{
"condition" : "AtLeast",
"item_type" : "LIQUID_MISC",
"material" : "LYE",
"contains" :
[
"lye"
],
"reaction_id" : "MAKE_SOAP_FROM_OIL",
"value" : 3
},
{

@ -152,10 +152,9 @@
"condition" : "AtLeast",
"flags" :
[
"empty",
"bag"
"empty"
],
"item_type" : "BOX",
"item_type" : "BAG",
"value" : 10
},
{

@ -1779,6 +1779,10 @@ Maps module
Returns the biome info struct for the given global map region.
``dfhack.maps.getBiomeType(region_coord2d)`` or ``getBiomeType(x,y)``
Returns the biome_type for the given global map region.
* ``dfhack.maps.enableBlockUpdates(block[,flow,temperature])``
Enables updates for liquid flow or temperature, unless already active.
@ -1798,7 +1802,7 @@ Maps module
* ``dfhack.maps.getTileBiomeRgn(coords)``, or ``getTileBiomeRgn(x,y,z)``
Returns *x, y* for use with ``getRegionBiome``.
Returns *x, y* for use with ``getRegionBiome`` and ``getBiomeType``.
* ``dfhack.maps.getPlantAtTile(pos)``, or ``getPlantAtTile(x,y,z)``

@ -2131,6 +2131,13 @@ static int maps_getPlantAtTile(lua_State *L)
return 1;
}
static int maps_getBiomeType(lua_State *L)
{
auto pos = CheckCoordXY(L, 1, true);
lua_pushinteger(L, Maps::getBiomeType(pos.x, pos.y));
return 1;
}
static const luaL_Reg dfhack_maps_funcs[] = {
{ "isValidTilePos", maps_isValidTilePos },
{ "isTileVisible", maps_isTileVisible },
@ -2141,6 +2148,7 @@ static const luaL_Reg dfhack_maps_funcs[] = {
{ "getRegionBiome", maps_getRegionBiome },
{ "getTileBiomeRgn", maps_getTileBiomeRgn },
{ "getPlantAtTile", maps_getPlantAtTile },
{ "getBiomeType", maps_getBiomeType },
{ NULL, NULL }
};

@ -349,8 +349,8 @@ extern DFHACK_EXPORT df::plant *getPlantAtTile(int32_t x, int32_t y, int32_t z);
inline df::plant *getPlantAtTile(df::coord pos) { return getPlantAtTile(pos.x, pos.y, pos.z); }
DFHACK_EXPORT df::enums::biome_type::biome_type GetBiomeType(int world_coord_x, int world_coord_y);
DFHACK_EXPORT df::enums::biome_type::biome_type GetBiomeTypeWithRef(int world_coord_x, int world_coord_y, int world_ref_y_coord);
DFHACK_EXPORT df::enums::biome_type::biome_type getBiomeType(int world_coord_x, int world_coord_y);
DFHACK_EXPORT df::enums::biome_type::biome_type getBiomeTypeWithRef(int world_coord_x, int world_coord_y, int world_ref_y_coord);
}

@ -987,7 +987,7 @@ Return the biome type, given a position coordinate expressed in world_tiles
The world ref coordinates are used for tropicality determination and may refer
to a tile neighboring the "official" one.
*****************************************************************************/
df::enums::biome_type::biome_type Maps::GetBiomeTypeWithRef(int world_coord_x,
df::enums::biome_type::biome_type Maps::getBiomeTypeWithRef(int world_coord_x,
int world_coord_y,
int world_ref_coord_y
)
@ -1186,7 +1186,7 @@ df::enums::biome_type::biome_type Maps::GetBiomeTypeWithRef(int world_coord_x,
Module main function.
Return the biome type, given a position coordinate expressed in world_tiles
*****************************************************************************/
df::enums::biome_type::biome_type Maps::GetBiomeType(int world_coord_x, int world_coord_y)
df::enums::biome_type::biome_type Maps::getBiomeType(int world_coord_x, int world_coord_y)
{
return Maps::GetBiomeTypeWithRef(world_coord_x, world_coord_y, world_coord_y);
return Maps::getBiomeTypeWithRef(world_coord_x, world_coord_y, world_coord_y);
}

@ -315,7 +315,7 @@ public:
biome = biome_type::SUBTERRANEAN_WATER;
else {
df::coord2d region(Maps::getTileBiomeRgn(df::coord(bb->centerx, bb->centery, bb->z)));
biome = Maps::GetBiomeType(region.x, region.y);
biome = Maps::getBiomeType(region.x, region.y);
}
farms[biome].push_back(farm);
}

@ -790,7 +790,7 @@ void embark_assist::survey::high_level_world_survey(embark_assist::defs::geo_dat
offset_count++;
results.biome_index[l] = world_data->region_map[adjusted.x][adjusted.y].region_id;
results.biome[l] = DFHack::Maps::GetBiomeTypeWithRef(adjusted.x, adjusted.y, k);
results.biome[l] = DFHack::Maps::getBiomeTypeWithRef(adjusted.x, adjusted.y, k);
temperature = world_data->region_map[adjusted.x][adjusted.y].temperature;
negative = temperature < 0;

@ -1,13 +0,0 @@
local _ENV = mkmodule('plugins.fortplan')
require('dfhack.buildings')
function construct_building_from_params(building_type, x, y, z)
local pos = xyz2pos(x, y, z)
local bld, err =
dfhack.buildings.constructBuilding{type=building_type, pos=pos}
if err then error(err) end
return bld
end
return _ENV

@ -1 +1 @@
Subproject commit 4e97b809511660f7b5fc98e82f7d1cfff49395ee
Subproject commit 9666cb8ebcc51f8e4bb2fb99116636793a7e4270