From dd516e8109ccbef7db5e3f646f506524ea784d1c Mon Sep 17 00:00:00 2001 From: Fris0uman Date: Thu, 28 Nov 2019 11:30:06 +0100 Subject: [PATCH] Don't display sun light as fuel when not under the sun --- src/bionics_ui.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/bionics_ui.cpp b/src/bionics_ui.cpp index 8ea1a69c4e56d..5e2c383cb00e0 100644 --- a/src/bionics_ui.cpp +++ b/src/bionics_ui.cpp @@ -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; }