362 {
364 {
365 return;
366 }
367 string prefix = npc.GetLocalizationKey("TownNPCMood");
368 List<string> keys =
new List<string> {
"Content",
"NoHome",
"FarFromHome",
"LoveSpace",
"DislikeCrowded",
"HateCrowded" };
370 {
374 {
376 {
377 keys.Add("LoveBiome");
378 }
380 {
381 keys.Add("LikeBiome");
382 }
384 {
385 keys.Add("DislikeBiome");
386 }
388 {
389 keys.Add("HateBiome");
390 }
391 }
393 {
394 keys.Add("LoveNPC");
395 }
397 {
398 keys.Add("LikeNPC");
399 }
401 {
402 keys.Add("DislikeNPC");
403 }
405 {
406 keys.Add("HateNPC");
407 }
408 }
409 keys.Add("LikeNPC_Princess");
410 keys.Add("Princess_LovesNPC");
411 foreach (string key in keys)
412 {
413 string oldKey = npc.Mod.GetLocalizationKey(
"TownNPCMood." + npc.Name +
"." + key);
414 if (key == "Princess_LovesNPC")
415 {
416 oldKey =
"TownNPCMood_Princess.LoveNPC_" + npc.FullName;
417 }
418 string key2 = prefix +
"." + key;
421 }
422 }
static bool[] NoTownNPCHappiness
If true, the given NPC will not count towards town NPC happiness and won't have a happiness button....
static bool[] IsTownPet
If true for a given NPC type (F:Terraria.NPC.type), then that NPC is categorized as a town pet....
static LocalizedText GetOrRegister(string key, Func< string > makeDefaultValue=null)
Returns a T:Terraria.Localization.LocalizedText for a given key. If no existing localization exists ...
static bool Exists(string key)
Checks if a LocalizedText with the provided key has been registered or not. This can be used to avoid...
static string GetTextValue(string key)
Retrieves the text value for a specified localization key. The text returned will be for the currentl...
Contains methods to access or retrieve localization values. The Localization Guideteaches more about ...