Skip to content

Commit

Permalink
Merge branch 'cataclysmbnteam:main' into ci-terse-experimental
Browse files Browse the repository at this point in the history
  • Loading branch information
scarf005 authored Dec 17, 2023
2 parents 1b60f6b + ce5c667 commit 59a567f
Show file tree
Hide file tree
Showing 9 changed files with 43 additions and 14 deletions.
4 changes: 2 additions & 2 deletions data/json/construction.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"id": "constr_pit_spiked",
"group": "spike_pit",
"category": "DIG",
"required_skills": [ [ "fabrication", 1 ] ],
"required_skills": [ [ "fabrication", 1 ], [ "traps", 0 ] ],
"time": "5 m",
"components": [ [ [ "spear_wood", 4 ], [ "pointy_stick", 4 ] ] ],
"pre_terrain": "t_pit",
Expand All @@ -54,7 +54,7 @@
"id": "constr_pit_glass",
"group": "glass_pit",
"category": "DIG",
"required_skills": [ [ "fabrication", 1 ] ],
"required_skills": [ [ "fabrication", 1 ], [ "traps", 0 ] ],
"time": "5 m",
"components": [ [ [ "glass_shard", 16 ] ] ],
"pre_terrain": "t_pit",
Expand Down
8 changes: 7 additions & 1 deletion data/json/recipes/other/parts.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,11 @@
"time": "7 m",
"autolearn": true,
"qualities": [ { "id": "HAMMER", "level": 2 }, { "id": "SAW_M", "level": 1 } ],
"components": [ [ [ "pipe", 1 ] ], [ [ "scrap", 1 ] ], [ [ "plastic_chunk", 1 ] ] ]
"components": [
[ [ "pipe", 1 ] ],
[ [ "scrap", 1 ] ],
[ [ "plastic_chunk", 1 ], [ "chunk_rubber", 1 ], [ "wood_structural_small", 1, "LIST" ] ]
]
},
{
"type": "recipe",
Expand Down Expand Up @@ -95,6 +99,7 @@
"subcategory": "CSC_OTHER_PARTS",
"skill_used": "fabrication",
"difficulty": 3,
"skills_required": [ "mechanics", 1 ],
"time": "30 m",
"autolearn": true,
"using": [ [ "blacksmithing_intermediate", 1 ], [ "steel_tiny", 1 ] ],
Expand Down Expand Up @@ -213,6 +218,7 @@
"subcategory": "CSC_OTHER_PARTS",
"skill_used": "fabrication",
"difficulty": 3,
"skills_required": [ "mechanics", 3 ],
"time": "15 m",
"reversible": true,
"autolearn": true,
Expand Down
23 changes: 19 additions & 4 deletions data/json/recipes/other/tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -637,12 +637,25 @@
"result": "crude_picklock",
"category": "CC_OTHER",
"subcategory": "CSC_OTHER_TOOLS",
"skill_used": "fabrication",
"time": "1 m",
"skill_used": "mechanics",
"time": "10 m",
"autolearn": true,
"qualities": [ { "id": "HAMMER", "level": 1 } ],
"components": [ [ [ "scrap", 1 ] ] ]
},
{
"type": "recipe",
"result": "picklocks",
"category": "CC_OTHER",
"subcategory": "CSC_OTHER_TOOLS",
"skill_used": "mechanics",
"difficulty": 5,
"time": "3 h",
"autolearn": true,
"using": [ [ "blacksmithing_advanced", 2 ], [ "steel_tiny", 2 ] ],
"qualities": [ { "id": "SAW_M", "level": 2 } ],
"tools": [ [ [ "crucible", -1 ], [ "crucible_clay", -1 ] ] ]
},
{
"type": "recipe",
"result": "brazier",
Expand Down Expand Up @@ -779,10 +792,11 @@
"result": "pipe_cleaner",
"category": "CC_OTHER",
"subcategory": "CSC_OTHER_TOOLS",
"skill_used": "fabrication",
"skill_used": "mechanics",
"difficulty": 1,
"time": "2 m",
"time": "10 m",
"autolearn": true,
"qualities": [ { "id": "CUT", "level": 1 } ],
"components": [ [ [ "wire", 2 ], [ "cable", 2 ] ], [ [ "fabric_standard", 1, "LIST" ] ] ]
},
{
Expand Down Expand Up @@ -2491,6 +2505,7 @@
"difficulty": 2,
"skills_required": [ "mechanics", 1 ],
"time": "100 m",
"autolearn": [ [ "fabrication", 4 ] ],
"book_learn": [ [ "manual_mechanics", 1 ], [ "manual_fabrication", 2 ], [ "textbook_fabrication", 2 ] ],
"qualities": [ { "id": "SAW_M", "level": 1 }, { "id": "SCREW", "level": 1 }, { "id": "WRENCH", "level": 1 } ],
"components": [ [ [ "pipe", 4 ] ], [ [ "scrap", 2 ] ] ]
Expand Down
8 changes: 8 additions & 0 deletions data/json/recipes/other/vehicles.json
Original file line number Diff line number Diff line change
Expand Up @@ -753,6 +753,7 @@
"category": "CC_OTHER",
"subcategory": "CSC_OTHER_VEHICLE",
"skill_used": "fabrication",
"skills_required": [ "mechanics", 1 ],
"difficulty": 1,
"time": "8 m",
"reversible": true,
Expand All @@ -766,6 +767,7 @@
"category": "CC_OTHER",
"subcategory": "CSC_OTHER_VEHICLE",
"skill_used": "fabrication",
"skills_required": [ "mechanics", 2 ],
"difficulty": 2,
"time": "9 m",
"reversible": true,
Expand Down Expand Up @@ -822,6 +824,7 @@
"subcategory": "CSC_OTHER_VEHICLE",
"skill_used": "fabrication",
"difficulty": 3,
"skills_required": [ "mechanics", 3 ],
"time": "45 m",
"reversible": true,
"autolearn": true,
Expand All @@ -835,6 +838,7 @@
"category": "CC_OTHER",
"subcategory": "CSC_OTHER_VEHICLE",
"skill_used": "fabrication",
"skills_required": [ "mechanics", 3 ],
"difficulty": 3,
"time": "90 m",
"reversible": true,
Expand All @@ -849,6 +853,7 @@
"category": "CC_OTHER",
"subcategory": "CSC_OTHER_VEHICLE",
"skill_used": "fabrication",
"skills_required": [ "mechanics", 4 ],
"difficulty": 4,
"id_suffix": "forge",
"time": "20 m",
Expand All @@ -862,6 +867,7 @@
"category": "CC_OTHER",
"subcategory": "CSC_OTHER_VEHICLE",
"skill_used": "fabrication",
"skills_required": [ "mechanics", 4 ],
"difficulty": 4,
"id_suffix": "forge",
"time": "50 m",
Expand All @@ -875,6 +881,7 @@
"category": "CC_OTHER",
"subcategory": "CSC_OTHER_VEHICLE",
"skill_used": "fabrication",
"skills_required": [ "mechanics", 1 ],
"difficulty": 1,
"time": "6 m",
"reversible": true,
Expand All @@ -888,6 +895,7 @@
"category": "CC_OTHER",
"subcategory": "CSC_OTHER_VEHICLE",
"skill_used": "fabrication",
"skills_required": [ "mechanics", 0 ],
"time": "4 m",
"reversible": true,
"autolearn": true,
Expand Down
2 changes: 1 addition & 1 deletion src/debug.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ struct time_info {
using char_t = typename Stream::char_type;
using base = std::basic_ostream<char_t>;

static_assert( std::is_base_of<base, Stream>::value, "" );
static_assert( std::is_base_of_v<base, Stream>, "" );

out << std::setfill( '0' );
out << std::setw( 2 ) << t.hours << ':' << std::setw( 2 ) << t.minutes << ':' <<
Expand Down
2 changes: 1 addition & 1 deletion src/magic_enchantment.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,7 @@ bool is_set_value( const trait_id &mut, float val )
}

template <float mutation_branch::*First, float mutation_branch::* ...Rest,
typename std::enable_if<( sizeof...( Rest ) > 0 ), bool>::type NonEmpty = false >
std::enable_if_t<( sizeof...( Rest ) > 0 ), bool>NonEmpty = false >
bool is_set_value( const trait_id &mut, float val )
{
return ( *mut ).*First == val && is_set_value<Rest...>( mut, val );
Expand Down
2 changes: 1 addition & 1 deletion src/make_static.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
*/
#define STATIC(expr) \
(([]()-> const auto &{ \
using CachedType = std::conditional_t<std::is_same<std::decay_t<decltype(expr)>, const char*>::value, \
using CachedType = std::conditional_t<std::is_same_v<std::decay_t<decltype(expr)>, const char*>, \
std::string, std::decay_t<decltype(expr)>>; \
static const CachedType _cached_expr = (expr); \
return _cached_expr; \
Expand Down
2 changes: 1 addition & 1 deletion src/mapgen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -985,7 +985,7 @@ class mapgen_value
using StringId = to_string_id_t<Id>;
struct void_;
using Id_unless_string =
std::conditional_t<std::is_same<Id, std::string>::value, void_, Id>;
std::conditional_t<std::is_same_v<Id, std::string>, void_, Id>;

struct value_source {
virtual ~value_source() = default;
Expand Down
6 changes: 3 additions & 3 deletions src/vehicle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5102,8 +5102,8 @@ namespace distribution_graph
{

template <bool IsConst,
typename Vehicle = typename std::conditional<IsConst, const vehicle, vehicle>::type,
typename Grid = typename std::conditional<IsConst, const distribution_grid, distribution_grid>::type>
typename Vehicle = std::conditional_t<IsConst, const vehicle, vehicle>,
typename Grid = std::conditional_t<IsConst, const distribution_grid, distribution_grid>>
struct vehicle_or_grid {
enum class type_t : char {
vehicle,
Expand Down Expand Up @@ -5141,7 +5141,7 @@ void traverse( StartPoint &start,
VehFunc veh_action, GridFunc grid_action )
{
using tvr = traverse_visitor_result;
constexpr bool IsConst = std::is_const<StartPoint>::value;
constexpr bool IsConst = std::is_const_v<StartPoint>;
struct hash {
const std::hash<char> char_hash = std::hash<char>();
const std::hash<size_t> ptr_hash = std::hash<size_t>();
Expand Down

0 comments on commit 59a567f

Please sign in to comment.