From 9015d65d1b1b8e161ad7c938747b04fa91ca6108 Mon Sep 17 00:00:00 2001 From: Jarrod Q Date: Fri, 1 Nov 2019 18:37:55 -0400 Subject: [PATCH 1/9] Adjusts joint servo power cost Signed-off-by: Jarrod Q --- src/game.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/game.cpp b/src/game.cpp index a2f3100d0ea82..48d36777a1b0f 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -9991,9 +9991,9 @@ void game::on_move_effects() if( u.has_active_bionic( bionic_id( "bio_jointservo" ) ) ) { if( u.movement_mode_is( CMM_RUN ) ) { - u.mod_power_level( -20_kJ ); + u.mod_power_level( -55_J ); } else { - u.mod_power_level( -10_kJ ); + u.mod_power_level( -35_kJ ); } } } From c00dd4e8bf2c993b2abff172074d287ad9e14c57 Mon Sep 17 00:00:00 2001 From: LaVeyanFiend Date: Sun, 3 Nov 2019 23:49:46 -0500 Subject: [PATCH 2/9] Cows/sheep give raw milk --- data/json/items/ammo_types.json | 6 ++++++ data/json/monsters/mammal.json | 4 ++-- src/monexamine.cpp | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/data/json/items/ammo_types.json b/data/json/items/ammo_types.json index 90fb087e5be76..ddd9cc673fb6b 100644 --- a/data/json/items/ammo_types.json +++ b/data/json/items/ammo_types.json @@ -563,6 +563,12 @@ "name": "milk", "default": "milk" }, + { + "type": "ammunition_type", + "id": "milk_raw", + "name": "raw milk", + "default": "milk_raw" + }, { "type": "ammunition_type", "id": "paintball", diff --git a/data/json/monsters/mammal.json b/data/json/monsters/mammal.json index 0dddea718b165..580b8e9f310d7 100644 --- a/data/json/monsters/mammal.json +++ b/data/json/monsters/mammal.json @@ -312,7 +312,7 @@ "melee_cut": 6, "dodge": 2, "armor_bash": 2, - "starting_ammo": { "milk": 10 }, + "starting_ammo": { "milk_raw": 10 }, "path_settings": { "max_dist": 10 }, "anger_triggers": [ "HURT" ], "fear_triggers": [ "PLAYER_CLOSE" ], @@ -1850,7 +1850,7 @@ "melee_dice_sides": 6, "melee_cut": 2, "dodge": 2, - "starting_ammo": { "milk": 2 }, + "starting_ammo": { "milk_raw": 2 }, "anger_triggers": [ ], "harvest": "mammal_large_wool", "reproduction": { "baby_monster": "mon_sheep_lamb", "baby_count": 1, "baby_timer": 20 }, diff --git a/src/monexamine.cpp b/src/monexamine.cpp index 5c21e7f7d03af..f264fdbdbaff3 100644 --- a/src/monexamine.cpp +++ b/src/monexamine.cpp @@ -694,7 +694,7 @@ void monexamine::tie_or_untie( monster &z ) void monexamine::milk_source( monster &source_mon ) { - const auto milked_item = source_mon.type->starting_ammo.find( "milk" ); + const auto milked_item = source_mon.type->starting_ammo.find( "milk_raw" ); if( milked_item == source_mon.type->starting_ammo.end() ) { debugmsg( "%s is milkable but has no milk in its starting ammo!", source_mon.get_name() ); From 94a6d896191d46bb40e64e84c4a44277f65af28f Mon Sep 17 00:00:00 2001 From: Qrox Date: Mon, 4 Nov 2019 18:32:24 +0800 Subject: [PATCH 3/9] Fix clang-tidy warnings --- src/avatar_action.cpp | 2 +- src/catacharset.cpp | 18 +++++++++------- src/character.cpp | 3 ++- src/character_martial_arts.cpp | 6 +++--- src/compatibility.h | 2 ++ src/crash.cpp | 22 +++++++++++--------- src/debug.cpp | 8 +++---- src/faction.cpp | 15 ++++++-------- src/filesystem.cpp | 1 + src/game.cpp | 16 ++++++-------- src/ime.cpp | 14 +++++++++---- src/init.cpp | 2 +- src/inventory_ui.cpp | 1 + src/item.cpp | 2 +- src/monattack.cpp | 1 + src/savegame_json.cpp | 2 +- src/sdltiles.cpp | 13 ++++++++---- tests/hash_test.cpp | 38 ---------------------------------- 18 files changed, 71 insertions(+), 95 deletions(-) diff --git a/src/avatar_action.cpp b/src/avatar_action.cpp index a479603669cb5..02c8173099ae3 100644 --- a/src/avatar_action.cpp +++ b/src/avatar_action.cpp @@ -697,7 +697,7 @@ bool avatar_action::fire_check( avatar &you, const map &m, const targeting_data } } } - if( fireable == true ) { + if( fireable ) { return true; } } diff --git a/src/catacharset.cpp b/src/catacharset.cpp index f767569c078c8..aea2d0e69f066 100644 --- a/src/catacharset.cpp +++ b/src/catacharset.cpp @@ -400,9 +400,9 @@ std::wstring utf8_to_wstr( const std::string &str ) std::string wstr_to_utf8( const std::wstring &wstr ) { #if defined(_WIN32) - int sz = WideCharToMultiByte( CP_UTF8, 0, wstr.c_str(), -1, NULL, 0, NULL, NULL ); + int sz = WideCharToMultiByte( CP_UTF8, 0, wstr.c_str(), -1, nullptr, 0, nullptr, nullptr ); std::string str( sz, '\0' ); - WideCharToMultiByte( CP_UTF8, 0, wstr.c_str(), -1, &str[0], sz, NULL, NULL ); + WideCharToMultiByte( CP_UTF8, 0, wstr.c_str(), -1, &str[0], sz, nullptr, nullptr ); strip_trailing_nulls( str ); return str; #else @@ -421,12 +421,13 @@ std::string native_to_utf8( const std::string &str ) } #if defined(_WIN32) // native encoded string --> Unicode sequence --> UTF-8 string - int unicode_size = MultiByteToWideChar( CP_ACP, 0, str.c_str(), -1, NULL, 0 ) + 1; + int unicode_size = MultiByteToWideChar( CP_ACP, 0, str.c_str(), -1, nullptr, 0 ) + 1; std::wstring unicode( unicode_size, '\0' ); MultiByteToWideChar( CP_ACP, 0, str.c_str(), -1, &unicode[0], unicode_size ); - int utf8_size = WideCharToMultiByte( CP_UTF8, 0, &unicode[0], -1, NULL, 0, NULL, 0 ) + 1; + int utf8_size = WideCharToMultiByte( CP_UTF8, 0, &unicode[0], -1, nullptr, 0, nullptr, + nullptr ) + 1; std::string result( utf8_size, '\0' ); - WideCharToMultiByte( CP_UTF8, 0, &unicode[0], -1, &result[0], utf8_size, NULL, 0 ); + WideCharToMultiByte( CP_UTF8, 0, &unicode[0], -1, &result[0], utf8_size, nullptr, nullptr ); strip_trailing_nulls( result ); return result; #else @@ -441,12 +442,13 @@ std::string utf8_to_native( const std::string &str ) } #if defined(_WIN32) // UTF-8 string --> Unicode sequence --> native encoded string - int unicode_size = MultiByteToWideChar( CP_UTF8, 0, str.c_str(), -1, NULL, 0 ) + 1; + int unicode_size = MultiByteToWideChar( CP_UTF8, 0, str.c_str(), -1, nullptr, 0 ) + 1; std::wstring unicode( unicode_size, '\0' ); MultiByteToWideChar( CP_UTF8, 0, str.c_str(), -1, &unicode[0], unicode_size ); - int native_size = WideCharToMultiByte( CP_ACP, 0, &unicode[0], -1, NULL, 0, NULL, 0 ) + 1; + int native_size = WideCharToMultiByte( CP_ACP, 0, &unicode[0], -1, nullptr, 0, nullptr, + nullptr ) + 1; std::string result( native_size, '\0' ); - WideCharToMultiByte( CP_ACP, 0, &unicode[0], -1, &result[0], native_size, NULL, 0 ); + WideCharToMultiByte( CP_ACP, 0, &unicode[0], -1, &result[0], native_size, nullptr, nullptr ); strip_trailing_nulls( result ); return result; #else diff --git a/src/character.cpp b/src/character.cpp index a0a1b11699bca..6132ce5b0bf43 100644 --- a/src/character.cpp +++ b/src/character.cpp @@ -4945,7 +4945,8 @@ void Character::burn_move_stamina( int moves ) { int overburden_percentage = 0; units::mass current_weight = weight_carried(); - units::mass max_weight = weight_capacity(); + // Make it at least 1 gram to avoid divide-by-zero warning + units::mass max_weight = std::max( weight_capacity(), 1_gram ); if( current_weight > max_weight ) { overburden_percentage = ( current_weight - max_weight ) * 100 / max_weight; } diff --git a/src/character_martial_arts.cpp b/src/character_martial_arts.cpp index 2d460dd379221..d878a59ea3afe 100644 --- a/src/character_martial_arts.cpp +++ b/src/character_martial_arts.cpp @@ -102,11 +102,11 @@ void character_martial_arts::selected_style_check() } } -std::string character_martial_arts::enumerate_known_styles( const itype_id &itt ) const +std::string character_martial_arts::enumerate_known_styles( const itype_id &weap ) const { return enumerate_as_string( ma_styles.begin(), ma_styles.end(), - [itt]( const matype_id & mid ) { - return mid->has_weapon( itt ) ? mid->name.translated() : std::string(); + [weap]( const matype_id & mid ) { + return mid->has_weapon( weap ) ? mid->name.translated() : std::string(); } ); } diff --git a/src/compatibility.h b/src/compatibility.h index e98b79819005b..bbc6bac12cb6a 100644 --- a/src/compatibility.h +++ b/src/compatibility.h @@ -27,6 +27,7 @@ #include #include +// NOLINTNEXTLINE(cata-no-long) inline std::string to_string( const long n ) { //- and \0 @@ -36,6 +37,7 @@ inline std::string to_string( const long n ) return buffer; } +// NOLINTNEXTLINE(cata-no-long) inline std::string to_string( const unsigned long n ) { //- and \0 diff --git a/src/crash.cpp b/src/crash.cpp index 46013488fea90..6e2766242f9ff 100644 --- a/src/crash.cpp +++ b/src/crash.cpp @@ -55,7 +55,8 @@ extern "C" { static SYMBOL_INFO *const sym = reinterpret_cast( &sym_storage ); // compose message ourselves to avoid potential dynamical allocation. - static void append_str( FILE *file, char **beg, char *end, const char *from ) + static void append_str( FILE *const file, char **const beg, const char *const end, + const char *from ) { fputs( from, stderr ); if( file ) { @@ -66,7 +67,7 @@ extern "C" { } } - static void append_ch( FILE *file, char **beg, char *end, char ch ) + static void append_ch( FILE *const file, char **const beg, const char *const end, const char ch ) { fputc( ch, stderr ); if( file ) { @@ -78,7 +79,8 @@ extern "C" { } } - static void append_uint( FILE *file, char **beg, char *end, uintmax_t value ) + static void append_uint( FILE *const file, char **const beg, const char *const end, + const uintmax_t value ) { if( value != 0 ) { int cnt = 0; @@ -93,22 +95,22 @@ extern "C" { } } - static void append_ptr( FILE *file, char **beg, char *end, void *p ) + static void append_ptr( FILE *const file, char **const beg, const char *const end, void *const p ) { append_uint( file, beg, end, uintptr_t( p ) ); } static void dump_to( const char *file ) { - HANDLE handle = CreateFile( file, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, - FILE_ATTRIBUTE_NORMAL, NULL ); + HANDLE handle = CreateFile( file, GENERIC_WRITE, 0, nullptr, CREATE_ALWAYS, + FILE_ATTRIBUTE_NORMAL, nullptr ); // TODO: call from a separate process as suggested by the documentation // TODO: capture stack trace and pass as parameter as suggested by the documentation MiniDumpWriteDump( GetCurrentProcess(), GetCurrentProcessId(), handle, MiniDumpNormal, - NULL, NULL, NULL ); + nullptr, nullptr, nullptr ); CloseHandle( handle ); } @@ -129,7 +131,7 @@ extern "C" { append_str( file, &beg, end, "\nSTACK TRACE:\n" ); sym->SizeOfStruct = sizeof( SYMBOL_INFO ); sym->MaxNameLen = MAX_NAME_LEN; - USHORT num_bt = CaptureStackBackTrace( 0, BT_CNT, bt, NULL ); + USHORT num_bt = CaptureStackBackTrace( 0, BT_CNT, bt, nullptr ); HANDLE proc = GetCurrentProcess(); for( USHORT i = 0; i < num_bt; ++i ) { DWORD64 off; @@ -164,7 +166,7 @@ extern "C" { } *beg = '\0'; #if defined(TILES) - if( SDL_ShowSimpleMessageBox( SDL_MESSAGEBOX_ERROR, "Error", buf, NULL ) != 0 ) { + if( SDL_ShowSimpleMessageBox( SDL_MESSAGEBOX_ERROR, "Error", buf, nullptr ) != 0 ) { append_str( file, &beg, end, "Error creating SDL message box: " ); append_str( file, &beg, end, SDL_GetError() ); append_ch( file, &beg, end, '\n' ); @@ -209,7 +211,7 @@ extern "C" { void init_crash_handlers() { - SymInitialize( GetCurrentProcess(), NULL, TRUE ); + SymInitialize( GetCurrentProcess(), nullptr, TRUE ); for( auto sig : { SIGSEGV, SIGILL, SIGABRT, SIGFPE } ) { diff --git a/src/debug.cpp b/src/debug.cpp index 4483695b8b96d..e28df00a18125 100644 --- a/src/debug.cpp +++ b/src/debug.cpp @@ -583,7 +583,7 @@ void debug_write_backtrace( std::ostream &out ) #if defined(_WIN32) sym.SizeOfStruct = sizeof( SYMBOL_INFO ); sym.MaxNameLen = max_name_len; - USHORT num_bt = CaptureStackBackTrace( 0, bt_cnt, bt, NULL ); + USHORT num_bt = CaptureStackBackTrace( 0, bt_cnt, bt, nullptr ); HANDLE proc = GetCurrentProcess(); for( USHORT i = 0; i < num_bt; ++i ) { DWORD64 off; @@ -622,7 +622,7 @@ void debug_write_backtrace( std::ostream &out ) for( int i = 0; i < count; ++i ) { out << "\n " << funcNames[i]; } - out << "\n\n Attempting to repeat stack trace using debug symbols...\n"; + out << "\n\n Attempting to repeat stack trace using debug symbols…\n"; // Try to print the backtrace again, but this time using addr2line // to extract debug info and thus get a more detailed / useful // version. If addr2line is not available this will just fail, @@ -665,7 +665,7 @@ void debug_write_backtrace( std::ostream &out ) if( src == buf_end ) { src = buf; } else { - out.write( "...", 3 ); + out << "…"; } out.write( src, strlen( src ) ); } @@ -925,7 +925,7 @@ static std::string linux_version() // replace '\n' and '\t' in output. static const std::vector> to_replace = { {"\n", "; "}, - {"\t", " "}, + {"\t", " "}, // NOLINT(cata-text-style) }; for( const auto &e : to_replace ) { std::string::size_type pos; diff --git a/src/faction.cpp b/src/faction.cpp index 846283fe747da..7568e52c2c7d2 100644 --- a/src/faction.cpp +++ b/src/faction.cpp @@ -704,17 +704,17 @@ void faction_manager::display() const // entries_per_page * page number const size_t top_of_page = entries_per_page * ( selection / entries_per_page ); if( tab == tab_mode::TAB_FOLLOWERS ) { - if( !followers.empty() ) { + if( selection < followers.size() ) { guy = followers[selection]; } active_vec_size = followers.size(); } else if( tab == tab_mode::TAB_MYFACTION ) { - if( !camps.empty() ) { + if( selection < camps.size() ) { camp = camps[selection]; } active_vec_size = camps.size(); } else if( tab == tab_mode::TAB_OTHERFACTIONS ) { - if( !valfac.empty() ) { + if( selection < valfac.size() ) { cur_fac = valfac[selection]; } active_vec_size = valfac.size(); @@ -748,8 +748,7 @@ void faction_manager::display() const trim_and_print( w_missions, point( 1, y ), 28, selection == i ? hilite( col ) : col, camps[i]->camp_name() ); } - if( selection < camps.size() ) { - assert( camp ); // To appease static analysis + if( camp ) { camp->faction_display( w_missions, 31 ); } else { mvwprintz( w_missions, point( 31, 4 ), c_light_red, no_camp ); @@ -770,8 +769,7 @@ void faction_manager::display() const trim_and_print( w_missions, point( 1, y ), 28, selection == i ? hilite( col ) : col, followers[i]->disp_name() ); } - if( selection < followers.size() ) { - assert( guy ); // To appease static analysis + if( guy ) { int retval = guy->faction_display( w_missions, 31 ); if( retval == 2 ) { radio_interactable = true; @@ -797,8 +795,7 @@ void faction_manager::display() const trim_and_print( w_missions, point( 1, y ), 28, selection == i ? hilite( col ) : col, _( valfac[i]->name ) ); } - if( selection < valfac.size() ) { - assert( cur_fac ); // To appease static analysis + if( cur_fac ) { cur_fac->faction_display( w_missions, 31 ); } else { mvwprintz( w_missions, point( 31, 4 ), c_light_red, no_fac ); diff --git a/src/filesystem.cpp b/src/filesystem.cpp index 0294705df7a2e..54bd22e644e0c 100644 --- a/src/filesystem.cpp +++ b/src/filesystem.cpp @@ -192,6 +192,7 @@ bool is_directory_stat( const std::string &full_path ) } if( S_ISDIR( result.st_mode ) ) { + // NOLINTNEXTLINE(readability-simplify-boolean-expr) return true; } diff --git a/src/game.cpp b/src/game.cpp index faa255d4d0a00..4985d49f6ca4e 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -7322,11 +7322,10 @@ game::vmenu_ret game::list_items( const std::vector &item_list ) refilter = true; uistate.list_item_filter_active = false; addcategory = !sort_radius; - } else if( action == "EXAMINE" && !filtered_items.empty() ) { + } else if( action == "EXAMINE" && !filtered_items.empty() && activeItem ) { std::vector vThisItem; std::vector vDummy; int dummy = 0; // draw_item_info needs an int & - assert( activeItem ); // To appease static analysis activeItem->example->info( true, vThisItem ); draw_item_info( 0, width - 5, 0, TERMY - VIEW_OFFSET_Y * 2, activeItem->example->tname(), activeItem->example->type_name(), vThisItem, vDummy, dummy, @@ -7457,8 +7456,7 @@ game::vmenu_ret game::list_items( const std::vector &item_list ) iActive = mSortCategory[0].empty() ? 0 : 1; } } else if( action == "RIGHT" ) { - if( !filtered_items.empty() ) { - assert( activeItem ); // To appease static analysis + if( !filtered_items.empty() && activeItem ) { if( ++page_num >= static_cast( activeItem->vIG.size() ) ) { page_num = activeItem->vIG.size() - 1; } @@ -7921,14 +7919,14 @@ static int get_initial_hotkey( const size_t menu_index ) // There are options for optimization here, but the function is hit infrequently // enough that optimizing now is not a useful time expenditure. static std::vector> generate_butcher_stack_display( - std::vector &its ) + const std::vector &its ) { std::vector> result; std::vector result_strings; result.reserve( its.size() ); result_strings.reserve( its.size() ); - for( map_stack::iterator &it : its ) { + for( const map_stack::iterator &it : its ) { const std::string tname = it->tname(); size_t s = 0; // Search for the index with a string equivalent to tname @@ -8286,8 +8284,7 @@ void game::butcher() // Add corpses, disassembleables, and salvagables to the UI add_corpses( kmenu, corpses, i ); add_disassemblables( kmenu, disassembly_stacks, i ); - if( !salvageables.empty() ) { - assert( salvage_iuse ); // To appease static analysis + if( salvage_iuse && !salvageables.empty() ) { add_salvagables( kmenu, salvage_stacks, i, *salvage_iuse ); } @@ -8308,8 +8305,7 @@ void game::butcher() kmenu.addentry_col( MULTIDISASSEMBLE_ALL, true, 'd', _( "Disassemble everything" ), to_string_clipped( time_duration::from_turns( time_to_disassemble_all / 100 ) ) ); } - if( salvageables.size() > 1 ) { - assert( salvage_iuse ); // To appease static analysis + if( salvage_iuse && salvageables.size() > 1 ) { int time_to_salvage = 0; for( const auto &stack : salvage_stacks ) { time_to_salvage += salvage_iuse->time_to_cut_up( *stack.first ) * stack.second; diff --git a/src/ime.cpp b/src/ime.cpp index f309e3a2609ee..e22df24205917 100644 --- a/src/ime.cpp +++ b/src/ime.cpp @@ -13,10 +13,10 @@ class imm_wrapper { private: HMODULE hImm; - typedef HIMC( WINAPI *pImmGetContext_t )( HWND ); - typedef BOOL( WINAPI *pImmGetOpenStatus_t )( HIMC ); - typedef BOOL( WINAPI *pImmSetOpenStatus_t )( HIMC, BOOL ); - typedef BOOL( WINAPI *pImmReleaseContext_t )( HWND, HIMC ); + using pImmGetContext_t = HIMC( WINAPI * )( HWND ); + using pImmGetOpenStatus_t = BOOL( WINAPI * )( HIMC ); + using pImmSetOpenStatus_t = BOOL( WINAPI * )( HIMC, BOOL ); + using pImmReleaseContext_t = BOOL( WINAPI * )( HWND, HIMC ); pImmGetContext_t pImmGetContext; pImmGetOpenStatus_t pImmGetOpenStatus; pImmSetOpenStatus_t pImmSetOpenStatus; @@ -61,7 +61,9 @@ class imm_wrapper bool ime_enabled() { if( hImm ) { + // NOLINTNEXTLINE(misc-misplaced-const) const HWND hwnd = getWindowHandle(); + // NOLINTNEXTLINE(misc-misplaced-const) const HIMC himc = pImmGetContext( hwnd ); bool enabled = pImmGetOpenStatus( himc ); pImmReleaseContext( hwnd, himc ); @@ -72,7 +74,9 @@ class imm_wrapper void enable_ime() { if( hImm ) { + // NOLINTNEXTLINE(misc-misplaced-const) const HWND hwnd = getWindowHandle(); + // NOLINTNEXTLINE(misc-misplaced-const) const HIMC himc = pImmGetContext( hwnd ); pImmSetOpenStatus( himc, TRUE ); pImmReleaseContext( hwnd, himc ); @@ -81,7 +85,9 @@ class imm_wrapper void disable_ime() { if( hImm ) { + // NOLINTNEXTLINE(misc-misplaced-const) const HWND hwnd = getWindowHandle(); + // NOLINTNEXTLINE(misc-misplaced-const) const HIMC himc = pImmGetContext( hwnd ); pImmSetOpenStatus( himc, FALSE ); pImmReleaseContext( hwnd, himc ); diff --git a/src/init.cpp b/src/init.cpp index 8d8d98c706900..064930c6b889a 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -391,7 +391,7 @@ void DynamicDataLoader::initialize() void DynamicDataLoader::load_data_from_path( const std::string &path, const std::string &src, loading_ui &ui ) { - assert( !finalized && "Can't load additional data after finalization. Must be unloaded first." ); + assert( !finalized && "Can't load additional data after finalization. Must be unloaded first." ); // We assume that each folder is consistent in itself, // and all the previously loaded folders. // E.g. the core might provide a vpart "frame-x" diff --git a/src/inventory_ui.cpp b/src/inventory_ui.cpp index d23323cddecd3..d109e6f8f1bab 100644 --- a/src/inventory_ui.cpp +++ b/src/inventory_ui.cpp @@ -556,6 +556,7 @@ void inventory_column::reset_width() size_t inventory_column::page_of( size_t index ) const { assert( entries_per_page ); // To appease static analysis + // NOLINTNEXTLINE(clang-analyzer-core.DivideZero) return index / entries_per_page; } diff --git a/src/item.cpp b/src/item.cpp index bc9beac596db4..96536453ecc63 100644 --- a/src/item.cpp +++ b/src/item.cpp @@ -2748,7 +2748,7 @@ void item::final_info( std::vector &info, const iteminfo_query *parts, std::string info_str = string_format( _( "* This clothing %s." ), resize_str ); info.push_back( iteminfo( "DESCRIPTION", info_str ) ); } else { - std::string resize_str = ""; + std::string resize_str; if( sizing_level == sizing::small_sized_human_char ) { resize_str = _( " and upsized." ); } else if( sizing_level == sizing::human_sized_small_char ) { diff --git a/src/monattack.cpp b/src/monattack.cpp index caa62f416bd75..1bf0b47f5aeb8 100644 --- a/src/monattack.cpp +++ b/src/monattack.cpp @@ -959,6 +959,7 @@ bool mattack::resurrect( monster *z ) std::pair raised = random_entry( corpses ); assert( raised.second ); // To appease static analysis + // NOLINTNEXTLINE(clang-analyzer-core.CallAndMessage) float corpse_damage = raised.second->damage_level( 4 ); // Did we successfully raise something? if( g->revive_corpse( raised.first, *raised.second ) ) { diff --git a/src/savegame_json.cpp b/src/savegame_json.cpp index f624312c895c0..8a4a7393d65a3 100644 --- a/src/savegame_json.cpp +++ b/src/savegame_json.cpp @@ -433,7 +433,7 @@ void Character::load( JsonObject &data ) if( data.has_array( "ma_styles" ) ) { std::vector temp_styles; data.read( "ma_styles", temp_styles ); - bool temp_keep_hands_free; + bool temp_keep_hands_free = false; data.read( "keep_hands_free", temp_keep_hands_free ); matype_id temp_selected_style; data.read( "style_selected", temp_selected_style ); diff --git a/src/sdltiles.cpp b/src/sdltiles.cpp index a3d670b77a8de..aad6ae4dfd48c 100644 --- a/src/sdltiles.cpp +++ b/src/sdltiles.cpp @@ -3218,10 +3218,15 @@ static void save_font_list() font_folder_list( fout, FILENAMES["fontdir"], bitmap_fonts ); #if defined(_WIN32) - char buf[256]; - GetSystemWindowsDirectory( buf, 256 ); - strcat( buf, "\\fonts" ); - font_folder_list( fout, buf, bitmap_fonts ); + constexpr UINT max_dir_len = 256; + char buf[max_dir_len]; + const UINT dir_len = GetSystemWindowsDirectory( buf, max_dir_len ); + if( dir_len == 0 ) { + throw std::runtime_error( "GetSystemWindowsDirectory failed" ); + } else if( dir_len >= max_dir_len ) { + throw std::length_error( "GetSystemWindowsDirectory failed due to insufficient buffer" ); + } + font_folder_list( fout, buf + std::string( "\\fonts" ), bitmap_fonts ); #elif defined(_APPLE_) && defined(_MACH_) /* // Well I don't know how osx actually works .... diff --git a/tests/hash_test.cpp b/tests/hash_test.cpp index ce75ed12924c9..894d767e1e4fc 100644 --- a/tests/hash_test.cpp +++ b/tests/hash_test.cpp @@ -7,10 +7,6 @@ #include "catch/catch.hpp" #include "point.h" -#ifdef RELEASE -#include -#endif - // A larger number for this would be GREAT, but the test isn't efficient enough to make it larger. // Previously tried inserting into an unordered_set, // but that was slower than appending to a vector and doing the sort+unique manually. @@ -60,37 +56,3 @@ TEST_CASE( "tripoint_hash_distribution", "[hash]" ) } CHECK( count_unique_elements( found_hashes ) > element_count * 0.9 ); } - -template -void put_coordinate( std::unordered_set &c, int x, int y ) -{ - c.emplace( x, y ); -} - -template -void put_coordinate( std::unordered_set &c, int x, int y ) -{ - c.emplace( x, y, 0 ); -} - -#ifdef RELEASE -// These tests are slow and probably pointless for non-release builds - -template -long get_set_runtime() -{ - std::unordered_set test_set; - auto start1 = std::chrono::high_resolution_clock::now(); - // The use case is repeatedly looking up the same entries repeatedly - // while sometimes inserting new ones. - for( int i = 0; i < 1000; ++i ) { - for( int x = -60; x <= 60; ++x ) { - for( int y = -60; y <= 60; ++y ) { - put_coordinate( test_set, x, y ); - } - } - } - auto end1 = std::chrono::high_resolution_clock::now(); - return std::chrono::duration_cast( end1 - start1 ).count(); -} -#endif // RELEASE From f5ef68e0df5d5986d1a14fe7b6edeb24132e9f8f Mon Sep 17 00:00:00 2001 From: OzoneH3 Date: Mon, 4 Nov 2019 14:12:38 +0000 Subject: [PATCH 4/9] Reading: Progress on top of screen (#35308) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Reading: Progress on top of screen * Update src/player_activity.cpp Co-Authored-By: Jianxiang Wang (王健翔) --- src/game.cpp | 2 +- src/player_activity.cpp | 21 ++++++++++++++++++++- src/player_activity.h | 3 ++- 3 files changed, 23 insertions(+), 3 deletions(-) diff --git a/src/game.cpp b/src/game.cpp index 138ff565eef59..47bf1d10a44fe 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -1581,7 +1581,7 @@ bool game::do_turn() refresh_display(); } } else if( calendar::once_every( 1_minutes ) ) { - if( const cata::optional progress = u.activity.get_progress_message() ) { + if( const cata::optional progress = u.activity.get_progress_message( u ) ) { query_popup() .wait_message( "%s", *progress ) .on_top( true ) diff --git a/src/player_activity.cpp b/src/player_activity.cpp index 933dd0ee24d6d..d4e2f1c0ef8ef 100644 --- a/src/player_activity.cpp +++ b/src/player_activity.cpp @@ -6,6 +6,9 @@ #include "activity_type.h" #include "player.h" #include "sounds.h" +#include "avatar.h" +#include "itype.h" +#include "skill.h" player_activity::player_activity() : type( activity_id::NULL_ID() ) { } @@ -59,7 +62,7 @@ std::string player_activity::get_str_value( size_t index, const std::string &def return index < str_values.size() ? str_values[index] : def; } -cata::optional player_activity::get_progress_message() const +cata::optional player_activity::get_progress_message( const avatar &u ) const { if( type == activity_id( "ACT_NULL" ) || get_verb().empty() ) { return cata::optional(); @@ -70,6 +73,22 @@ cata::optional player_activity::get_progress_message() const if( const item *craft = targets.front().get_item() ) { extra_info = craft->tname(); } + } else if( type == activity_id( "ACT_READ" ) ) { + if( const item *book = targets.front().get_item() ) { + if( const auto &reading = book->type->book ) { + const skill_id &skill = reading->skill; + if( skill && u.get_skill_level( skill ) < reading->level && + u.get_skill_level_object( skill ).can_train() ) { + const SkillLevel &skill_level = u.get_skill_level_object( skill ); + //~ skill_name current_skill_level -> next_skill_level (% to next level) + extra_info = string_format( pgettext( "reading progress", "%s %d -> %d (%d%%)" ), + skill.obj().name(), + skill_level.level(), + skill_level.level() + 1, + skill_level.exercise() ); + } + } + } } else if( moves_total > 0 ) { const int percentage = ( ( moves_total - moves_left ) * 100 ) / moves_total; diff --git a/src/player_activity.h b/src/player_activity.h index 0708a58689167..767363522dbca 100644 --- a/src/player_activity.h +++ b/src/player_activity.h @@ -15,6 +15,7 @@ #include "point.h" #include "string_id.h" +class avatar; class player; class Character; class JsonIn; @@ -88,7 +89,7 @@ class player_activity /** * Helper that returns an activity specific progress message. */ - cata::optional get_progress_message() const; + cata::optional get_progress_message( const avatar &u ) const; /** * If this returns true, the action can be continued without From bf64bd52bcd44752944b8a168149e7562ebb185a Mon Sep 17 00:00:00 2001 From: snipercup <50166150+snipercup@users.noreply.github.com> Date: Mon, 4 Nov 2019 15:13:43 +0100 Subject: [PATCH 5/9] Move vehicle parts recipes to vehicle parts recipe json (#35309) --- data/json/recipes/recipe_others.json | 250 -------------------------- data/json/recipes/recipe_vehicle.json | 250 ++++++++++++++++++++++++++ 2 files changed, 250 insertions(+), 250 deletions(-) diff --git a/data/json/recipes/recipe_others.json b/data/json/recipes/recipe_others.json index 8ad6bdbdfa985..1d54c6d98e43c 100644 --- a/data/json/recipes/recipe_others.json +++ b/data/json/recipes/recipe_others.json @@ -1447,256 +1447,6 @@ "tools": [ [ [ "surface_heat", 5, "LIST" ] ] ], "components": [ [ [ "superglue", 1 ] ], [ [ "rag", 6 ] ], [ [ "plastic_chunk", 1 ] ] ] }, - { - "type": "recipe", - "result": "basket", - "category": "CC_OTHER", - "subcategory": "CSC_OTHER_PARTS", - "skill_used": "fabrication", - "difficulty": 2, - "time": "50 m", - "reversible": true, - "autolearn": true, - "using": [ [ "welding_standard", 5 ], [ "cutting_wire_standard", 1 ] ], - "components": [ [ [ "wire", 40 ] ] ] - }, - { - "type": "recipe", - "result": "folding_basket", - "category": "CC_OTHER", - "subcategory": "CSC_OTHER_PARTS", - "skill_used": "fabrication", - "difficulty": 2, - "time": "1 h", - "reversible": true, - "autolearn": true, - "using": [ [ "welding_standard", 5 ], [ "cutting_wire_standard", 1 ] ], - "components": [ [ [ "wire", 40 ], [ "basket", 1 ] ], [ [ "scrap", 8 ] ] ] - }, - { - "type": "recipe", - "result": "bike_basket", - "category": "CC_OTHER", - "subcategory": "CSC_OTHER_PARTS", - "skill_used": "fabrication", - "difficulty": 1, - "time": "35 m", - "reversible": true, - "autolearn": true, - "using": [ [ "welding_standard", 2 ], [ "cutting_wire_standard", 1 ] ], - "components": [ [ [ "wire", 8 ] ] ] - }, - { - "type": "recipe", - "result": "foldframe", - "category": "CC_OTHER", - "subcategory": "CSC_OTHER_PARTS", - "skill_used": "fabrication", - "difficulty": 1, - "time": "8 m", - "reversible": true, - "autolearn": true, - "using": [ [ "welding_standard", 6 ] ], - "components": [ [ [ "pipe", 4 ] ] ] - }, - { - "type": "recipe", - "result": "foldwoodframe", - "category": "CC_OTHER", - "subcategory": "CSC_OTHER_PARTS", - "skill_used": "fabrication", - "difficulty": 2, - "time": "9 m", - "reversible": true, - "autolearn": true, - "qualities": [ { "id": "HAMMER", "level": 1 }, { "id": "CUT", "level": 1 } ], - "components": [ [ [ "2x4", 5 ] ], [ [ "stick", 2 ] ], [ [ "nail", 20 ] ] ] - }, - { - "type": "recipe", - "result": "wheel_wheelchair", - "category": "CC_OTHER", - "subcategory": "CSC_OTHER_PARTS", - "skill_used": "fabrication", - "difficulty": 2, - "time": "5 m", - "reversible": true, - "autolearn": true, - "using": [ [ "welding_standard", 4 ] ], - "qualities": [ { "id": "HAMMER", "level": 2 }, { "id": "SAW_M", "level": 1 } ], - "components": [ [ [ "pipe", 2 ] ], [ [ "wheel_bicycle", 2 ] ] ] - }, - { - "type": "recipe", - "result": "hand_rims", - "category": "CC_OTHER", - "subcategory": "CSC_OTHER_PARTS", - "skill_used": "fabrication", - "difficulty": 1, - "time": "4 m", - "reversible": true, - "autolearn": true, - "using": [ [ "welding_standard", 2 ] ], - "qualities": [ { "id": "HAMMER", "level": 2 }, { "id": "SAW_M", "level": 1 } ], - "components": [ [ [ "pipe", 2 ] ] ] - }, - { - "type": "recipe", - "result": "frame", - "category": "CC_OTHER", - "subcategory": "CSC_OTHER_PARTS", - "skill_used": "fabrication", - "difficulty": 1, - "time": "45 m", - "reversible": true, - "autolearn": true, - "using": [ [ "steel_standard", 20 ] ], - "qualities": [ { "id": "GLARE", "level": 2 } ], - "tools": [ - [ [ "crucible", -1 ], [ "crucible_clay", -1 ] ], - [ [ "welder", 50 ], [ "welder_crude", 75 ], [ "toolset", 75 ], [ "forge", 50 ], [ "oxy_torch", 10 ] ] - ] - }, - { - "type": "recipe", - "result": "hdframe", - "category": "CC_OTHER", - "subcategory": "CSC_OTHER_PARTS", - "skill_used": "fabrication", - "difficulty": 1, - "time": "1 h 30 m", - "reversible": true, - "autolearn": true, - "qualities": [ { "id": "GLARE", "level": 2 } ], - "using": [ [ "steel_standard", 100 ] ], - "tools": [ - [ [ "crucible", -1 ], [ "crucible_clay", -1 ] ], - [ [ "welder", 50 ], [ "welder_crude", 75 ], [ "toolset", 75 ], [ "forge", 50 ], [ "oxy_torch", 10 ] ] - ] - }, - { - "type": "recipe", - "result": "frame_wood", - "category": "CC_OTHER", - "subcategory": "CSC_OTHER_PARTS", - "skill_used": "fabrication", - "difficulty": 1, - "time": "6 m", - "reversible": true, - "autolearn": true, - "qualities": [ { "id": "HAMMER", "level": 1 } ], - "components": [ [ [ "2x4", 5 ] ], [ [ "nail", 20 ] ] ] - }, - { - "type": "recipe", - "result": "frame_wood_light", - "category": "CC_OTHER", - "subcategory": "CSC_OTHER_PARTS", - "skill_used": "fabrication", - "time": "4 m", - "reversible": true, - "autolearn": true, - "using": [ [ "rope_natural_short", 3 ] ], - "components": [ [ [ "2x4", 3 ], [ "stick", 6 ] ] ] - }, - { - "type": "recipe", - "result": "wheel_wood", - "category": "CC_OTHER", - "subcategory": "CSC_OTHER_PARTS", - "skill_used": "fabrication", - "difficulty": 3, - "time": "6 m", - "reversible": true, - "autolearn": true, - "qualities": [ { "id": "HAMMER", "level": 1 }, { "id": "SAW_W", "level": 1 } ], - "components": [ [ [ "2x4", 5 ] ], [ [ "nail", 20 ] ] ] - }, - { - "type": "recipe", - "result": "wheel_wood_b", - "category": "CC_OTHER", - "subcategory": "CSC_OTHER_PARTS", - "skill_used": "fabrication", - "difficulty": 4, - "time": "12 m", - "reversible": true, - "autolearn": true, - "qualities": [ { "id": "HAMMER", "level": 1 }, { "id": "SAW_W", "level": 1 } ], - "components": [ [ [ "2x4", 5 ] ], [ [ "nail", 30 ] ], [ [ "scrap", 5 ] ] ] - }, - { - "type": "recipe", - "result": "wood_plate", - "category": "CC_OTHER", - "subcategory": "CSC_OTHER_PARTS", - "skill_used": "fabrication", - "difficulty": 2, - "time": "6 m", - "reversible": true, - "autolearn": true, - "using": [ [ "rope_natural_short", 2 ] ], - "components": [ [ [ "2x4", 6 ] ] ] - }, - { - "type": "recipe", - "result": "steel_plate", - "category": "CC_OTHER", - "subcategory": "CSC_OTHER_PARTS", - "skill_used": "fabrication", - "difficulty": 4, - "time": "12 m", - "reversible": true, - "//": "sawing it down doesn't teach anything useful", - "autolearn": true, - "qualities": [ { "id": "GLARE", "level": 2 } ], - "tools": [ [ [ "welder", 100 ], [ "welder_crude", 150 ], [ "toolset", 150 ], [ "forge", 100 ], [ "oxy_torch", 20 ] ] ], - "components": [ [ [ "steel_lump", 8 ] ] ] - }, - { - "type": "recipe", - "result": "steel_armor", - "category": "CC_OTHER", - "subcategory": "CSC_OTHER_MATERIALS", - "skill_used": "fabrication", - "difficulty": 4, - "time": "12 m", - "reversible": true, - "//": "sawing it down doesn't teach anything useful", - "autolearn": true, - "qualities": [ { "id": "GLARE", "level": 2 } ], - "tools": [ [ [ "welder", 50 ], [ "welder_crude", 75 ], [ "toolset", 75 ], [ "forge", 50 ], [ "oxy_torch", 10 ] ] ], - "components": [ [ [ "steel_lump", 4 ] ] ] - }, - { - "type": "recipe", - "result": "spiked_plate", - "category": "CC_OTHER", - "subcategory": "CSC_OTHER_PARTS", - "skill_used": "fabrication", - "difficulty": 4, - "time": "12 m", - "reversible": true, - "book_learn": [ [ "textbook_fabrication", 3 ], [ "welding_book", 3 ], [ "textbook_mechanics", 4 ] ], - "qualities": [ { "id": "GLARE", "level": 2 } ], - "tools": [ [ [ "welder", 100 ], [ "welder_crude", 150 ], [ "toolset", 150 ], [ "forge", 100 ], [ "oxy_torch", 20 ] ] ], - "components": [ [ [ "steel_lump", 8 ], [ "steel_plate", 1 ] ], [ [ "steel_chunk", 4 ], [ "scrap", 12 ], [ "spike", 4 ] ] ] - }, - { - "type": "recipe", - "result": "hard_plate", - "category": "CC_OTHER", - "subcategory": "CSC_OTHER_PARTS", - "skill_used": "fabrication", - "difficulty": 6, - "//": "hardened metal tools require high fabrication, so +1 diff here", - "time": "12 m", - "reversible": true, - "book_learn": [ [ "textbook_fabrication", 5 ], [ "adv_chemistry", 6 ], [ "welding_book", 5 ] ], - "qualities": [ { "id": "GLARE", "level": 2 } ], - "tools": [ [ [ "welder", 100 ], [ "welder_crude", 150 ], [ "toolset", 150 ], [ "forge", 100 ], [ "oxy_torch", 20 ] ] ], - "components": [ [ [ "steel_lump", 24 ] ] ] - }, { "type": "recipe", "result": "tree_spile", diff --git a/data/json/recipes/recipe_vehicle.json b/data/json/recipes/recipe_vehicle.json index 7e8fde56d4020..e37c3e02c8bb3 100644 --- a/data/json/recipes/recipe_vehicle.json +++ b/data/json/recipes/recipe_vehicle.json @@ -457,5 +457,255 @@ [ [ "camera", 1 ], [ "camera_pro", 1 ], [ "omnicamera", 1 ], [ "sensor_module", 1 ] ], [ [ "robot_controls", 1 ] ] ] + }, + { + "type": "recipe", + "result": "basket", + "category": "CC_OTHER", + "subcategory": "CSC_OTHER_PARTS", + "skill_used": "fabrication", + "difficulty": 2, + "time": "50 m", + "reversible": true, + "autolearn": true, + "using": [ [ "welding_standard", 5 ], [ "cutting_wire_standard", 1 ] ], + "components": [ [ [ "wire", 40 ] ] ] + }, + { + "type": "recipe", + "result": "folding_basket", + "category": "CC_OTHER", + "subcategory": "CSC_OTHER_PARTS", + "skill_used": "fabrication", + "difficulty": 2, + "time": "1 h", + "reversible": true, + "autolearn": true, + "using": [ [ "welding_standard", 5 ], [ "cutting_wire_standard", 1 ] ], + "components": [ [ [ "wire", 40 ], [ "basket", 1 ] ], [ [ "scrap", 8 ] ] ] + }, + { + "type": "recipe", + "result": "bike_basket", + "category": "CC_OTHER", + "subcategory": "CSC_OTHER_PARTS", + "skill_used": "fabrication", + "difficulty": 1, + "time": "35 m", + "reversible": true, + "autolearn": true, + "using": [ [ "welding_standard", 2 ], [ "cutting_wire_standard", 1 ] ], + "components": [ [ [ "wire", 8 ] ] ] + }, + { + "type": "recipe", + "result": "foldframe", + "category": "CC_OTHER", + "subcategory": "CSC_OTHER_PARTS", + "skill_used": "fabrication", + "difficulty": 1, + "time": "8 m", + "reversible": true, + "autolearn": true, + "using": [ [ "welding_standard", 6 ] ], + "components": [ [ [ "pipe", 4 ] ] ] + }, + { + "type": "recipe", + "result": "foldwoodframe", + "category": "CC_OTHER", + "subcategory": "CSC_OTHER_PARTS", + "skill_used": "fabrication", + "difficulty": 2, + "time": "9 m", + "reversible": true, + "autolearn": true, + "qualities": [ { "id": "HAMMER", "level": 1 }, { "id": "CUT", "level": 1 } ], + "components": [ [ [ "2x4", 5 ] ], [ [ "stick", 2 ] ], [ [ "nail", 20 ] ] ] + }, + { + "type": "recipe", + "result": "wheel_wheelchair", + "category": "CC_OTHER", + "subcategory": "CSC_OTHER_PARTS", + "skill_used": "fabrication", + "difficulty": 2, + "time": "5 m", + "reversible": true, + "autolearn": true, + "using": [ [ "welding_standard", 4 ] ], + "qualities": [ { "id": "HAMMER", "level": 2 }, { "id": "SAW_M", "level": 1 } ], + "components": [ [ [ "pipe", 2 ] ], [ [ "wheel_bicycle", 2 ] ] ] + }, + { + "type": "recipe", + "result": "hand_rims", + "category": "CC_OTHER", + "subcategory": "CSC_OTHER_PARTS", + "skill_used": "fabrication", + "difficulty": 1, + "time": "4 m", + "reversible": true, + "autolearn": true, + "using": [ [ "welding_standard", 2 ] ], + "qualities": [ { "id": "HAMMER", "level": 2 }, { "id": "SAW_M", "level": 1 } ], + "components": [ [ [ "pipe", 2 ] ] ] + }, + { + "type": "recipe", + "result": "frame", + "category": "CC_OTHER", + "subcategory": "CSC_OTHER_PARTS", + "skill_used": "fabrication", + "difficulty": 1, + "time": "45 m", + "reversible": true, + "autolearn": true, + "using": [ [ "steel_standard", 20 ] ], + "qualities": [ { "id": "GLARE", "level": 2 } ], + "tools": [ + [ [ "crucible", -1 ], [ "crucible_clay", -1 ] ], + [ [ "welder", 50 ], [ "welder_crude", 75 ], [ "toolset", 75 ], [ "forge", 50 ], [ "oxy_torch", 10 ] ] + ] + }, + { + "type": "recipe", + "result": "hdframe", + "category": "CC_OTHER", + "subcategory": "CSC_OTHER_PARTS", + "skill_used": "fabrication", + "difficulty": 1, + "time": "1 h 30 m", + "reversible": true, + "autolearn": true, + "qualities": [ { "id": "GLARE", "level": 2 } ], + "using": [ [ "steel_standard", 100 ] ], + "tools": [ + [ [ "crucible", -1 ], [ "crucible_clay", -1 ] ], + [ [ "welder", 50 ], [ "welder_crude", 75 ], [ "toolset", 75 ], [ "forge", 50 ], [ "oxy_torch", 10 ] ] + ] + }, + { + "type": "recipe", + "result": "frame_wood", + "category": "CC_OTHER", + "subcategory": "CSC_OTHER_PARTS", + "skill_used": "fabrication", + "difficulty": 1, + "time": "6 m", + "reversible": true, + "autolearn": true, + "qualities": [ { "id": "HAMMER", "level": 1 } ], + "components": [ [ [ "2x4", 5 ] ], [ [ "nail", 20 ] ] ] + }, + { + "type": "recipe", + "result": "frame_wood_light", + "category": "CC_OTHER", + "subcategory": "CSC_OTHER_PARTS", + "skill_used": "fabrication", + "time": "4 m", + "reversible": true, + "autolearn": true, + "using": [ [ "rope_natural_short", 3 ] ], + "components": [ [ [ "2x4", 3 ], [ "stick", 6 ] ] ] + }, + { + "type": "recipe", + "result": "wheel_wood", + "category": "CC_OTHER", + "subcategory": "CSC_OTHER_PARTS", + "skill_used": "fabrication", + "difficulty": 3, + "time": "6 m", + "reversible": true, + "autolearn": true, + "qualities": [ { "id": "HAMMER", "level": 1 }, { "id": "SAW_W", "level": 1 } ], + "components": [ [ [ "2x4", 5 ] ], [ [ "nail", 20 ] ] ] + }, + { + "type": "recipe", + "result": "wheel_wood_b", + "category": "CC_OTHER", + "subcategory": "CSC_OTHER_PARTS", + "skill_used": "fabrication", + "difficulty": 4, + "time": "12 m", + "reversible": true, + "autolearn": true, + "qualities": [ { "id": "HAMMER", "level": 1 }, { "id": "SAW_W", "level": 1 } ], + "components": [ [ [ "2x4", 5 ] ], [ [ "nail", 30 ] ], [ [ "scrap", 5 ] ] ] + }, + { + "type": "recipe", + "result": "wood_plate", + "category": "CC_OTHER", + "subcategory": "CSC_OTHER_PARTS", + "skill_used": "fabrication", + "difficulty": 2, + "time": "6 m", + "reversible": true, + "autolearn": true, + "using": [ [ "rope_natural_short", 2 ] ], + "components": [ [ [ "2x4", 6 ] ] ] + }, + { + "type": "recipe", + "result": "steel_plate", + "category": "CC_OTHER", + "subcategory": "CSC_OTHER_PARTS", + "skill_used": "fabrication", + "difficulty": 4, + "time": "12 m", + "reversible": true, + "//": "sawing it down doesn't teach anything useful", + "autolearn": true, + "qualities": [ { "id": "GLARE", "level": 2 } ], + "tools": [ [ [ "welder", 100 ], [ "welder_crude", 150 ], [ "toolset", 150 ], [ "forge", 100 ], [ "oxy_torch", 20 ] ] ], + "components": [ [ [ "steel_lump", 8 ] ] ] + }, + { + "type": "recipe", + "result": "steel_armor", + "category": "CC_OTHER", + "subcategory": "CSC_OTHER_MATERIALS", + "skill_used": "fabrication", + "difficulty": 4, + "time": "12 m", + "reversible": true, + "//": "sawing it down doesn't teach anything useful", + "autolearn": true, + "qualities": [ { "id": "GLARE", "level": 2 } ], + "tools": [ [ [ "welder", 50 ], [ "welder_crude", 75 ], [ "toolset", 75 ], [ "forge", 50 ], [ "oxy_torch", 10 ] ] ], + "components": [ [ [ "steel_lump", 4 ] ] ] + }, + { + "type": "recipe", + "result": "spiked_plate", + "category": "CC_OTHER", + "subcategory": "CSC_OTHER_PARTS", + "skill_used": "fabrication", + "difficulty": 4, + "time": "12 m", + "reversible": true, + "book_learn": [ [ "textbook_fabrication", 3 ], [ "welding_book", 3 ], [ "textbook_mechanics", 4 ] ], + "qualities": [ { "id": "GLARE", "level": 2 } ], + "tools": [ [ [ "welder", 100 ], [ "welder_crude", 150 ], [ "toolset", 150 ], [ "forge", 100 ], [ "oxy_torch", 20 ] ] ], + "components": [ [ [ "steel_lump", 8 ], [ "steel_plate", 1 ] ], [ [ "steel_chunk", 4 ], [ "scrap", 12 ], [ "spike", 4 ] ] ] + }, + { + "type": "recipe", + "result": "hard_plate", + "category": "CC_OTHER", + "subcategory": "CSC_OTHER_PARTS", + "skill_used": "fabrication", + "difficulty": 6, + "//": "hardened metal tools require high fabrication, so +1 diff here", + "time": "12 m", + "reversible": true, + "book_learn": [ [ "textbook_fabrication", 5 ], [ "adv_chemistry", 6 ], [ "welding_book", 5 ] ], + "qualities": [ { "id": "GLARE", "level": 2 } ], + "tools": [ [ [ "welder", 100 ], [ "welder_crude", 150 ], [ "toolset", 150 ], [ "forge", 100 ], [ "oxy_torch", 20 ] ] ], + "components": [ [ [ "steel_lump", 24 ] ] ] } ] From c75af1e91a5be8024c9e3b6288c0362fc10c2c85 Mon Sep 17 00:00:00 2001 From: snipercup <50166150+snipercup@users.noreply.github.com> Date: Mon, 4 Nov 2019 15:14:29 +0100 Subject: [PATCH 6/9] Reduce smokebomb weight from 1058g to 569g (#35310) --- data/json/items/grenades.json | 1 + 1 file changed, 1 insertion(+) diff --git a/data/json/items/grenades.json b/data/json/items/grenades.json index 0c4cf6feaf966..547584a62afe5 100644 --- a/data/json/items/grenades.json +++ b/data/json/items/grenades.json @@ -418,6 +418,7 @@ "name": "smoke bomb", "description": "This is a canister grenade filled with a variety of pyrotechnic chemicals. Use this item to pull the pin and light the fuse, turning it into an active smoke bomb. Five turns after you do that, it will begin to expel a thick black smoke. This smoke will slow those who enter it, as well as obscuring vision and scent.", "price": 1800, + "weight": "569 g", "countdown_action": { "type": "transform", "target": "smokebomb_act" } }, { From 9d26cd35c14fc3317a4492ca6802dc184b047b5a Mon Sep 17 00:00:00 2001 From: arijust <54635208+arijust@users.noreply.github.com> Date: Mon, 4 Nov 2019 15:15:49 +0100 Subject: [PATCH 7/9] Add feathers to forest_trash item group. (#35293) --- data/json/itemgroups/item_groups.json | 1 + 1 file changed, 1 insertion(+) diff --git a/data/json/itemgroups/item_groups.json b/data/json/itemgroups/item_groups.json index f936ee5202b2d..2f09b9b4403b0 100644 --- a/data/json/itemgroups/item_groups.json +++ b/data/json/itemgroups/item_groups.json @@ -7172,6 +7172,7 @@ [ "steel_chunk", 1 ], { "item": "scrap", "prob": 2, "count-min": 1, "count-max": 10 }, { "item": "glass_shard", "prob": 3, "count-min": 8, "count-max": 84 }, + { "item": "feather", "prob": 5, "count-min": 5, "count-max": 10 }, [ "wire", 1 ], [ "wire_barbed", 1 ], [ "splinter", 3 ], From 002b91bcea75fcb35fda0ccbf5f01ea90b38672d Mon Sep 17 00:00:00 2001 From: DaviBones Date: Mon, 4 Nov 2019 09:21:00 -0500 Subject: [PATCH 8/9] Add mutant humanoid meat, dropped by (you guessed it) humanoid mutants (#35241) * Add mutant human meat, dropped by humanoid mutants Meat from mutant humanoids should give penalties of both mutant meat and human flesh. * Correct poser pizza recipe * Correct name of new lard Co-Authored-By: Rail-Runner --- data/json/harvest.json | 38 +++++++++ data/json/items/comestibles/carnivore.json | 47 +++++++++++ data/json/monsters/monsters.json | 4 +- data/json/monsters/mutant.json | 4 +- data/json/recipes/food/dry.json | 4 +- data/json/recipes/food/pasta.json | 6 +- data/json/recipes/recipe_food.json | 84 ++++++++++++------- .../json/requirements/cooking_components.json | 12 +++ 8 files changed, 162 insertions(+), 37 deletions(-) diff --git a/data/json/harvest.json b/data/json/harvest.json index 0b79b95a2ab34..49512175917ee 100644 --- a/data/json/harvest.json +++ b/data/json/harvest.json @@ -130,6 +130,32 @@ { "drop": "fat", "type": "flesh", "mass_ratio": 0.07 } ] }, + { + "id": "human_fur", + "//": "drops regular stomach", + "type": "harvest", + "entries": [ + { "drop": "mutant_human_flesh", "type": "flesh", "mass_ratio": 0.34 }, + { "drop": "hstomach", "scale_num": [ 1, 1 ], "max": 1, "type": "offal" }, + { "drop": "bone", "type": "bone", "mass_ratio": 0.15 }, + { "drop": "sinew", "type": "bone", "mass_ratio": 0.00035 }, + { "drop": "raw_fur", "type": "skin", "mass_ratio": 0.02 }, + { "drop": "mutant_human_fat", "type": "flesh", "mass_ratio": 0.07 } + ] + }, + { + "id": "human_large_fur", + "//": "drops large stomach", + "type": "harvest", + "entries": [ + { "drop": "mutant_human_flesh", "type": "flesh", "mass_ratio": 0.34 }, + { "drop": "hstomach_large", "scale_num": [ 1, 1 ], "max": 1, "type": "offal" }, + { "drop": "bone", "type": "bone", "mass_ratio": 0.15 }, + { "drop": "sinew", "type": "bone", "mass_ratio": 0.00035 }, + { "drop": "raw_fur", "type": "skin", "mass_ratio": 0.02 }, + { "drop": "mutant_human_fat", "type": "flesh", "mass_ratio": 0.07 } + ] + }, { "id": "mammal_small_leather", "//": "does not drop stomach or other small organs", @@ -512,6 +538,18 @@ { "drop": "raw_leather", "type": "skin", "mass_ratio": 0.01 } ] }, + { + "id": "mutant_human", + "type": "harvest", + "entries": [ + { "drop": "mutant_human_flesh", "type": "flesh", "mass_ratio": 0.2 }, + { "drop": "hstomach", "scale_num": [ 1, 1 ], "max": 1, "type": "offal" }, + { "drop": "mutant_human_fat", "type": "flesh", "mass_ratio": 0.1 }, + { "drop": "bone_human", "type": "bone", "mass_ratio": 0.12 }, + { "drop": "sinew", "type": "bone", "mass_ratio": 0.001 }, + { "drop": "raw_leather", "type": "skin", "mass_ratio": 0.01 } + ] + }, { "id": "gozu", "type": "harvest", diff --git a/data/json/items/comestibles/carnivore.json b/data/json/items/comestibles/carnivore.json index b5f06a10a1e97..8357ca4877217 100644 --- a/data/json/items/comestibles/carnivore.json +++ b/data/json/items/comestibles/carnivore.json @@ -163,6 +163,29 @@ "vitamins": [ [ "mutant_toxin", 2 ] ], "flags": [ "BAD_TASTE" ] }, + { + "id": "mutant_human_flesh", + "copy-from": "mutant_meat", + "type": "COMESTIBLE", + "cooks_like": "mutant_human_cooked", + "name": "mutant humanoid meat", + "description": "Freshly butchered from the body of a heavily mutated creature that was unsettlingly humanoid in appearance. It has odd bits of fur and other tissue lodged in it that clearly don't belong. You'd have to be crazy or starving to eat this.", + "material": "hflesh", + "smoking_result": "human_smoked" + }, + { + "id": "mutant_human_cooked", + "copy-from": "mutant_human_flesh", + "calories": 402, + "type": "COMESTIBLE", + "name": "cooked cretin", + "description": "Cooked meat from a heavily mutated humanoid. Now that the worst bits have been picked out, it's probably digestible, if not very appetizing.", + "proportional": { "price": 1.5 }, + "parasites": 0, + "healthy": 0, + "fun": 0, + "flags": [ "EATEN_HOT", "NUTRIENT_OVERRIDE", "BAD_TASTE" ] + }, { "type": "COMESTIBLE", "comestible_type": "FOOD", @@ -655,6 +678,30 @@ "name": "mutant lard", "description": "A smooth white block of dry-rendered fat sourced from a mutant animal. It will remain edible for a very long time, and can be used as an ingredient in many foods and projects." }, + { + "id": "mutant_human_fat", + "type": "COMESTIBLE", + "copy-from": "mutant_fat", + "name": "chunk of mutant humanoid fat", + "name_plural": "chunks of mutant humanoid fat", + "description": "Freshly butchered fat from a heavily mutated humanoid.", + "material": "hflesh" + }, + { + "type": "COMESTIBLE", + "id": "mutant_human_tallow", + "name": "mutant humanoid tallow", + "copy-from": "mutant_tallow", + "description": "A smooth white block of cleaned and rendered fat sourced from a mutant humanoid. It won't rot for a very long time, and can be used as an ingredient in many foods and projects.", + "material": "hflesh" + }, + { + "type": "COMESTIBLE", + "id": "mutant_human_lard", + "name": "mutant humanoid lard", + "copy-from": "mutant_human_tallow", + "description": "A smooth white block of dry-rendered fat sourced from a mutant humanoid. It won't rot for a very long time, and can be used as an ingredient in many foods and projects." + }, { "type": "COMESTIBLE", "id": "meat_tainted", diff --git a/data/json/monsters/monsters.json b/data/json/monsters/monsters.json index f7fcedd8da0c1..12f1f60211a71 100644 --- a/data/json/monsters/monsters.json +++ b/data/json/monsters/monsters.json @@ -793,7 +793,7 @@ "melee_dice_sides": 6, "melee_cut": 0, "dodge": 3, - "harvest": "human", + "harvest": "mutant_human", "path_settings": { "max_dist": 10 }, "special_attacks": [ [ "scratch", 15 ] ], "death_drops": { @@ -2363,7 +2363,7 @@ "melee_dice_sides": 4, "melee_cut": 0, "dodge": 5, - "harvest": "human", + "harvest": "mutant_human", "death_drops": { "subtype": "collection", "groups": [ [ "subway", 40 ], [ "sewer", 20 ], [ "trash", 5 ], [ "bedroom", 1 ], [ "dresser", 5 ], [ "ammo", 18 ] ] diff --git a/data/json/monsters/mutant.json b/data/json/monsters/mutant.json index eb224059b0555..0390c6f8c28ea 100644 --- a/data/json/monsters/mutant.json +++ b/data/json/monsters/mutant.json @@ -24,7 +24,7 @@ "armor_cut": 5, "vision_day": 25, "vision_night": 5, - "harvest": "mammal_fur", + "harvest": "human_fur", "special_attacks": [ [ "PARROT", 80 ], { @@ -73,7 +73,7 @@ "armor_bash": 7, "armor_cut": 7, "vision_night": 15, - "harvest": "mammal_large_fur", + "harvest": "human_large_fur", "special_attacks": [ [ "PARROT", 80 ], [ "SMASH", 20 ], diff --git a/data/json/recipes/food/dry.json b/data/json/recipes/food/dry.json index d46f89d575e45..ef158c8d40079 100644 --- a/data/json/recipes/food/dry.json +++ b/data/json/recipes/food/dry.json @@ -120,7 +120,7 @@ "batch_time_factors": [ 67, 5 ], "book_learn": [ [ "cookbook_human", 4 ] ], "tools": [ [ [ "dehydrator", 25 ], [ "char_smoker", 25 ] ] ], - "components": [ [ [ "human_flesh", 1 ] ] ] + "components": [ [ [ "human_meat", 1, "LIST" ] ] ] }, { "result": "dry_hflesh", @@ -134,7 +134,7 @@ "batch_time_factors": [ 67, 5 ], "book_learn": [ [ "cookbook_human", 4 ] ], "tools": [ [ [ "dehydrator", 25 ], [ "char_smoker", 25 ] ], [ [ "surface_heat", 5, "LIST" ] ] ], - "components": [ [ [ "human_flesh", 1 ] ] ] + "components": [ [ [ "human_meat", 1, "LIST" ] ] ] }, { "type": "recipe", diff --git a/data/json/recipes/food/pasta.json b/data/json/recipes/food/pasta.json index ae39d95727cf4..4599663dbffb9 100644 --- a/data/json/recipes/food/pasta.json +++ b/data/json/recipes/food/pasta.json @@ -108,7 +108,7 @@ [ "wild_herbs", 10 ] ], [ [ "cheese", 1 ], [ "cheese_hard", 1 ], [ "can_cheese", 1 ] ], - [ [ "human_flesh", 1 ], [ "human_canned", 1 ], [ "rehydrated_hflesh", 1 ], [ "dry_hflesh", 1 ] ] + [ [ "human_meat", 1, "LIST" ], [ "human_canned", 1 ], [ "rehydrated_hflesh", 1 ], [ "dry_hflesh", 1 ] ] ] }, { @@ -134,7 +134,7 @@ [ "can_tomato", 1 ], [ "wild_herbs", 10 ] ], - [ [ "human_flesh", 1 ], [ "human_canned", 1 ], [ "rehydrated_hflesh", 1 ], [ "dry_hflesh", 1 ] ] + [ [ "human_meat", 1, "LIST" ], [ "human_canned", 1 ], [ "rehydrated_hflesh", 1 ], [ "dry_hflesh", 1 ] ] ] }, { @@ -260,7 +260,7 @@ "tools": [ [ [ "surface_heat", 4, "LIST" ] ] ], "components": [ [ [ "spaghetti_raw", 1 ], [ "macaroni_raw", 1 ], [ "noodles_fast", 1 ] ], - [ [ "human_flesh", 1 ], [ "dry_hflesh", 1 ], [ "rehydrated_hflesh", 1 ] ], + [ [ "human_meat", 1, "LIST" ], [ "dry_hflesh", 1 ], [ "rehydrated_hflesh", 1 ] ], [ [ "cheese", 1 ], [ "cheese_hard", 1 ], [ "can_cheese", 1 ] ], [ [ "water", 1 ], [ "water_clean", 1 ] ] ] diff --git a/data/json/recipes/recipe_food.json b/data/json/recipes/recipe_food.json index 941f4ac165432..3401a2e04e1ec 100644 --- a/data/json/recipes/recipe_food.json +++ b/data/json/recipes/recipe_food.json @@ -135,6 +135,12 @@ "copy-from": "meat_scrap_cooked", "components": [ [ [ "mutant_meat_scrap", 1 ] ] ] }, + { + "type": "recipe", + "result": "mutant_human_cooked", + "copy-from": "meat_cooked", + "components": [ [ [ "mutant_human_flesh", 1 ] ] ] + }, { "result": "offal_canned", "type": "recipe", @@ -314,6 +320,22 @@ "tools": [ [ [ "surface_heat", 7, "LIST" ] ] ], "components": [ [ [ "mutant_fat", 2 ] ] ] }, + { + "type": "recipe", + "result": "mutant_human_tallow", + "copy-from": "tallow", + "qualities": [ { "id": "CUT", "level": 1 }, { "id": "COOK", "level": 2 } ], + "tools": [ [ [ "surface_heat", 7, "LIST" ] ] ], + "components": [ [ [ "mutant_human_fat", 3 ] ], [ [ "water", 1 ], [ "water_clean", 1 ] ] ] + }, + { + "type": "recipe", + "result": "mutant_human_lard", + "copy-from": "lard", + "qualities": [ { "id": "CUT", "level": 1 }, { "id": "COOK", "level": 2 } ], + "tools": [ [ [ "surface_heat", 7, "LIST" ] ] ], + "components": [ [ [ "mutant_human_fat", 2 ] ] ] + }, { "type": "recipe", "result": "cooking_oil", @@ -883,7 +905,7 @@ "qualities": [ { "id": "CUT", "level": 1 }, { "id": "COOK", "level": 1 } ], "tools": [ [ [ "char_smoker", 5 ] ] ], "components": [ - [ [ "human_flesh", 1 ] ], + [ [ "human_meat", 1, "LIST" ] ], [ [ "salt", 2 ], [ "soysauce", 1 ], [ "seasoning_italian", 2 ], [ "wild_herbs", 2 ], [ "seasoning_salt", 2 ] ] ] }, @@ -941,7 +963,7 @@ "batch_time_factors": [ 83, 3 ], "qualities": [ { "id": "COOK", "level": 1 } ], "tools": [ [ [ "char_smoker", 15 ] ] ], - "components": [ [ [ "human_flesh", 1 ] ] ] + "components": [ [ [ "human_meat", 1, "LIST" ] ] ] }, { "type": "recipe", @@ -957,7 +979,7 @@ "qualities": [ { "id": "CUT", "level": 1 }, { "id": "COOK", "level": 1 } ], "tools": [ [ [ "char_smoker", 10 ] ] ], "components": [ - [ [ "human_flesh", 1 ], [ "rehydrated_hflesh", 1 ] ], + [ [ "human_meat", 1, "LIST" ], [ "rehydrated_hflesh", 1 ] ], [ [ "edible_fat", 1, "LIST" ], [ "edible_tallow_lard", 2, "LIST" ] ], [ [ "salt", 4 ], @@ -1435,7 +1457,7 @@ "book_learn": [ [ "cookbook_human", 0 ] ], "qualities": [ { "id": "CUT", "level": 1 }, { "id": "COOK", "level": 2 } ], "tools": [ [ [ "surface_heat", 3, "LIST" ] ] ], - "components": [ [ [ "human_flesh", 1 ], [ "dry_hflesh", 1 ], [ "rehydrated_hflesh", 1 ] ], [ [ "nachos", 3 ] ] ] + "components": [ [ [ "human_meat", 1, "LIST" ], [ "dry_hflesh", 1 ], [ "rehydrated_hflesh", 1 ] ], [ [ "nachos", 3 ] ] ] }, { "type": "recipe", @@ -1449,7 +1471,7 @@ "qualities": [ { "id": "CUT", "level": 1 }, { "id": "COOK", "level": 2 } ], "tools": [ [ [ "surface_heat", 3, "LIST" ] ] ], "components": [ - [ [ "human_flesh", 1 ], [ "dry_hflesh", 1 ], [ "rehydrated_hflesh", 1 ] ], + [ [ "human_meat", 1, "LIST" ], [ "dry_hflesh", 1 ], [ "rehydrated_hflesh", 1 ] ], [ [ "cheese", 1 ], [ "cheese_hard", 1 ], [ "can_cheese", 1 ] ], [ [ "nachos", 3 ] ] ] @@ -2081,7 +2103,7 @@ "tools": [ [ [ "surface_heat", 7, "LIST" ] ] ], "components": [ [ [ "broth_bone", 1 ], [ "broth_human", 1 ] ], - [ [ "human_flesh", 1 ], [ "human_cooked", 1 ] ], + [ [ "human_meat", 1, "LIST" ], [ "human_meat_cooked", 1, "LIST" ] ], [ [ "water_clean", 1 ], [ "water", 1 ] ] ] }, @@ -2156,7 +2178,7 @@ [ "pepper", 2 ], [ "chem_saltpetre", 1 ] ], - [ [ "human_flesh", 1 ] ] + [ [ "human_meat", 1, "LIST" ] ] ] }, { @@ -2652,7 +2674,7 @@ [ "beans_cooked", 1 ], [ "acorns_cooked", 1 ] ], - [ [ "dry_hflesh", 1 ], [ "rehydrated_hflesh", 1 ], [ "human_flesh", 1 ] ] + [ [ "dry_hflesh", 1 ], [ "rehydrated_hflesh", 1 ], [ "human_meat", 1, "LIST" ] ] ] }, { @@ -4027,7 +4049,7 @@ "tools": [ [ [ "surface_heat", 6, "LIST" ] ] ], "components": [ [ [ "flour", 30 ] ], - [ [ "human_flesh", 1 ], [ "rehydrated_hflesh", 2 ], [ "dry_hflesh", 1 ] ], + [ [ "human_meat", 1, "LIST" ], [ "rehydrated_hflesh", 2 ], [ "dry_hflesh", 1 ] ], [ [ "water", 1 ], [ "water_clean", 1 ] ] ] }, @@ -4175,7 +4197,7 @@ [ "dry_veggy", 2 ] ], [ [ "tomato", 1 ], [ "irradiated_tomato", 1 ], [ "can_tomato", 1 ] ], - [ [ "human_flesh", 1 ], [ "dry_hflesh", 1 ], [ "rehydrated_hflesh", 1 ], [ "human_canned", 2 ] ], + [ [ "human_meat", 1, "LIST" ], [ "dry_hflesh", 1 ], [ "rehydrated_hflesh", 1 ], [ "human_canned", 2 ] ], [ [ "can_beans", 1 ], [ "raw_beans", 1 ], [ "dry_beans", 1 ] ], [ [ "sauce_red", 1 ], [ "chilly-p", 2 ], [ "chili_pepper", 1 ] ] ] @@ -4299,7 +4321,7 @@ "components": [ [ [ "flour", 30 ] ], [ - [ "human_flesh", 2 ], + [ "human_meat", 2, "LIST" ], [ "human_canned", 2 ], [ "hflesh_salted", 2 ], [ "rehydrated_hflesh", 2 ], @@ -4477,7 +4499,7 @@ "batch_time_factors": [ 83, 5 ], "qualities": [ { "id": "CUT", "level": 1 }, { "id": "COOK", "level": 3 } ], "tools": [ [ [ "surface_heat", 100, "LIST" ] ], [ [ "pot_canning", -1 ] ] ], - "components": [ [ [ "water", 11 ], [ "water_clean", 11 ] ], [ [ "jar_glass", 1 ] ], [ [ "human_flesh", 2 ] ] ] + "components": [ [ [ "water", 11 ], [ "water_clean", 11 ] ], [ [ "jar_glass", 1 ] ], [ [ "human_meat", 2, "LIST" ] ] ] }, { "type": "recipe", @@ -4786,7 +4808,7 @@ [ "beans_cooked", 2 ], [ "acorns_cooked", 2 ] ], - [ [ "dry_hflesh", 2 ], [ "rehydrated_hflesh", 2 ], [ "human_flesh", 2 ] ] + [ [ "dry_hflesh", 2 ], [ "rehydrated_hflesh", 2 ], [ "human_meat", 2, "LIST" ] ] ] }, { @@ -4928,7 +4950,7 @@ "components": [ [ [ "water", 1 ], [ "water_clean", 1 ] ], [ [ "bag_plastic", 1 ] ], - [ [ "human_flesh", 1 ] ], + [ [ "human_meat", 1, "LIST" ] ], [ [ "salt_water", 1 ], [ "saline", 1 ], [ "salt", 2 ], [ "chem_saltpetre", 1 ] ] ] }, @@ -5313,7 +5335,7 @@ [ "human_canned", 1 ], [ "hflesh_aspic", 1 ], [ "human_smoked", 1 ], - [ "human_cooked", 1 ], + [ "human_meat_cooked", 1, "LIST" ], [ "hfleshbologna", 2 ], [ "rehydrated_hflesh", 1 ], [ "human_pickled", 1 ], @@ -5459,7 +5481,7 @@ "qualities": [ { "id": "CUT", "level": 1 }, { "id": "COOK", "level": 2 } ], "tools": [ [ [ "surface_heat", 10, "LIST" ] ] ], "components": [ - [ [ "human_flesh", 1 ] ], + [ [ "human_meat", 1, "LIST" ] ], [ [ "flatbread", 2 ], [ "bread", 2 ], [ "cornbread", 2 ], [ "wastebread", 2 ], [ "sourdough_bread", 2 ] ], [ [ "cheese", 1 ], [ "cheese_hard", 1 ], [ "can_cheese", 1 ] ], [ @@ -5550,7 +5572,7 @@ "qualities": [ { "id": "CUT", "level": 1 }, { "id": "COOK", "level": 2 } ], "tools": [ [ [ "surface_heat", 10, "LIST" ] ] ], "components": [ - [ [ "human_flesh", 1 ], [ "dry_hflesh", 1 ], [ "rehydrated_hflesh", 1 ], [ "human_canned", 1 ] ], + [ [ "human_meat", 1, "LIST" ], [ "dry_hflesh", 1 ], [ "rehydrated_hflesh", 1 ], [ "human_canned", 1 ] ], [ [ "tortilla_corn", 3 ] ], [ [ "salt", 1 ], [ "seasoning_salt", 1 ] ] ] @@ -5660,7 +5682,7 @@ [ "mannwurst", 1 ], [ "mannwurst_cooked", 1 ], [ "mann_bratwurst", 1 ], - [ "human_flesh", 1 ], + [ "human_meat", 1, "LIST" ], [ "rehydrated_hflesh", 1 ], [ "dry_hflesh", 1 ], [ "human_canned", 1 ] @@ -5749,7 +5771,7 @@ "qualities": [ { "id": "CUT", "level": 1 }, { "id": "COOK", "level": 2 } ], "tools": [ [ [ "surface_heat", 10, "LIST" ] ] ], "components": [ - [ [ "human_flesh", 1 ] ], + [ [ "human_meat", 1, "LIST" ] ], [ [ "flatbread", 2 ], [ "bread", 2 ], [ "cornbread", 2 ], [ "wastebread", 2 ], [ "sourdough_bread", 2 ] ], [ [ "pickle", 1 ], @@ -5822,7 +5844,7 @@ "components": [ [ [ "flatbread", 2 ], [ "bread", 2 ], [ "cornbread", 2 ], [ "wastebread", 2 ], [ "sourdough_bread", 2 ] ], [ [ "sauce_red", 2 ], [ "irradiated_tomato", 1 ], [ "can_tomato", 1 ], [ "tomato", 1 ] ], - [ [ "human_flesh", 1 ], [ "dry_hflesh", 1 ], [ "rehydrated_hflesh", 1 ] ] + [ [ "human_meat", 1, "LIST" ], [ "dry_hflesh", 1 ], [ "rehydrated_hflesh", 1 ] ] ] }, { @@ -5905,7 +5927,7 @@ "qualities": [ { "id": "CUT", "level": 1 } ], "components": [ [ [ "flatbread", 2 ], [ "bread", 2 ], [ "cornbread", 2 ], [ "wastebread", 2 ], [ "sourdough_bread", 2 ] ], - [ [ "human_cooked", 1 ], [ "hfleshbologna", 5 ] ] + [ [ "human_meat_cooked", 1, "LIST" ], [ "hfleshbologna", 5 ] ] ] }, { @@ -6142,7 +6164,7 @@ "components": [ [ [ "water", 1 ], [ "water_clean", 1 ], [ "salt_water", 1 ], [ "saline", 5 ] ], [ [ "jar_glass", 1 ] ], - [ [ "human_flesh", 1 ] ], + [ [ "human_meat", 1, "LIST" ] ], [ [ "vinegar", 1 ] ] ] }, @@ -6347,7 +6369,13 @@ "book_learn": [ [ "recipe_creepy", 5 ], [ "recipe_serum", 6 ] ], "qualities": [ { "id": "CONTAIN", "level": 1 }, { "id": "CUT", "level": 1 } ], "components": [ - [ [ "meat", 1 ], [ "mutant_meat", 1 ], [ "human_flesh", 1 ], [ "rehydrated_meat", 1 ], [ "rehydrated_hflesh", 1 ] ], + [ + [ "meat", 1 ], + [ "mutant_meat", 1 ], + [ "human_meat", 1, "LIST" ], + [ "rehydrated_meat", 1 ], + [ "rehydrated_hflesh", 1 ] + ], [ [ "slime_scrap", 2 ] ], [ [ "water", 1 ] ] ] @@ -6464,7 +6492,7 @@ [ [ "canister_empty", 1 ], [ "can_food_unsealed", 1 ] ], [ [ "scrap", 1 ] ], [ [ "water", 1 ], [ "water_clean", 1 ] ], - [ [ "human_flesh", 1 ] ] + [ [ "human_meat", 1, "LIST" ] ] ] }, { @@ -6770,7 +6798,7 @@ [ "beans_cooked", 1 ], [ "acorns_cooked", 1 ] ], - [ [ "dry_hflesh", 1 ], [ "rehydrated_hflesh", 1 ], [ "human_flesh", 1 ] ] + [ [ "dry_hflesh", 1 ], [ "rehydrated_hflesh", 1 ], [ "human_meat", 1, "LIST" ] ] ] }, { @@ -7290,7 +7318,7 @@ [ [ "hstomach", 1 ] ], [ [ "oatmeal", 2 ], [ "buckwheat", 1 ] ], [ - [ "human_flesh", 1 ], + [ "human_meat", 1, "LIST" ], [ "rehydrated_hflesh", 1 ], [ "dry_hflesh", 1 ], [ "human_canned", 1 ], @@ -8099,7 +8127,7 @@ "components": [ [ [ "water", 6 ], [ "water_clean", 6 ], [ "salt_water", 6 ], [ "saline", 30 ] ], [ [ "jar_3l_glass", 1 ] ], - [ [ "human_flesh", 12 ] ], + [ [ "human_meat", 12, "LIST" ] ], [ [ "vinegar", 6 ] ] ] }, @@ -8431,7 +8459,7 @@ [ "beans_cooked", 12 ], [ "acorns_cooked", 12 ] ], - [ [ "dry_hflesh", 12 ], [ "rehydrated_hflesh", 12 ], [ "human_flesh", 12 ] ] + [ [ "dry_hflesh", 12 ], [ "rehydrated_hflesh", 12 ], [ "human_meat", 12, "LIST" ] ] ] }, { diff --git a/data/json/requirements/cooking_components.json b/data/json/requirements/cooking_components.json index d6da298304434..c3e241c96bd9f 100644 --- a/data/json/requirements/cooking_components.json +++ b/data/json/requirements/cooking_components.json @@ -179,6 +179,18 @@ ] ] }, + { + "id": "human_meat", + "type": "requirement", + "//": "Raw meat that non-cannibals would be unhappy eating.", + "components": [ [ [ "human_flesh", 1 ], [ "mutant_human_flesh", 1 ] ] ] + }, + { + "id": "human_meat_cooked", + "type": "requirement", + "//": "Cooked meat that non-cannibals would be unhappy eating.", + "components": [ [ [ "human_cooked", 1 ], [ "mutant_human_cooked", 1 ] ] ] + }, { "id": "any_fat", "type": "requirement", From 30468cbae01bc5df908b9cc02ceddedc1ae1bb9e Mon Sep 17 00:00:00 2001 From: Maleclypse <54345792+Maleclypse@users.noreply.github.com> Date: Mon, 4 Nov 2019 09:39:41 -0500 Subject: [PATCH 9/9] Modular saltworks (#34136) * WIP Saltworks Creating Modular basecamp Saltworks with a Brewery. Still needs recipes for follower missions. Still needs additional building materials versions but trying to get the camp site to build. * Update data/json/recipes/basecamps/recipe_modular_saltworks_log.json Co-Authored-By: ZhilkinSerg * Update recipe_modular_saltworks_log.json * Update data/json/mapgen/basecamps/modular_saltworks_log.json Co-Authored-By: ZhilkinSerg * Update recipe_modular_saltworks_log.json * Update recipe_modular_saltworks_log.json * Update recipe_modular_saltworks_log.json * Update modular_saltworks_log.json * Update recipe_modular_saltworks_log.json * Update recipe_modular_saltworks_log.json * Update modular_saltworks_log.json * Additional Materials added other material's for buildings * added recipes to basecamps * Create recipe_modular_saltworks_stone.json * Update modular_saltworks_wad.json * Update recipe_modular_saltworks_log.json * Update recipe_modular_saltworks_wad.json * updates and corrections * Update recipe_modular_saltworks_wad.json * Update recipe_modular_saltworks_wood.json * Update modular_saltworks_wad.json * fixes and removing excess pallettes * fbml to fmbs * Update recipe_groups.json * Update recipe_modular_saltworks_log.json * Update recipe_modular_saltworks_log.json * Update recipe_modular_saltworks_log.json * Update recipe_modular_saltworks_log.json * Update recipe_modular_saltworks_log.json * removing { on line 64 of each json * Update recipe_modular_saltworks_stone.json * Linting and repair * Update modular_saltworks_rock.json * fbms_0 to fbmsw_0 * Update recipe_modular_saltworks_wad.json * fixed syntax and references * Update recipe_modular_saltworks_stone.json * Update overmap_terrain_faction_base.json * Update modular_saltworks_log.json * Update faction_buildings.json * Update recipe_modular_saltworks_wad.json * Update recipe_modular_saltworks_wood.json * replace extraneous # * fbms to fbmsw Also created saltworks folder for recipes * add recipe descriptor * named upgrades appropriately in blueprint provides requires excludes * remove excess th's fixed faction owner * Update faction_buildings.json * limiting upgrade options Attempting to make it so it doesn't ask me if I want to replace with other designs * Lintin new excludes * changed west to southwest See if this fixes the ability to upgrade to level 2 brewery * Cursetwist fixes to Saltworks * It's the final linting...doo da doot doot --- .../modular_saltworks_common.json | 73 ++++++++++++ .../modular_saltworks_log.json | 108 ++++++++++++++++++ .../modular_saltworks_metal.json | 102 +++++++++++++++++ .../modular_saltworks_rock.json | 102 +++++++++++++++++ .../modular_saltworks_wad.json | 89 +++++++++++++++ .../modular_saltworks_wood.json | 102 +++++++++++++++++ data/json/mapgen/faction_buildings.json | 37 ++++++ .../overmap_terrain_faction_base.json | 9 ++ .../json/recipes/basecamps/recipe_groups.json | 1 + .../recipe_modular_saltworks_common.json | 47 ++++++++ .../recipe_modular_saltworks_log.json | 47 ++++++++ .../recipe_modular_saltworks_metal.json | 47 ++++++++ .../recipe_modular_saltworks_stone.json | 47 ++++++++ .../recipe_modular_saltworks_wad.json | 47 ++++++++ .../recipe_modular_saltworks_wood.json | 47 ++++++++ 15 files changed, 905 insertions(+) create mode 100644 data/json/mapgen/basecamps/modular_saltworks/modular_saltworks_common.json create mode 100644 data/json/mapgen/basecamps/modular_saltworks/modular_saltworks_log.json create mode 100644 data/json/mapgen/basecamps/modular_saltworks/modular_saltworks_metal.json create mode 100644 data/json/mapgen/basecamps/modular_saltworks/modular_saltworks_rock.json create mode 100644 data/json/mapgen/basecamps/modular_saltworks/modular_saltworks_wad.json create mode 100644 data/json/mapgen/basecamps/modular_saltworks/modular_saltworks_wood.json create mode 100644 data/json/recipes/basecamps/recipe_modular_saltworks/recipe_modular_saltworks_common.json create mode 100644 data/json/recipes/basecamps/recipe_modular_saltworks/recipe_modular_saltworks_log.json create mode 100644 data/json/recipes/basecamps/recipe_modular_saltworks/recipe_modular_saltworks_metal.json create mode 100644 data/json/recipes/basecamps/recipe_modular_saltworks/recipe_modular_saltworks_stone.json create mode 100644 data/json/recipes/basecamps/recipe_modular_saltworks/recipe_modular_saltworks_wad.json create mode 100644 data/json/recipes/basecamps/recipe_modular_saltworks/recipe_modular_saltworks_wood.json diff --git a/data/json/mapgen/basecamps/modular_saltworks/modular_saltworks_common.json b/data/json/mapgen/basecamps/modular_saltworks/modular_saltworks_common.json new file mode 100644 index 0000000000000..4f1c2300cf5c4 --- /dev/null +++ b/data/json/mapgen/basecamps/modular_saltworks/modular_saltworks_common.json @@ -0,0 +1,73 @@ +[ + { + "type": "mapgen", + "method": "json", + "nested_mapgen_id": "fbmsw_0", + "object": { + "mapgensize": [ 6, 6 ], + "rows": [ + " ", + " ", + " ", + " ", + " ", + " " + ], + "palettes": [ "fbmsw_wood_palette" ] + } + }, + { + "type": "mapgen", + "update_mapgen_id": "faction_base_saltworks_0", + "method": "json", + "object": { "place_nested": [ { "chunks": [ "fbmsw_0" ], "x": 15, "y": 3 } ] } + }, + { + "type": "mapgen", + "method": "json", + "nested_mapgen_id": "fbmsw_brewery1_still", + "object": { + "mapgensize": [ 7, 7 ], + "rows": [ + " ", + " ", + " ", + " ^ ", + " # ", + " s tr ", + " " + ], + "palettes": [ "fbmsw_wad_palette" ] + } + }, + { + "type": "mapgen", + "update_mapgen_id": "fbmsw_brewery1_southwest", + "method": "json", + "object": { "place_nested": [ { "chunks": [ "fbmsw_brewery1_still" ], "x": 3, "y": 14 } ] } + }, + { + "type": "mapgen", + "method": "json", + "nested_mapgen_id": "fbmsw_brewery2_kegs", + "object": { + "mapgensize": [ 7, 7 ], + "rows": [ + " ", + " H r ", + " ", + " ", + " H ", + " H ", + " " + ], + "palettes": [ "fbmsw_wad_palette" ] + } + }, + { + "type": "mapgen", + "update_mapgen_id": "fbmsw_brewery2_southwest", + "method": "json", + "object": { "place_nested": [ { "chunks": [ "fbmsw_brewery2_kegs" ], "x": 3, "y": 14 } ] } + } +] diff --git a/data/json/mapgen/basecamps/modular_saltworks/modular_saltworks_log.json b/data/json/mapgen/basecamps/modular_saltworks/modular_saltworks_log.json new file mode 100644 index 0000000000000..4d9b0fafeb6b8 --- /dev/null +++ b/data/json/mapgen/basecamps/modular_saltworks/modular_saltworks_log.json @@ -0,0 +1,108 @@ +[ + { + "type": "palette", + "id": "fbmsw_log_palette", + "terrain": { + ".": "t_floor_primitive", + "b": "t_floor_primitive", + "r": "t_floor_primitive", + "t": "t_floor_primitive", + "#": "t_floor_primitive", + "H": "t_floor_primitive", + "^": "t_floor_primitive", + "s": "t_floor_primitive", + "~": "t_swater_sh", + "o": "t_window_no_curtains", + "w": "t_wall_log", + "+": "t_door_c" + }, + "furniture": { + "b": "f_bench", + "r": "f_rack", + "t": "f_table", + "#": "f_stool", + "c": "f_counter", + "H": "f_wood_keg", + "O": "f_fvat_empty", + "^": "f_still", + "s": "f_woodstove" + } + }, + { + "type": "mapgen", + "update_mapgen_id": "faction_base_saltworks_0", + "method": "json", + "object": { "place_nested": [ { "chunks": [ "fbmsw_0" ], "x": 15, "y": 3 } ] } + }, + { + "type": "mapgen", + "method": "json", + "nested_mapgen_id": "fbmsw_saltpan_log", + "object": { + "mapgensize": [ 7, 7 ], + "rows": [ + "wwwowww", + "w.....w", + "w.c.c.w", + "o.~t~.o", + "w.~#~.w", + "w.....w", + "www+www" + ], + "palettes": [ "fbmsw_log_palette" ] + } + }, + { + "type": "mapgen", + "update_mapgen_id": "fbmsw_saltpan_log_northeast", + "method": "json", + "object": { "place_nested": [ { "chunks": [ "fbmsw_saltpan_log" ], "x": 14, "y": 3 } ] } + }, + { + "type": "mapgen", + "method": "json", + "nested_mapgen_id": "fbmsw_shack_log", + "object": { + "mapgensize": [ 6, 6 ], + "rows": [ + " ", + " woww", + " wwrrw", + " +..to", + " orrrw", + " wwoww" + ], + "palettes": [ "fbmsw_log_palette" ] + } + }, + { + "type": "mapgen", + "update_mapgen_id": "fbmsw_shack_log_southeast", + "method": "json", + "object": { "place_nested": [ { "chunks": [ "fbmsw_shack_log" ], "x": 15, "y": 15 } ] } + }, + { + "type": "mapgen", + "method": "json", + "nested_mapgen_id": "fbmsw_brewery0_log", + "object": { + "mapgensize": [ 7, 7 ], + "rows": [ + "wwwwwww", + "w.rrr.w", + "oH....+", + "wO....w", + "o.....w", + "w.....w", + "wwwwwww" + ], + "palettes": [ "fbmsw_log_palette" ] + } + }, + { + "type": "mapgen", + "update_mapgen_id": "fbmsw_brewery0_log_southwest", + "method": "json", + "object": { "place_nested": [ { "chunks": [ "fbmsw_brewery0_log" ], "x": 3, "y": 14 } ] } + } +] diff --git a/data/json/mapgen/basecamps/modular_saltworks/modular_saltworks_metal.json b/data/json/mapgen/basecamps/modular_saltworks/modular_saltworks_metal.json new file mode 100644 index 0000000000000..ac5c4d2c2c288 --- /dev/null +++ b/data/json/mapgen/basecamps/modular_saltworks/modular_saltworks_metal.json @@ -0,0 +1,102 @@ +[ + { + "type": "palette", + "id": "fbmsw_metal_palette", + "terrain": { + ".": "t_metal_floor", + "b": "t_metal_floor", + "r": "t_metal_floor", + "t": "t_metal_floor", + "#": "t_metal_floor", + "H": "t_metal_floor", + "^": "t_metal_floor", + "s": "t_metal_floor", + "~": "t_swater_sh", + "o": "t_window_no_curtains", + "w": "t_scrap_wall", + "+": "t_door_c" + }, + "furniture": { + "b": "f_bench", + "r": "f_rack", + "t": "f_table", + "#": "f_stool", + "c": "f_counter", + "H": "f_wood_keg", + "O": "f_fvat_empty", + "^": "f_still", + "s": "f_woodstove" + } + }, + { + "type": "mapgen", + "method": "json", + "nested_mapgen_id": "fbmsw_saltpan_metal", + "object": { + "mapgensize": [ 7, 7 ], + "rows": [ + "wwwowww", + "w.....w", + "w.c.c.w", + "o.~t~.o", + "w.~#~.w", + "w.....w", + "www+www" + ], + "palettes": [ "fbmsw_metal_palette" ] + } + }, + { + "type": "mapgen", + "update_mapgen_id": "fbmsw_saltpan_metal_northeast", + "method": "json", + "object": { "place_nested": [ { "chunks": [ "fbmsw_saltpan_metal" ], "x": 14, "y": 3 } ] } + }, + { + "type": "mapgen", + "method": "json", + "nested_mapgen_id": "fbmsw_shack_metal", + "object": { + "mapgensize": [ 6, 6 ], + "rows": [ + " ", + " woww", + " wwrrw", + " +..to", + " orrrw", + " wwoww" + ], + "palettes": [ "fbmsw_metal_palette" ] + } + }, + { + "type": "mapgen", + "update_mapgen_id": "fbmsw_shack_metal_southeast", + "method": "json", + "object": { "place_nested": [ { "chunks": [ "fbmsw_shack_metal" ], "x": 15, "y": 15 } ] } + }, + { + "type": "mapgen", + "method": "json", + "nested_mapgen_id": "fbmsw_brewery0_metal", + "object": { + "mapgensize": [ 7, 7 ], + "rows": [ + "wwwwwww", + "w.rrr.w", + "oH....+", + "wO....w", + "o.....w", + "w.....w", + "wwwwwww" + ], + "palettes": [ "fbmsw_metal_palette" ] + } + }, + { + "type": "mapgen", + "update_mapgen_id": "fbmsw_brewery0_metal_southwest", + "method": "json", + "object": { "place_nested": [ { "chunks": [ "fbmsw_brewery0_metal" ], "x": 3, "y": 14 } ] } + } +] diff --git a/data/json/mapgen/basecamps/modular_saltworks/modular_saltworks_rock.json b/data/json/mapgen/basecamps/modular_saltworks/modular_saltworks_rock.json new file mode 100644 index 0000000000000..5e418f5a22370 --- /dev/null +++ b/data/json/mapgen/basecamps/modular_saltworks/modular_saltworks_rock.json @@ -0,0 +1,102 @@ +[ + { + "type": "palette", + "id": "fbmsw_rock_palette", + "terrain": { + ".": "t_rock_floor", + "b": "t_rock_floor", + "r": "t_rock_floor", + "t": "t_rock_floor", + "#": "t_rock_floor", + "H": "t_rock_floor", + "^": "t_rock_floor", + "s": "t_rock_floor", + "~": "t_swater_sh", + "o": "t_window_no_curtains", + "w": "t_rock_wall", + "+": "t_door_c" + }, + "furniture": { + "b": "f_bench", + "r": "f_rack", + "t": "f_table", + "#": "f_stool", + "c": "f_counter", + "H": "f_wood_keg", + "O": "f_fvat_empty", + "^": "f_still", + "s": "f_woodstove" + } + }, + { + "type": "mapgen", + "method": "json", + "nested_mapgen_id": "fbmsw_saltpan_rock", + "object": { + "mapgensize": [ 7, 7 ], + "rows": [ + "wwwowww", + "w.....w", + "w.c.c.w", + "o.~t~.o", + "w.~#~.w", + "w.....w", + "www+www" + ], + "palettes": [ "fbmsw_rock_palette" ] + } + }, + { + "type": "mapgen", + "update_mapgen_id": "fbmsw_saltpan_rock_northeast", + "method": "json", + "object": { "place_nested": [ { "chunks": [ "fbmsw_saltpan_rock" ], "x": 14, "y": 3 } ] } + }, + { + "type": "mapgen", + "method": "json", + "nested_mapgen_id": "fbmsw_shack_rock", + "object": { + "mapgensize": [ 6, 6 ], + "rows": [ + " ", + " woww", + " wwrrw", + " +..to", + " orrrw", + " wwoww" + ], + "palettes": [ "fbmsw_rock_palette" ] + } + }, + { + "type": "mapgen", + "update_mapgen_id": "fbmsw_shack_rock_southeast", + "method": "json", + "object": { "place_nested": [ { "chunks": [ "fbmsw_shack_rock" ], "x": 15, "y": 15 } ] } + }, + { + "type": "mapgen", + "method": "json", + "nested_mapgen_id": "fbmsw_brewery0_rock", + "object": { + "mapgensize": [ 7, 7 ], + "rows": [ + "wwwwwww", + "w.rrr.w", + "oH....+", + "wO....w", + "o.....w", + "w.....w", + "wwwwwww" + ], + "palettes": [ "fbmsw_rock_palette" ] + } + }, + { + "type": "mapgen", + "update_mapgen_id": "fbmsw_brewery0_rock_southwest", + "method": "json", + "object": { "place_nested": [ { "chunks": [ "fbmsw_brewery0_rock" ], "x": 3, "y": 14 } ] } + } +] diff --git a/data/json/mapgen/basecamps/modular_saltworks/modular_saltworks_wad.json b/data/json/mapgen/basecamps/modular_saltworks/modular_saltworks_wad.json new file mode 100644 index 0000000000000..43fbdfb7ce1f3 --- /dev/null +++ b/data/json/mapgen/basecamps/modular_saltworks/modular_saltworks_wad.json @@ -0,0 +1,89 @@ +[ + { + "type": "palette", + "id": "fbmsw_wad_palette", + "terrain": { ".": "t_dirtfloor", "~": "t_swater_sh", "o": "t_wall_wattle_half", "w": "t_wall_wattle", "+": "t_door_makeshift_c" }, + "furniture": { + "b": "f_bench", + "r": "f_rack", + "t": "f_table", + "#": "f_stool", + "c": "f_counter", + "H": "f_wood_keg", + "O": "f_fvat_empty", + "^": "f_still", + "s": "f_woodstove" + } + }, + { + "type": "mapgen", + "method": "json", + "nested_mapgen_id": "fbmsw_saltpan_wad", + "object": { + "mapgensize": [ 7, 7 ], + "rows": [ + "wwwowww", + "w.....w", + "w.c.c.w", + "o.~t~.o", + "w.~#~.w", + "w.....w", + "www+www" + ], + "palettes": [ "fbmsw_wad_palette" ] + } + }, + { + "type": "mapgen", + "update_mapgen_id": "fbmsw_saltpan_wad_northeast", + "method": "json", + "object": { "place_nested": [ { "chunks": [ "fbmsw_saltpan_wad" ], "x": 14, "y": 3 } ] } + }, + { + "type": "mapgen", + "method": "json", + "nested_mapgen_id": "fbmsw_shack_wad", + "object": { + "mapgensize": [ 6, 6 ], + "rows": [ + " ", + " woww", + " wwrrw", + " +..to", + " orrrw", + " wwoww" + ], + "palettes": [ "fbmsw_wad_palette" ] + } + }, + { + "type": "mapgen", + "update_mapgen_id": "fbmsw_shack_wad_southeast", + "method": "json", + "object": { "place_nested": [ { "chunks": [ "fbmsw_shack_wad" ], "x": 15, "y": 15 } ] } + }, + { + "type": "mapgen", + "method": "json", + "nested_mapgen_id": "fbmsw_brewery0_wad", + "object": { + "mapgensize": [ 7, 7 ], + "rows": [ + "wwwwwww", + "w.rrr.w", + "oH....+", + "wO....w", + "o.....w", + "w.....w", + "wwwwwww" + ], + "palettes": [ "fbmsw_wad_palette" ] + } + }, + { + "type": "mapgen", + "update_mapgen_id": "fbmsw_brewery0_wad_southwest", + "method": "json", + "object": { "place_nested": [ { "chunks": [ "fbmsw_brewery0_wad" ], "x": 3, "y": 14 } ] } + } +] diff --git a/data/json/mapgen/basecamps/modular_saltworks/modular_saltworks_wood.json b/data/json/mapgen/basecamps/modular_saltworks/modular_saltworks_wood.json new file mode 100644 index 0000000000000..83b9392c33229 --- /dev/null +++ b/data/json/mapgen/basecamps/modular_saltworks/modular_saltworks_wood.json @@ -0,0 +1,102 @@ +[ + { + "type": "palette", + "id": "fbmsw_wood_palette", + "terrain": { + ".": "t_floor", + "b": "t_floor", + "r": "t_floor", + "t": "t_floor", + "#": "t_floor", + "H": "t_floor", + "^": "t_floor", + "s": "t_floor", + "~": "t_swater_sh", + "o": "t_window_no_curtains", + "w": "t_wall_wood", + "+": "t_door_c" + }, + "furniture": { + "b": "f_bench", + "r": "f_rack", + "t": "f_table", + "#": "f_stool", + "c": "f_counter", + "H": "f_wood_keg", + "O": "f_fvat_empty", + "^": "f_still", + "s": "f_woodstove" + } + }, + { + "type": "mapgen", + "method": "json", + "nested_mapgen_id": "fbmsw_saltpan_wood", + "object": { + "mapgensize": [ 7, 7 ], + "rows": [ + "wwwowww", + "w.....w", + "w.c.c.w", + "o.~t~.o", + "w.~#~.w", + "w.....w", + "www+www" + ], + "palettes": [ "fbmsw_wood_palette" ] + } + }, + { + "type": "mapgen", + "update_mapgen_id": "fbmsw_saltpan_wood_northeast", + "method": "json", + "object": { "place_nested": [ { "chunks": [ "fbmsw_saltpan_wood" ], "x": 14, "y": 3 } ] } + }, + { + "type": "mapgen", + "method": "json", + "nested_mapgen_id": "fbmsw_shack_wood", + "object": { + "mapgensize": [ 6, 6 ], + "rows": [ + " ", + " woww", + " wwrrw", + " +..to", + " orrrw", + " wwoww" + ], + "palettes": [ "fbmsw_wood_palette" ] + } + }, + { + "type": "mapgen", + "update_mapgen_id": "fbmsw_shack_wood_southeast", + "method": "json", + "object": { "place_nested": [ { "chunks": [ "fbmsw_shack_wood" ], "x": 15, "y": 15 } ] } + }, + { + "type": "mapgen", + "method": "json", + "nested_mapgen_id": "fbmsw_brewery0_wood", + "object": { + "mapgensize": [ 7, 7 ], + "rows": [ + "wwwwwww", + "w.rrr.w", + "oH....+", + "wO....w", + "o.....w", + "w.....w", + "wwwwwww" + ], + "palettes": [ "fbmsw_wood_palette" ] + } + }, + { + "type": "mapgen", + "update_mapgen_id": "fbmsw_brewery0_wood_southwest", + "method": "json", + "object": { "place_nested": [ { "chunks": [ "fbmsw_brewery0_wood" ], "x": 3, "y": 14 } ] } + } +] diff --git a/data/json/mapgen/faction_buildings.json b/data/json/mapgen/faction_buildings.json index 9efd3ca6e35ee..86ec86ddec864 100644 --- a/data/json/mapgen/faction_buildings.json +++ b/data/json/mapgen/faction_buildings.json @@ -2441,6 +2441,43 @@ "palettes": [ "acidia_camp_palette" ] } }, + { + "type": "mapgen", + "om_terrain": "faction_base_saltworks_0", + "method": "json", + "weight": 250, + "object": { + "faction_owner": [ { "id": "your_followers", "x": [ 0, 23 ], "y": [ 0, 23 ] } ], + "fill_ter": "t_grass", + "rows": [ + ",,,,,,,,,,,,,,,,,,,,,,,,", + ",,,,,,,,,,,,,,,,,,,,,,,,", + ",,,,,,,,,,,,,,,,,,,,,,,,", + ",,,,,,,,,,,,,,,,,,,,,,,,", + ",,,,,,,,,,,,,,,,,,,,,,,,", + ",,,,,,,,,,,,,,,,,,,,,,,,", + ",,,,,,,,,,,,,,,,,,,,,,,,", + ",,,,,,,,,,,,,,,,,,,,,,,,", + ",,,,,,,,,,,,,,,,,,,,,,,,", + ",,,,,,,,,,,,,,,,,,,,,,,,", + ",,,,,,,,,,,,,,,,,,,,,,,,", + ",,,,,,,,,,,,,,,,,,,,,,,,", + ",,,,,,,,,,,,,,,,,,,,,,,,", + ",,,,,,,,,,,,,,,,,,,,,,,,", + ",,,,,,,,,,,,,,,,,,,,,,,,", + ",,,,,,,,,,,,,,,,,,,,,,,,", + ",,,,,,,,,,,,,,,,,,,,,,,,", + ",,,,,,,,,,,,,,,,,,,,,,,,", + ",,,,,,,,,,,,,,,,,,,,,,,,", + ",,,,,,,,,,,,,,,,,,,,,,,,", + ",,,,,,,,,,,,,,,,,,,,,,,,", + ",,,,,,,,,,,,,,,,,,,,,,,,", + ",,,,,,,,,,,,,,,,,,,,,,,,", + ",,,,,,,,,,,,,,,,,,,,,,,," + ], + "palettes": [ "acidia_camp_palette" ] + } + }, { "type": "mapgen", "om_terrain": "faction_base_workshop_0", diff --git a/data/json/overmap/overmap_terrain/overmap_terrain_faction_base.json b/data/json/overmap/overmap_terrain/overmap_terrain_faction_base.json index 4eb7af736282c..201438af15f60 100644 --- a/data/json/overmap/overmap_terrain/overmap_terrain_faction_base.json +++ b/data/json/overmap/overmap_terrain/overmap_terrain_faction_base.json @@ -602,6 +602,15 @@ "see_cost": 5, "flags": [ "NO_ROTATE" ] }, + { + "type": "overmap_terrain", + "id": "faction_base_saltworks_0", + "name": "saltworks survey", + "sym": "+", + "color": "red", + "see_cost": 5, + "flags": [ "NO_ROTATE" ] + }, { "type": "overmap_terrain", "id": "faction_base_canteen_0", diff --git a/data/json/recipes/basecamps/recipe_groups.json b/data/json/recipes/basecamps/recipe_groups.json index 03b6c929953ae..9614d17c0ec6d 100644 --- a/data/json/recipes/basecamps/recipe_groups.json +++ b/data/json/recipes/basecamps/recipe_groups.json @@ -19,6 +19,7 @@ { "id": "faction_base_canteen_0", "description": "Canteen", "om_terrains": [ "field" ] }, { "id": "faction_base_livestock_0", "description": "Livestock Area", "om_terrains": [ "field" ] }, { "id": "faction_base_storehouse_0", "description": "Central Storage Building", "om_terrains": [ "field" ] }, + { "id": "faction_base_saltworks_0", "description": "Saltworks Area", "om_terrains": [ "field" ] }, { "id": "faction_base_workshop_0", "description": "Fabrication Workshop", "om_terrains": [ "field" ] } ] }, diff --git a/data/json/recipes/basecamps/recipe_modular_saltworks/recipe_modular_saltworks_common.json b/data/json/recipes/basecamps/recipe_modular_saltworks/recipe_modular_saltworks_common.json new file mode 100644 index 0000000000000..7378c7ef2613a --- /dev/null +++ b/data/json/recipes/basecamps/recipe_modular_saltworks/recipe_modular_saltworks_common.json @@ -0,0 +1,47 @@ +[ + { + "type": "recipe", + "result": "faction_base_saltworks_0", + "description": "Survey land for a saltworks area.", + "category": "CC_BUILDING", + "subcategory": "CSC_BUILDING_BASES", + "skill_used": "fabrication", + "autolearn": false, + "never_learn": true, + "construction_blueprint": "faction_base_saltworks_0", + "blueprint_name": "Saltworks survey", + "time": "180 m", + "blueprint_requires": [ { "id": "not_an_upgrade" } ], + "blueprint_provides": [ { "id": "fbmsw_0" } ] + }, + { + "type": "recipe", + "result": "faction_base_modular_brewery1_southwest", + "description": "We could uprade the workspace in the brewery to add a still, wood stove and work table.", + "category": "CC_BUILDING", + "subcategory": "CSC_BUILDING_BASES", + "autolearn": false, + "never_learn": true, + "construction_blueprint": "fbmsw_brewery1_southwest", + "blueprint_name": "SW brewery still", + "blueprint_requires": [ { "id": "fbmsw_southwest" } ], + "blueprint_provides": [ { "id": "fbmsw_southwest1_still" } ], + "blueprint_excludes": [ { "id": "fbmsw_southwest1_still" } ], + "blueprint_autocalc": true + }, + { + "type": "recipe", + "result": "faction_base_modular_brewery2_southwest", + "description": "We could use fill out the space with extra kegs and storage racks.", + "category": "CC_BUILDING", + "subcategory": "CSC_BUILDING_BASES", + "autolearn": false, + "never_learn": true, + "construction_blueprint": "fbmsw_brewery2_southwest", + "blueprint_name": "SW brewery kegs", + "blueprint_requires": [ { "id": "fbmsw_southwest1_still" } ], + "blueprint_provides": [ { "id": "fbmsw_southwest2_kegs" } ], + "blueprint_excludes": [ { "id": "fbmsw_southwest2_kegs" } ], + "blueprint_autocalc": true + } +] diff --git a/data/json/recipes/basecamps/recipe_modular_saltworks/recipe_modular_saltworks_log.json b/data/json/recipes/basecamps/recipe_modular_saltworks/recipe_modular_saltworks_log.json new file mode 100644 index 0000000000000..038b236c7d2e3 --- /dev/null +++ b/data/json/recipes/basecamps/recipe_modular_saltworks/recipe_modular_saltworks_log.json @@ -0,0 +1,47 @@ +[ + { + "type": "recipe", + "result": "faction_base_modular_saltpan_log_northeast", + "description": "We could divert saltwater from the swamp nearby to create a steady supply of salt for our needs in a log building.", + "category": "CC_BUILDING", + "subcategory": "CSC_BUILDING_BASES", + "autolearn": false, + "never_learn": true, + "construction_blueprint": "fbmsw_saltpan_log_northeast", + "blueprint_name": "NE log wall saltpan", + "blueprint_requires": [ { "id": "fbmsw_0" } ], + "blueprint_provides": [ { "id": "fbmsw_northeast" } ], + "blueprint_excludes": [ { "id": "fbmsw_northeast" } ], + "blueprint_autocalc": true + }, + { + "type": "recipe", + "result": "faction_base_modular_shack_log_southeast", + "description": "We could use a storage room for chemicals and tools, so build a log shack with a roof on the southeast side of the saltworks field.", + "category": "CC_BUILDING", + "subcategory": "CSC_BUILDING_BASES", + "autolearn": false, + "never_learn": true, + "construction_blueprint": "fbmsw_shack_log_southeast", + "blueprint_name": "SE log wall storage room", + "blueprint_requires": [ { "id": "fbmsw_0" } ], + "blueprint_provides": [ { "id": "fbmsw_southeast" } ], + "blueprint_excludes": [ { "id": "fbmsw_southeast" } ], + "blueprint_autocalc": true + }, + { + "type": "recipe", + "result": "faction_base_modular_brewery0_log_southwest", + "description": "We could take advantage of the the designation of this area to build a log brewery.", + "category": "CC_BUILDING", + "subcategory": "CSC_BUILDING_BASES", + "autolearn": false, + "never_learn": true, + "construction_blueprint": "fbmsw_brewery0_log_southwest", + "blueprint_name": "SW log wall brewery", + "blueprint_requires": [ { "id": "fbmsw_0" } ], + "blueprint_provides": [ { "id": "fbmsw_southwest" }, { "id": "brewery" } ], + "blueprint_excludes": [ { "id": "fbmsw_southwest" } ], + "blueprint_autocalc": true + } +] diff --git a/data/json/recipes/basecamps/recipe_modular_saltworks/recipe_modular_saltworks_metal.json b/data/json/recipes/basecamps/recipe_modular_saltworks/recipe_modular_saltworks_metal.json new file mode 100644 index 0000000000000..5ea0e1d68a8da --- /dev/null +++ b/data/json/recipes/basecamps/recipe_modular_saltworks/recipe_modular_saltworks_metal.json @@ -0,0 +1,47 @@ +[ + { + "type": "recipe", + "result": "faction_base_modular_saltpan_metal_northeast", + "description": "We could divert saltwater from the swamp nearby to create a steady supply of salt for our needs in a metal shed.", + "category": "CC_BUILDING", + "subcategory": "CSC_BUILDING_BASES", + "autolearn": false, + "never_learn": true, + "construction_blueprint": "fbmsw_saltpan_metal_northeast", + "blueprint_name": "NE metal wall saltpan", + "blueprint_requires": [ { "id": "fbmsw_0" } ], + "blueprint_provides": [ { "id": "fbmsw_northeast" } ], + "blueprint_excludes": [ { "id": "fbmsw_northeast" } ], + "blueprint_autocalc": true + }, + { + "type": "recipe", + "result": "faction_base_modular_shack_metal_southeast", + "description": "We could use a storage room for chemicals and tools, so build a metal shack with a roof on the southeast side of the saltworks field.", + "category": "CC_BUILDING", + "subcategory": "CSC_BUILDING_BASES", + "autolearn": false, + "never_learn": true, + "construction_blueprint": "fbmsw_shack_metal_southeast", + "blueprint_name": "SE metal wall storage room", + "blueprint_requires": [ { "id": "fbmsw_0" } ], + "blueprint_provides": [ { "id": "fbmsw_southeast" } ], + "blueprint_excludes": [ { "id": "fbmsw_southeast" } ], + "blueprint_autocalc": true + }, + { + "type": "recipe", + "result": "faction_base_modular_brewery0_metal_southwest", + "description": "We could take advantage of the the designation of this area to build a metal wall brewery.", + "category": "CC_BUILDING", + "subcategory": "CSC_BUILDING_BASES", + "autolearn": false, + "never_learn": true, + "construction_blueprint": "fbmsw_brewery0_metal_southwest", + "blueprint_name": "SW metal wall brewery", + "blueprint_requires": [ { "id": "fbmsw_0" } ], + "blueprint_provides": [ { "id": "fbmsw_southwest" }, { "id": "brewery" } ], + "blueprint_excludes": [ { "id": "fbmsw_southwest" } ], + "blueprint_autocalc": true + } +] diff --git a/data/json/recipes/basecamps/recipe_modular_saltworks/recipe_modular_saltworks_stone.json b/data/json/recipes/basecamps/recipe_modular_saltworks/recipe_modular_saltworks_stone.json new file mode 100644 index 0000000000000..5db58fd5ee3ea --- /dev/null +++ b/data/json/recipes/basecamps/recipe_modular_saltworks/recipe_modular_saltworks_stone.json @@ -0,0 +1,47 @@ +[ + { + "type": "recipe", + "result": "faction_base_modular_saltpan_rock_northeast", + "description": "We could divert saltwater from the swamp nearby to create a steady supply of salt for our needs in a stone building.", + "category": "CC_BUILDING", + "subcategory": "CSC_BUILDING_BASES", + "autolearn": false, + "never_learn": true, + "construction_blueprint": "fbmsw_saltpan_rock_northeast", + "blueprint_name": "NE stone wall saltpan", + "blueprint_requires": [ { "id": "fbmsw_0" } ], + "blueprint_provides": [ { "id": "fbmsw_northeast" }, { "id": "Salt_Pan" } ], + "blueprint_excludes": [ { "id": "fbmsw_northeast" } ], + "blueprint_autocalc": true + }, + { + "type": "recipe", + "result": "faction_base_modular_shack_rock_southeast", + "description": "We could use a storage room for chemicals and tools, so build a stone wall shack with a roof on the southeast side of the saltworks field.", + "category": "CC_BUILDING", + "subcategory": "CSC_BUILDING_BASES", + "autolearn": false, + "never_learn": true, + "construction_blueprint": "fbmsw_shack_rock_southeast", + "blueprint_name": "SE stone wall storage room", + "blueprint_requires": [ { "id": "fbmsw_0" } ], + "blueprint_provides": [ { "id": "fbmsw_southeast" } ], + "blueprint_excludes": [ { "id": "fbmsw_southeast" } ], + "blueprint_autocalc": true + }, + { + "type": "recipe", + "result": "faction_base_modular_brewery0_rock_southwest", + "description": "We could take advantage of the the designation of this area to build a stone brewery.", + "category": "CC_BUILDING", + "subcategory": "CSC_BUILDING_BASES", + "autolearn": false, + "never_learn": true, + "construction_blueprint": "fbmsw_brewery0_rock_southwest", + "blueprint_name": "SW stone wall brewery", + "blueprint_requires": [ { "id": "fbmsw_0" } ], + "blueprint_provides": [ { "id": "fbmsw_southwest" }, { "id": "brewery" } ], + "blueprint_excludes": [ { "id": "fbmsw_southwest" } ], + "blueprint_autocalc": true + } +] diff --git a/data/json/recipes/basecamps/recipe_modular_saltworks/recipe_modular_saltworks_wad.json b/data/json/recipes/basecamps/recipe_modular_saltworks/recipe_modular_saltworks_wad.json new file mode 100644 index 0000000000000..03ca859d26b4a --- /dev/null +++ b/data/json/recipes/basecamps/recipe_modular_saltworks/recipe_modular_saltworks_wad.json @@ -0,0 +1,47 @@ +[ + { + "type": "recipe", + "result": "faction_base_modular_saltpan_wad_northeast", + "description": "We could divert saltwater from the swamp nearby to create a steady supply of salt for our needs in an adobe hut.", + "category": "CC_BUILDING", + "subcategory": "CSC_BUILDING_BASES", + "autolearn": false, + "never_learn": true, + "construction_blueprint": "fbmsw_saltpan_wad_northeast", + "blueprint_name": "NE wattle and daub saltpan", + "blueprint_requires": [ { "id": "fbmsw_0" } ], + "blueprint_provides": [ { "id": "fbmsw_northeast" }, { "id": "Salt_Pan" } ], + "blueprint_excludes": [ { "id": "fbmsw_northeast" } ], + "blueprint_autocalc": true + }, + { + "type": "recipe", + "result": "faction_base_modular_shack_wad_southeast", + "description": "We could use a storage room for chemicals and tools, so build an adobe shack with a roof on the southeast side of the saltworks field.", + "category": "CC_BUILDING", + "subcategory": "CSC_BUILDING_BASES", + "autolearn": false, + "never_learn": true, + "construction_blueprint": "fbmsw_shack_wad_southeast", + "blueprint_name": "SE wattle and daub storage room", + "blueprint_requires": [ { "id": "fbmsw_0" } ], + "blueprint_provides": [ { "id": "fbmsw_southeast" } ], + "blueprint_excludes": [ { "id": "fbmsw_southeast" } ], + "blueprint_autocalc": true + }, + { + "type": "recipe", + "result": "faction_base_modular_brewery0_wad_southwest", + "description": "We could take advantage of the the designation of this area to build an wattle and daub brewery.", + "category": "CC_BUILDING", + "subcategory": "CSC_BUILDING_BASES", + "autolearn": false, + "never_learn": true, + "construction_blueprint": "fbmsw_brewery0_wad_southwest", + "blueprint_name": "SW wattle and daub brewery", + "blueprint_requires": [ { "id": "fbmsw_0" } ], + "blueprint_provides": [ { "id": "fbmsw_southwest" }, { "id": "brewery" } ], + "blueprint_excludes": [ { "id": "fbmsw_southwest" } ], + "blueprint_autocalc": true + } +] diff --git a/data/json/recipes/basecamps/recipe_modular_saltworks/recipe_modular_saltworks_wood.json b/data/json/recipes/basecamps/recipe_modular_saltworks/recipe_modular_saltworks_wood.json new file mode 100644 index 0000000000000..4f34eda44bb0f --- /dev/null +++ b/data/json/recipes/basecamps/recipe_modular_saltworks/recipe_modular_saltworks_wood.json @@ -0,0 +1,47 @@ +[ + { + "type": "recipe", + "result": "faction_base_modular_saltpan_wood_northeast", + "description": "We could divert saltwater from the swamp nearby to create a steady supply of salt for our needs in a wooden shed.", + "category": "CC_BUILDING", + "subcategory": "CSC_BUILDING_BASES", + "autolearn": false, + "never_learn": true, + "construction_blueprint": "fbmsw_saltpan_wood_northeast", + "blueprint_name": "NE wood panel saltpan", + "blueprint_requires": [ { "id": "fbmsw_0" } ], + "blueprint_provides": [ { "id": "fbmsw_northeast" }, { "id": "Salt_Pan" } ], + "blueprint_excludes": [ { "id": "fbmsw_northeast" } ], + "blueprint_autocalc": true + }, + { + "type": "recipe", + "result": "faction_base_modular_shack_wood_southeast", + "description": "We could use a storage room for chemicals and tools, so build a wood panel shack with a roof on the southeast side of the saltworks field.", + "category": "CC_BUILDING", + "subcategory": "CSC_BUILDING_BASES", + "autolearn": false, + "never_learn": true, + "construction_blueprint": "fbmsw_shack_wood_southeast", + "blueprint_name": "SE wood panel storage room", + "blueprint_requires": [ { "id": "fbmsw_0" } ], + "blueprint_provides": [ { "id": "fbmsw_southeast" } ], + "blueprint_excludes": [ { "id": "fbmsw_southeast" } ], + "blueprint_autocalc": true + }, + { + "type": "recipe", + "result": "faction_base_modular_brewery0_wood_southwest", + "description": "We could take advantage of the the designation of this area to build a wooden brewery.", + "category": "CC_BUILDING", + "subcategory": "CSC_BUILDING_BASES", + "autolearn": false, + "never_learn": true, + "construction_blueprint": "fbmsw_brewery0_wood_southwest", + "blueprint_name": "SW wood panel brewery", + "blueprint_requires": [ { "id": "fbmsw_0" } ], + "blueprint_provides": [ { "id": "fbmsw_southwest" }, { "id": "brewery" } ], + "blueprint_excludes": [ { "id": "fbmsw_southwest" } ], + "blueprint_autocalc": true + } +]