In the recent update of Terraria, the developers added a new mechanic in the form of NPC happiness (Happiness NPC). If you provide the residents of your towns with comfortable conditions, you can get discounts on goods and buy Pylons, which are necessary for creating a teleportation network.
Happiness indicators are influenced by the following factors: location in a certain territory and neighbors within 25 blocks. In this guide, we have compiled a large list indicating what each resident in the game likes and dislikes.