Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
BiomePreferenceListTrait.cs
Go to the documentation of this file.
3
5
6public class BiomePreferenceListTrait : IShopPersonalityTrait, IEnumerable<BiomePreferenceListTrait.BiomePreference>, IEnumerable
7{
20
22
27
32
34 {
36 }
37
39 {
41 for (int i = 0; i < _preferences.Count; i++)
42 {
44 if (biomePreference2.Biome.IsInBiome(info.player) && (biomePreference == null || biomePreference.Affection < biomePreference2.Affection))
45 {
47 }
48 }
49 if (biomePreference != null)
50 {
52 }
53 }
54
56 {
57 string nameKey = preference.Biome.NameKey;
58 switch (preference.Affection)
59 {
60 case AffectionLevel.Love:
61 shopHelperInstance.LoveBiome(nameKey);
62 break;
63 case AffectionLevel.Like:
64 shopHelperInstance.LikeBiome(nameKey);
65 break;
66 case AffectionLevel.Dislike:
67 shopHelperInstance.DislikeBiome(nameKey);
68 break;
69 case AffectionLevel.Hate:
70 shopHelperInstance.HateBiome(nameKey);
71 break;
72 }
73 }
74
79
84}
void Add(TKey key, TValue value)
void ApplyPreference(BiomePreference preference, HelperInfo info, ShopHelper shopHelperInstance)
void Add(AffectionLevel level, AShoppingBiome biome)
void ModifyShopPrice(HelperInfo info, ShopHelper shopHelperInstance)
new IEnumerator< T > GetEnumerator()