Automap (client) [VS plugin mod]
Revisão | fb984b6cf1eeb385ffff75a9d25ffec00a020009 (tree) |
---|---|
Hora | 2021-06-08 02:27:52 |
Autor | Alia <alex.h@me.c...> |
Commiter | Alia |
the previous way could return non english stuff, which is bad
@@ -141,7 +141,41 @@ namespace Automap | ||
141 | 141 | |
142 | 142 | var traderJoe = entity as EntityTrader; |
143 | 143 | var traderName = entity.GetBehavior<EntityBehaviorNameTag>()?.DisplayName; |
144 | - var message = Lang.Get("tradingwindow-" + entity.Code.Path, traderName); | |
144 | + string code; | |
145 | + // this makes me ill | |
146 | + switch (entity.Code.Path) { | |
147 | + case "humanoid-trader-artisan": | |
148 | + code = "{0} the artisan"; | |
149 | + break; | |
150 | + case "humanoid-trader-treasurehunter": | |
151 | + code = "{0} the treasure hunter"; | |
152 | + break; | |
153 | + case "humanoid-trader-buildmaterials": | |
154 | + code = "{0} the building materials trader"; | |
155 | + break; | |
156 | + case "humanoid-trader-clothing": | |
157 | + code = "{0} the clothing merchant"; | |
158 | + break; | |
159 | + case "humanoid-trader-commodities": | |
160 | + code = "{0} the commodities merchant"; | |
161 | + break; | |
162 | + case "humanoid-trader-foods": | |
163 | + code = "{0} the foods supplier"; | |
164 | + break; | |
165 | + case "humanoid-trader-furniture": | |
166 | + code = "{0} the furniture trader"; | |
167 | + break; | |
168 | + case "humanoid-trader-luxuries": | |
169 | + code = "{0} the luxuries merchant"; | |
170 | + break; | |
171 | + case "humanoid-trader-survivalgoods": | |
172 | + code = "{0} the survival goods supplier"; | |
173 | + break; | |
174 | + default: | |
175 | + code = ""; | |
176 | + break; | |
177 | + } | |
178 | + var message = string.Format(code, traderName); | |
145 | 179 | if (traderJoe.TradeProps != null) |
146 | 180 | { |
147 | 181 | message += $" - Gears: {traderJoe.TradeProps.Money}, "; |