Automap (client) [VS plugin mod]
Revision | a4eea1fac3571e451357cba3644090e062744a1f (tree) |
---|---|
Time | 2021-06-08 01:54:27 |
Author | Alia <alex.h@me.c...> |
Commiter | Alia |
added the name to traders so its easier to remember or something
@@ -7,6 +7,7 @@ using System.Text.RegularExpressions; | ||
7 | 7 | using Vintagestory.API.Client; |
8 | 8 | using Vintagestory.API.Common; |
9 | 9 | using Vintagestory.API.Common.Entities; |
10 | +using Vintagestory.API.Config; | |
10 | 11 | using Vintagestory.API.MathTools; |
11 | 12 | using Vintagestory.GameContent; |
12 | 13 |
@@ -139,7 +140,8 @@ namespace Automap | ||
139 | 140 | //clientAPI.Logger.VerboseDebug("Trader: {0} @ {1}", entity.GetName(), posn); |
140 | 141 | |
141 | 142 | var traderJoe = entity as EntityTrader; |
142 | - var message = $"{entity.GetName()} Alive: {traderJoe.Alive}"; | |
143 | + var traderName = entity.GetBehavior<EntityBehaviorNameTag>()?.DisplayName; | |
144 | + var message = Lang.Get("tradingwindow-" + entity.Code.Path, traderName); | |
143 | 145 | if (traderJoe.TradeProps != null) |
144 | 146 | { |
145 | 147 | message += $" - Gears: {traderJoe.TradeProps.Money}, "; |