Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
GlitterWorld Prime Mod
Release build
Commits
807e7670
Commit
807e7670
authored
Feb 17, 2019
by
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
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
Glitterworld Prime/Utilities.cs
Glitterworld Prime/Utilities.cs
+7
-3
No files found.
Glitterworld Prime/Utilities.cs
View file @
807e7670
...
...
@@ -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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment