Commit 807e7670 authored by Adam Leyshon's avatar Adam Leyshon
Browse files

Fix what items we are trying to get, make sure we're not trying to get things we can't spawn.

parent e95dfa73
......@@ -416,13 +416,17 @@ namespace Glitterworld_Prime
// Then scan for Defs that can be traded.
foreach (var thing in things)
try
{
if (thing.tradeability == Tradeability.None) continue;
if (thing.category == ThingCategory.Item && thing.thingClass.Name != "MinifiedThing")
if (thing.tradeability != Tradeability.None && thing.GetStatValueAbstract(StatDefOf.MarketValue) > 0.0 &&
(thing.category == ThingCategory.Item || thing.category == ThingCategory.Building) &&
(thing.category != ThingCategory.Building || thing.Minifiable))
thingsToRequestFromMarket.AddRange(ComputeThingDef(thing, stuffCategories));
// Add support for Minifiable buildings
else if (thing.category == ThingCategory.Building && thing.Minifiable)
else if (thing.category == ThingCategory.Building && thing.Minifiable &&
thing.tradeability != Tradeability.None)
thingsToRequestFromMarket.AddRange(ComputeThingDef(thing, stuffCategories));
}
catch (Exception ex)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment