Skip to content

Commit

Permalink
Don't display sun light as fuel when not under the sun
Browse files Browse the repository at this point in the history
  • Loading branch information
Fris0uman committed Nov 28, 2019
1 parent e7dbb18 commit dd516e8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/bionics_ui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,13 @@ static void draw_bionics_titlebar( const catacurses::window &window, player *p,
bool found_fuel = false;
fuel_string = _( "Available Fuel: " );
for( const bionic &bio : *p->my_bionics ) {
for( const itype_id fuel : p->get_fuel_available( bio.id ) ) {
for( const itype_id &fuel : p->get_fuel_available( bio.id ) ) {
found_fuel = true;
const item temp_fuel( fuel ) ;
if( temp_fuel.has_flag( "PERPETUAL" ) ) {
if( fuel == itype_id( "sunlight" ) && !g->is_in_sunlight( p->pos() ) ) {
continue;
}
fuel_string += colorize( temp_fuel.tname(), c_green ) + " ";
continue;
}
Expand Down

0 comments on commit dd516e8

Please sign in to comment.