From 7a90b72e786999e1f6ba1fd223918cd377df62e2 Mon Sep 17 00:00:00 2001 From: nsklaus Date: Mon, 21 Jan 2019 17:03:42 +0100 Subject: [PATCH 1/8] bring back power stat while driving --- src/sidebar.cpp | 94 ++++++++++++++++++++++++------------------------- 1 file changed, 47 insertions(+), 47 deletions(-) diff --git a/src/sidebar.cpp b/src/sidebar.cpp index a3c7882df8d4a..f0c61379e6c45 100644 --- a/src/sidebar.cpp +++ b/src/sidebar.cpp @@ -468,7 +468,7 @@ void player::disp_status( const catacurses::window &w, const catacurses::window veh = veh_pointer_or_null( g->m.veh_at( pos() ) ); } if( veh ) { - veh->print_fuel_indicators( w, sideStyle ? 4 : 3, sideStyle ? getmaxx( w ) - 5 : 49 ); + veh->print_fuel_indicators( w, sideStyle ? 5 : 3, sideStyle ? getmaxx( w ) - 5 : 49 ); nc_color col_indf1 = c_light_gray; const float strain = veh->strain(); @@ -520,7 +520,7 @@ void player::disp_status( const catacurses::window &w, const catacurses::window wprintz( w, c_white, " " ); } - + wmove( w, sideStyle ? 4 : 3, getmaxx( w ) - ( sideStyle ? 14 : 12 ) ); //Vehicle direction indicator in 0-359° where 0 is north (veh->face.dir() 0° is west) wprintz( w, c_white, "%3d°", ( veh->face.dir() + 90 ) % 360 ); @@ -568,57 +568,57 @@ void player::disp_status( const catacurses::window &w, const catacurses::window //~ Movement type: "running". Max string length: one letter. const auto str_run = pgettext( "movement-type", "R" ); wprintz( w, c_white, " %s", move_mode == "walk" ? str_walk : str_run ); + } + // display power level + wmove( sideStyle ? w : g->w_HP, + sideStyle ? 4 : 21, + sideStyle ? 17 : 0 ); - // display power level - wmove( sideStyle ? w : g->w_HP, - sideStyle ? spdy - 1 : 21, - sideStyle ? ( wx + dx * 4 - 1 ) : 0 ); + wprintz( sideStyle ? w : g->w_HP, c_white, _( "Pwr " ) ); - wprintz( sideStyle ? w : g->w_HP, c_white, _( "Pwr " ) ); + if( this->max_power_level == 0 ) { + wprintz( sideStyle ? w : g->w_HP, c_light_gray, " --" ); + } else { + nc_color color = c_red; + if( this->power_level >= this->max_power_level / 2 ) { + color = c_green; + } else if( this->power_level >= this->max_power_level / 3 ) { + color = c_yellow; + } else if( this->power_level >= this->max_power_level / 4 ) { + color = c_red; + } - if( this->max_power_level == 0 ) { - wprintz( sideStyle ? w : g->w_HP, c_light_gray, " --" ); - } else { - nc_color color = c_red; - if( this->power_level >= this->max_power_level / 2 ) { - color = c_green; - } else if( this->power_level >= this->max_power_level / 3 ) { - color = c_yellow; - } else if( this->power_level >= this->max_power_level / 4 ) { - color = c_red; + // calc number of digits in powerlevel int + int offset = get_int_digits( this->power_level ); + + // case power_level > 999 display 1k instead + int display_power = this->power_level; + std::string unit = ""; + if( this->power_level > 999 ) { + switch( offset ) { + case 4: + display_power /= 1000; + unit = "k"; + offset = 2; + break; + case 5: + display_power /= 1000; + unit = "k"; + offset = 0; + break; } - - // calc number of digits in powerlevel int - int offset = get_int_digits( this->power_level ); - - // case power_level > 999 display 1k instead - int display_power = this->power_level; - std::string unit = ""; - if( this->power_level > 999 ) { - switch( offset ) { - case 4: - display_power /= 1000; - unit = "k"; - offset = 2; - break; - case 5: - display_power /= 1000; - unit = "k"; - offset = 0; - break; - } - } else { - unit = ""; - } - - wmove( sideStyle ? w : g->w_HP, - sideStyle ? spdy - 1 : 21, - sideStyle ? ( wx + dx * 4 + 6 ) - offset : 7 - offset ); - std::string power_value = std::to_string( display_power ) + unit; - wprintz( sideStyle ? w : g->w_HP, color, power_value ); + } else { + unit = ""; } - wrefresh( sideStyle ? w : g->w_HP ); + + wmove( sideStyle ? w : g->w_HP, + sideStyle ? 4 : 21, + sideStyle ? 17 - offset : 7 - offset ); + std::string power_value = std::to_string( display_power ) + unit; + wprintz( sideStyle ? w : g->w_HP, color, power_value ); } + wrefresh( sideStyle ? w : g->w_HP ); + } int get_int_digits( const int &digits ) From afbb8b41e538e3acf671d3ca91f39d92ea03ca0b Mon Sep 17 00:00:00 2001 From: Kevin Granade Date: Mon, 21 Jan 2019 10:57:19 -0800 Subject: [PATCH 2/8] Remove metal cutting quality from circular saw This was added in #17875 based in taking the jokey description of the circular saw too seriously in #17838. This applies the opposite and more sensible fix of adjusting the jokey description. --- data/json/items/tools.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/data/json/items/tools.json b/data/json/items/tools.json index 58407ee12dbae..f6d2a63e4d7de 100644 --- a/data/json/items/tools.json +++ b/data/json/items/tools.json @@ -1509,7 +1509,7 @@ "type": "TOOL", "name": "circular saw (off)", "name_plural": "circular saws (off)", - "description": "A lightweight handheld cordless circular saw. Spins a circular blade fast enough to cut wood, metal, zombies, or in an emergency, pizza. The blade, while effective in combat, is hard to hit with due to its small size.", + "description": "A lightweight handheld cordless circular saw. Spins a circular blade fast enough to cut wood, zombies, or in an emergency, pizza. The blade, while effective in combat, is hard to hit with due to its small size.", "weight": 2940, "volume": 3, "price": 5000, @@ -1545,7 +1545,7 @@ "max_charges": 100, "turns_per_charge": 1, "revert_to": "circsaw_off", - "qualities": [ [ "CUT", 1 ], [ "SAW_W", 2 ], [ "SAW_M", 2 ], [ "BUTCHER", 60 ] ], + "qualities": [ [ "CUT", 1 ], [ "SAW_W", 2 ], [ "BUTCHER", 60 ] ], "use_action": "CIRCSAW_ON", "flags": [ "MESSY", "TRADER_AVOID", "NONCONDUCTIVE" ] }, From a762797ae373fd344b293388ad8d0582e51b4286 Mon Sep 17 00:00:00 2001 From: John Bytheway Date: Mon, 21 Jan 2019 21:36:57 +0000 Subject: [PATCH 3/8] Revert main.cpp SDL includes Revert part of 595a7e95d. It's not safe for main.cpp to include all SDL headers because they #define WinMain. So switch back to just including SDL_version.h. --- src/main.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main.cpp b/src/main.cpp index f3c7fcd9b92a1..acf6342afc318 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -33,7 +33,11 @@ #include "translations.h" #ifdef TILES -#include "sdl_wrappers.h" +# if defined(_MSC_VER) && defined(USE_VCPKG) +# include +# else +# include +# endif #endif #ifdef __ANDROID__ From 0a7ff12ccf6ffe4ec07e4ec0c5b8c010bea7559d Mon Sep 17 00:00:00 2001 From: fluffy-heretic Date: Mon, 21 Jan 2019 22:40:27 +0100 Subject: [PATCH 4/8] Make faux fur salvageable --- src/iuse_actor.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/iuse_actor.h b/src/iuse_actor.h index 9c80d798527ab..ecc820ba32f75 100644 --- a/src/iuse_actor.h +++ b/src/iuse_actor.h @@ -448,6 +448,7 @@ class salvage_actor : public iuse_actor material_id( "cotton" ), material_id( "leather" ), material_id( "fur" ), + material_id( "faux_fur" ), material_id( "nomex" ), material_id( "kevlar" ), material_id( "plastic" ), From dbcd82619064f5853a99aa51ca6ad0d5c00f8530 Mon Sep 17 00:00:00 2001 From: John Bytheway Date: Mon, 21 Jan 2019 21:55:17 +0000 Subject: [PATCH 5/8] Fix Android compile error Earlier include cleanup removed some headers important for the Android build. Attempt to restore them. --- src/main.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main.cpp b/src/main.cpp index f3c7fcd9b92a1..9d98a992b2ec3 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -37,6 +37,7 @@ #endif #ifdef __ANDROID__ +#include #include #include #include From e7bb2ec973e00851769c357f3701dfc348a6fc3a Mon Sep 17 00:00:00 2001 From: Mark Langsdorf Date: Mon, 21 Jan 2019 20:21:12 -0600 Subject: [PATCH 6/8] basecamp: fix cook expansion companion retrieval _faction_exp_kitchen_cooking !=_faction_exp_kitchen_crafting. --- src/faction_camp.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/faction_camp.cpp b/src/faction_camp.cpp index 9115acfd4e560..9d9e0a39425fa 100644 --- a/src/faction_camp.cpp +++ b/src/faction_camp.cpp @@ -1040,7 +1040,7 @@ bool basecamp::handle_mission( npc &p, const std::string &miss_id, const std::st craft_construction( p, miss_id, miss_dir, "COOK", "_faction_exp_kitchen_cooking_" ); if( miss_id == miss_dir + " (Finish) Cooking" ) { const std::string msg = _( "returns from your kitchen with something..." ); - mission_return( p, "_faction_exp_kitchen_crafting_" + miss_dir, 15_minutes, + mission_return( p, "_faction_exp_kitchen_cooking_" + miss_dir, 15_minutes, true, msg, "cooking", 2 ); } From ab353d284dfe494ed8aae7ab450dda048cdb2197 Mon Sep 17 00:00:00 2001 From: Barhandar Date: Mon, 21 Jan 2019 14:25:49 +0300 Subject: [PATCH 7/8] Reduces circular saw butcher quality to more appropriate yield-level. --- data/json/items/tools.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/data/json/items/tools.json b/data/json/items/tools.json index 58407ee12dbae..9609e2eb71bf4 100644 --- a/data/json/items/tools.json +++ b/data/json/items/tools.json @@ -1531,6 +1531,7 @@ "type": "TOOL", "name": "circular saw (on)", "name_plural": "circular saws (on)", + "//": "Circular saw would be very fast but imprecise butchering tool - alas the qualities are not separate and so speed is sacrificed.", "description": "A lightweight handheld cordless circular saw. It is currently on and the blade is spinning; use this item to turn it off.", "weight": 2940, "volume": 3, @@ -1545,7 +1546,7 @@ "max_charges": 100, "turns_per_charge": 1, "revert_to": "circsaw_off", - "qualities": [ [ "CUT", 1 ], [ "SAW_W", 2 ], [ "SAW_M", 2 ], [ "BUTCHER", 60 ] ], + "qualities": [ [ "CUT", 1 ], [ "SAW_W", 2 ], [ "SAW_M", 2 ], [ "BUTCHER", -40 ] ], "use_action": "CIRCSAW_ON", "flags": [ "MESSY", "TRADER_AVOID", "NONCONDUCTIVE" ] }, From 61fbd22fad598c631c388972fddb82e2acf77a08 Mon Sep 17 00:00:00 2001 From: Night-Pryanik Date: Tue, 22 Jan 2019 09:24:12 +0400 Subject: [PATCH 8/8] Removed rags from components, updated description --- data/json/items/armor.json | 2 +- data/json/recipes/armor/storage.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/data/json/items/armor.json b/data/json/items/armor.json index 858d049d1d0e0..6a5fa2639d176 100644 --- a/data/json/items/armor.json +++ b/data/json/items/armor.json @@ -1242,7 +1242,7 @@ "id": "spearsling", "type": "ARMOR", "name": "spear strap", - "description": "A cloth strap tied around the torso for toting spears while keeping your hands free. You have to duck to get through doors while one's in it, though. Activate to holster/draw a weapon.", + "description": "A leather strap tied around the torso for toting spears while keeping your hands free. You have to duck to get through doors while one's in it, though. Activate to holster/draw a weapon.", "weight": 160, "volume": 2, "price": 5200, diff --git a/data/json/recipes/armor/storage.json b/data/json/recipes/armor/storage.json index c7a6ab371fb18..6e87f48f22fae 100644 --- a/data/json/recipes/armor/storage.json +++ b/data/json/recipes/armor/storage.json @@ -661,7 +661,7 @@ "autolearn": true, "qualities": [ { "id": "SEW", "level": 1 } ], "components": [ - [ [ "rag", 7 ], [ "felt_patch", 7 ], [ "leather", 7 ], [ "fur", 7 ] ], + [ [ "felt_patch", 7 ], [ "leather", 7 ], [ "fur", 7 ] ], [ [ "filament", 20, "LIST" ], [ "cordage", 2, "LIST" ] ] ] },