Skip to content

Commit

Permalink
Moved the message before it changed the switch, it was really dumb.
Browse files Browse the repository at this point in the history
  • Loading branch information
Skas8825 committed Dec 6, 2024
1 parent 7014da2 commit e8633d1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/iexamine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 ) );

}

/**
Expand Down

0 comments on commit e8633d1

Please sign in to comment.