Skip to content

Commit

Permalink
Revert "Merge pull request #6 from CleverRaven/master"
Browse files Browse the repository at this point in the history
This reverts commit 753b1ac, reversing
changes made to 9a32197.
  • Loading branch information
I-am-Erk committed Jan 23, 2019
1 parent 65dacce commit 48dcbfc
Show file tree
Hide file tree
Showing 7 changed files with 53 additions and 60 deletions.
2 changes: 1 addition & 1 deletion data/json/items/armor.json
Original file line number Diff line number Diff line change
Expand Up @@ -1242,7 +1242,7 @@
"id": "spearsling",
"type": "ARMOR",
"name": "spear strap",
"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.",
"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.",
"weight": 160,
"volume": 2,
"price": 5200,
Expand Down
5 changes: 2 additions & 3 deletions data/json/items/tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -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, 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, metal, 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,
Expand All @@ -1531,7 +1531,6 @@
"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,
Expand All @@ -1546,7 +1545,7 @@
"max_charges": 100,
"turns_per_charge": 1,
"revert_to": "circsaw_off",
"qualities": [ [ "CUT", 1 ], [ "SAW_W", 2 ], [ "BUTCHER", -40 ] ],
"qualities": [ [ "CUT", 1 ], [ "SAW_W", 2 ], [ "SAW_M", 2 ], [ "BUTCHER", 60 ] ],
"use_action": "CIRCSAW_ON",
"flags": [ "MESSY", "TRADER_AVOID", "NONCONDUCTIVE" ]
},
Expand Down
2 changes: 1 addition & 1 deletion data/json/recipes/armor/storage.json
Original file line number Diff line number Diff line change
Expand Up @@ -661,7 +661,7 @@
"autolearn": true,
"qualities": [ { "id": "SEW", "level": 1 } ],
"components": [
[ [ "felt_patch", 7 ], [ "leather", 7 ], [ "fur", 7 ] ],
[ [ "rag", 7 ], [ "felt_patch", 7 ], [ "leather", 7 ], [ "fur", 7 ] ],
[ [ "filament", 20, "LIST" ], [ "cordage", 2, "LIST" ] ]
]
},
Expand Down
2 changes: 1 addition & 1 deletion src/faction_camp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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_cooking_" + miss_dir, 15_minutes,
mission_return( p, "_faction_exp_kitchen_crafting_" + miss_dir, 15_minutes,
true, msg, "cooking", 2 );
}

Expand Down
1 change: 0 additions & 1 deletion src/iuse_actor.h
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,6 @@ 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" ),
Expand Down
7 changes: 1 addition & 6 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,10 @@
#include "translations.h"

#ifdef TILES
# if defined(_MSC_VER) && defined(USE_VCPKG)
# include <SDL2/SDL_version.h>
# else
# include <SDL_version.h>
# endif
#include "sdl_wrappers.h"
#endif

#ifdef __ANDROID__
#include <unistd.h>
#include <SDL_system.h>
#include <SDL_filesystem.h>
#include <SDL_keyboard.h>
Expand Down
94 changes: 47 additions & 47 deletions src/sidebar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,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 ? 5 : 3, sideStyle ? getmaxx( w ) - 5 : 49 );
veh->print_fuel_indicators( w, sideStyle ? 4 : 3, sideStyle ? getmaxx( w ) - 5 : 49 );
nc_color col_indf1 = c_light_gray;

const float strain = veh->strain();
Expand Down Expand Up @@ -519,7 +519,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 );

Expand Down Expand Up @@ -567,57 +567,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 );

wprintz( sideStyle ? w : g->w_HP, c_white, _( "Pwr " ) );
// display power level
wmove( sideStyle ? w : g->w_HP,
sideStyle ? spdy - 1 : 21,
sideStyle ? ( wx + dx * 4 - 1 ) : 0 );

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;
}
wprintz( sideStyle ? w : g->w_HP, c_white, _( "Pwr " ) );

// 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;
}
if( this->max_power_level == 0 ) {
wprintz( sideStyle ? w : g->w_HP, c_light_gray, " --" );
} else {
unit = "";
}
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;
}

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 );
// 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 );
}
wrefresh( sideStyle ? w : g->w_HP );
}
}

int get_int_digits( const int &digits )
Expand Down

0 comments on commit 48dcbfc

Please sign in to comment.