Merge origin/master (ace81719 product-titles) into eureka/aetheria-release-sim-mines
This commit is contained in:
commit
8a98aef5c1
6 changed files with 110 additions and 9 deletions
|
|
@ -1423,7 +1423,7 @@ public class ActionGameManager : MonoBehaviour
|
|||
: $"base {d.PBase:P1}";
|
||||
|
||||
DebugInfoText.text =
|
||||
$"FIRE CONTROL - {selectedItem.Data.Name}\n" +
|
||||
$"FIRE CONTROL - {ItemManager.Title(selectedItem.EquippableItem)}\n" +
|
||||
$"{gates}\n" +
|
||||
$"range {d.Range:F0} [{d.MinRange:F0}..{d.MaxRange:F0}]\n" +
|
||||
$"info {d.Info:F3}/{d.InfoDemandCeiling:F3} sensor {d.PSensor:F3}\n" +
|
||||
|
|
|
|||
|
|
@ -221,6 +221,11 @@ public class ItemManager
|
|||
return (ItemData.Get(maker), product);
|
||||
}
|
||||
|
||||
// What the player reads an item as: its product's name when its lot's maker has a product of this design,
|
||||
// otherwise the design's own name (unbranded, console-given and extracted lots, and commodities).
|
||||
public string Title(ItemInstance item) =>
|
||||
(item is CraftedItemInstance crafted ? Brand(crafted).Product?.Name : null) ?? GetData(item).Name;
|
||||
|
||||
public (RarityTier tier, int upgrades) GetTier(CraftedItemInstance item)
|
||||
{
|
||||
var quality = GetLot(item).Quality;
|
||||
|
|
|
|||
|
|
@ -192,9 +192,9 @@ public class TradeMenu : MonoBehaviour
|
|||
|
||||
columns.Add(("Name", 3,
|
||||
x => () => x.item is CraftedItemInstance craftedItemInstance ?
|
||||
$"<color=#{ColorUtility.ToHtmlStringRGB(GameManager.ItemManager.GetTier(craftedItemInstance).tier.Color.ToColor())}>{x.data.Name}" :
|
||||
x.data.Name,
|
||||
x => x.data.Name));
|
||||
$"<color=#{ColorUtility.ToHtmlStringRGB(GameManager.ItemManager.GetTier(craftedItemInstance).tier.Color.ToColor())}>{GameManager.ItemManager.Title(x.item)}" :
|
||||
GameManager.ItemManager.Title(x.item),
|
||||
x => GameManager.ItemManager.Title(x.item)));
|
||||
if(_hardpointFilter.filter==null)
|
||||
columns.Add(("Type", 2,
|
||||
x => () =>
|
||||
|
|
@ -352,7 +352,7 @@ public class TradeMenu : MonoBehaviour
|
|||
{
|
||||
int quantity = 1;
|
||||
Dialog.Clear();
|
||||
Dialog.Title.text = $"Buying {i.data.Name}";
|
||||
Dialog.Title.text = $"Buying {GameManager.ItemManager.Title(i.item)}";
|
||||
Dialog.AddField("Quantity",
|
||||
() => quantity,
|
||||
q => quantity = min(min(q, GameManager.Credits / StationServices.BuyPrice(GameManager.ItemManager, s)), s.Quantity));
|
||||
|
|
|
|||
|
|
@ -376,7 +376,6 @@ public class PropertiesPanel : MonoBehaviour
|
|||
sheet.AddStat("Manufacturer", () => maker.Name);
|
||||
if (product != null)
|
||||
{
|
||||
AddProperty(product.Name);
|
||||
AddProperty(product.Description);
|
||||
}
|
||||
}
|
||||
|
|
@ -430,10 +429,9 @@ public class PropertiesPanel : MonoBehaviour
|
|||
|
||||
private string GetTitle(EquippableItem item)
|
||||
{
|
||||
var data = GameManager.ItemManager.GetData(item);
|
||||
var (tier, upgrades) = GameManager.ItemManager.GetTier(item);
|
||||
return
|
||||
$"<color=#{ColorUtility.ToHtmlStringRGB(tier.Color.ToColor())}>{data.Name}</color><smallcaps><size=60%> ({tier.Name}{new string('+', upgrades)})";
|
||||
$"<color=#{ColorUtility.ToHtmlStringRGB(tier.Color.ToColor())}>{GameManager.ItemManager.Title(item)}</color><smallcaps><size=60%> ({tier.Name}{new string('+', upgrades)})";
|
||||
}
|
||||
|
||||
public void Inspect(EquippedItem item)
|
||||
|
|
|
|||
|
|
@ -605,7 +605,7 @@ public class ZoneRenderer : MonoBehaviour
|
|||
var itemPickup = gridObject.gameObject.GetComponent<ItemPickup>();
|
||||
itemPickup.Item = item;
|
||||
itemPickup.ZoneRenderer = this;
|
||||
itemPickup.ScanLabel.text = ItemManager.GetData(item).Name;
|
||||
itemPickup.ScanLabel.text = ItemManager.Title(item);
|
||||
if (item is CraftedItemInstance craftedItemInstance)
|
||||
{
|
||||
var c = ItemManager.GetTier(craftedItemInstance).tier.Color.ToColor();
|
||||
|
|
|
|||
Loading…
Reference in a new issue