From e8633d17366bbef33c2caf222517a56871cd0057 Mon Sep 17 00:00:00 2001 From: Skas8825 Date: Fri, 6 Dec 2024 05:22:04 -0300 Subject: [PATCH 1/2] Moved the message before it changed the switch, it was really dumb. --- src/iexamine.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/iexamine.cpp b/src/iexamine.cpp index 4f298d37674c..9d6afdc388b5 100644 --- a/src/iexamine.cpp +++ b/src/iexamine.cpp @@ -860,11 +860,13 @@ void iexamine::toggle_lights( player &/*p*/, const tripoint &examp ) map &here = get_map(); const auto flag = here.has_flag_furn( "L_OFF", examp ) ? "L_OFF" : "L_ON"; + add_msg( _( here.furn( examp ).obj().message ) ); + for( const auto &light_loc : here.find_furnitures_with_flag_in_omt( examp, flag ) ) { here.furn_set( light_loc, here.get_furn_transforms_into( light_loc ) ); }; - add_msg( _( here.furn( examp ).obj().message ) ); + } /** From b43c654624448db53236d7e8cfd30f7268f6af75 Mon Sep 17 00:00:00 2001 From: Skas8825 Date: Fri, 6 Dec 2024 05:39:21 -0300 Subject: [PATCH 2/2] Get rid of empty space, i forgot. --- src/iexamine.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/iexamine.cpp b/src/iexamine.cpp index 9d6afdc388b5..dac178b6f536 100644 --- a/src/iexamine.cpp +++ b/src/iexamine.cpp @@ -865,8 +865,6 @@ void iexamine::toggle_lights( player &/*p*/, const tripoint &examp ) for( const auto &light_loc : here.find_furnitures_with_flag_in_omt( examp, flag ) ) { here.furn_set( light_loc, here.get_furn_transforms_into( light_loc ) ); }; - - } /**