RIP Test_Portrait_Pack 2026-2026

This commit is contained in:
RenechCDDA
2026-10-01 02:10:30 -04:00
parent c19e95bc96
commit c3a9dbe803
14 changed files with 21 additions and 47 deletions
-1
View File
@@ -53,7 +53,6 @@
!/gfx/ASCIITileset
!/gfx/loading_screens
!/gfx/Larwick_Overmap
!/gfx/Test_Portrait_Pack
!/gfx/tile_config_template.json
/graveyard/
/memorial/
Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

-3
View File
@@ -1,3 +0,0 @@
This is some hacked-up bullshit.
You are not supposed to manually make tilesets. But piping an entirely new sort of tileset before I've proved they can work is... unwise. So we have some hacked-up bullshit.
-25
View File
@@ -1,25 +0,0 @@
{
"tile_info": [
{ "height": 128, "width": 128, "iso": false, "pixelscale": 1 }
],
"tiles-new": [
{ "file": "GENERIC_MALE_PORTRAIT_001.png", "tiles": [ { "id": "GENERIC_MALE_PORTRAIT_001", "fg": 0, "bg": 0, "rotates": false } ] },
{ "file": "GENERIC_MALE_PORTRAIT_002.png", "tiles": [ { "id": "GENERIC_MALE_PORTRAIT_002", "fg": 1, "bg": 0, "rotates": false } ] },
{ "file": "GENERIC_MALE_PORTRAIT_003.png", "tiles": [ { "id": "GENERIC_MALE_PORTRAIT_003", "fg": 2, "bg": 0, "rotates": false } ] },
{
"file": "GENERIC_FEMALE_PORTRAIT_001.png",
"tiles": [ { "id": "GENERIC_FEMALE_PORTRAIT_001", "fg": 3, "bg": 0, "rotates": false } ]
},
{
"file": "GENERIC_FEMALE_PORTRAIT_002.png",
"tiles": [ { "id": "GENERIC_FEMALE_PORTRAIT_002", "fg": 4, "bg": 0, "rotates": false } ]
},
{
"file": "GENERIC_FEMALE_PORTRAIT_003.png",
"tiles": [ { "id": "GENERIC_FEMALE_PORTRAIT_003", "fg": 5, "bg": 0, "rotates": false } ]
},
{ "file": "Named_NPC_Smokes.png", "tiles": [ { "id": "Named_NPC_Smokes", "fg": 6, "bg": 0, "rotates": false } ] },
{ "file": "Named_NPC_Smokes_TOPIC.png", "tiles": [ { "id": "Named_NPC_Smokes_TOPIC", "fg": 7, "bg": 0, "rotates": false } ] },
{ "file": "Monster_Talk_Civilian.png", "tiles": [ { "id": "Monster_Talk_Civilian", "fg": 8, "bg": 0, "rotates": false } ] }
]
}
-4
View File
@@ -1,4 +0,0 @@
NAME: Test_Portrait_Pack
VIEW: Test_Portrait_Pack
JSON: tile_config.json
TILESET: tiles.png
+21 -14
View File
@@ -373,6 +373,8 @@ void options_manager::add( const std::string &sNameIn, const std::string &sPageI
thisOpt.vItems = sItemsIn;
if( thisOpt.getItemPos( sDefaultIn ) == -1 ) {
// If this assertion fails, it means there's no valid selections for your option. That is pretty bad!
cata_assert( !thisOpt.vItems.empty() );
sDefaultIn = thisOpt.vItems[0].first;
}
@@ -1303,24 +1305,29 @@ std::vector<options_manager::id_and_option> options_manager::build_tilesets_list
"tileset",
PATH_INFO::tileset_conf() );
// Default values
if( result.empty() ) {
result.emplace_back( "hoder", to_translation( "Hoder's" ) );
result.emplace_back( "deon", to_translation( "Deon's" ) );
}
if( only_portraits ) {
for( auto iter = result.begin(); iter != result.end(); ) {
// Portrait packs must contain the string "Portrait" (case-sensitive) somewhere in their ID.
// I would like this check to be less dumb, but we're working with only a std::string here.
if( iter->first.find( "Portrait" ) == std::string::npos ) {
iter = result.erase( iter );
} else {
++iter;
}
// Portrait packs must contain the string "Portrait" (case-sensitive) somewhere in their ID.
// I would like this check to be less dumb, but we're working with only a std::string here.
for( auto iter = result.begin(); iter != result.end(); ) {
// hack: If we have only one option left always keep that, skipping validity checks.
// This is an error if it happens ingame, but for CI we need to pass *something*, even if it doesn't really *work*.
// CI doesn't care about drawing tiles. It just needs something to fill in the option.
if( result.size() == 1 ) {
break;
}
const bool is_portrait_tileset = iter->first.find( "Portrait" ) != std::string::npos;
if( ( only_portraits && !is_portrait_tileset ) ||
( !only_portraits && is_portrait_tileset ) ) {
iter = result.erase( iter );
} else {
++iter;
}
}
cata_assert( !result.empty() );
return result;
}