Delete the re-mint path and the dead debug menu
Cut A of docs/item-provenance-cut.md. TradeMenuDebug.cs was dead (its script GUID appears in no scene/prefab/asset and no other .cs names the type). ItemManager.Instantiate and CreateInstance(SimpleCommodityData, int) re-rolled quality and dropped provenance on every load; nothing outside EntitySerializer called them once the instantiate parameter is gone. EntitySerializer.Unpack/Restore no longer thread an instantiate flag, so Temperature and Armor are restored unconditionally like every other caller already got. The starting ship and spawnturret now keep what the generator built instead of re-minting. Verification: Aetheria.Shared, tools/AetherDb build green against CultLib a0813c6; tests/Aetheria.Shared.Tests 29 passed (unchanged); the four negative greps in the map are empty. Unity compile is still owed (the editor is open on this project; batchmode was not run per instructions). Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
parent
7425ff1be4
commit
69801bbb2c
5 changed files with 22 additions and 535 deletions
|
|
@ -89,40 +89,6 @@ public class ItemManager
|
|||
return (int) (GameplaySettings.QualityPriceModifier.Evaluate(item.Quality) * data.Price);
|
||||
}
|
||||
|
||||
public SimpleCommodity CreateInstance(SimpleCommodityData item, int count)
|
||||
{
|
||||
if (item != null)
|
||||
{
|
||||
var newItem = new SimpleCommodity
|
||||
{
|
||||
Data = ItemData.RefOf<ItemData>(item),
|
||||
Quantity = count
|
||||
};
|
||||
return newItem;
|
||||
}
|
||||
|
||||
_logger("Attempted to create Simple Commodity instance using missing or incorrect item id");
|
||||
return null;
|
||||
}
|
||||
|
||||
public ItemInstance Instantiate(ItemInstance item)
|
||||
{
|
||||
var data = GetData(item);
|
||||
if(data is CraftedItemData c)
|
||||
{
|
||||
var i = CreateInstance(c);
|
||||
i.Rotation = item.Rotation;
|
||||
return i;
|
||||
}
|
||||
if (item is SimpleCommodity s)
|
||||
{
|
||||
var i = CreateInstance(data as SimpleCommodityData, s.Quantity);
|
||||
i.Rotation = item.Rotation;
|
||||
return i;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public CraftedItemInstance CreateInstance(CraftedItemData item, float quality)
|
||||
{
|
||||
if (item is EquippableItemData equippableItemData)
|
||||
|
|
|
|||
Loading…
Reference in a new issue