Compare commits
11 commits
630cc1fbbc
...
2ec415f2b5
Author | SHA1 | Date | |
---|---|---|---|
2ec415f2b5 | |||
274d8ce014 | |||
267226a386 | |||
d21e2cbabb | |||
457bb5e89f | |||
5144121812 | |||
cf69d3396f | |||
3403feb668 | |||
6450572f97 | |||
81b35476a0 | |||
b909f0ac13 |
1 changed files with 4 additions and 0 deletions
|
@ -264,6 +264,7 @@ Profile::setMaterial(MaterialID id, std::int32_t amount) {
|
||||||
if(!mats_prop) {
|
if(!mats_prop) {
|
||||||
mats_prop = new ArrayProperty;
|
mats_prop = new ArrayProperty;
|
||||||
mats_prop->name.emplace(container);
|
mats_prop->name.emplace(container);
|
||||||
|
mats_prop->itemType = "StructProperty";
|
||||||
_profile.appendProperty(ArrayProperty::ptr{mats_prop});
|
_profile.appendProperty(ArrayProperty::ptr{mats_prop});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -277,6 +278,9 @@ Profile::setMaterial(MaterialID id, std::int32_t amount) {
|
||||||
ResourceItemValue* res_prop;
|
ResourceItemValue* res_prop;
|
||||||
if(it == mats_prop->items.end()) {
|
if(it == mats_prop->items.end()) {
|
||||||
res_prop = new ResourceItemValue;
|
res_prop = new ResourceItemValue;
|
||||||
|
if(mats_prop->items.isEmpty()) {
|
||||||
|
res_prop->name.emplace("ResourceMaterial");
|
||||||
|
}
|
||||||
res_prop->id = id;
|
res_prop->id = id;
|
||||||
ResourceItemValue::ptr prop{res_prop};
|
ResourceItemValue::ptr prop{res_prop};
|
||||||
arrayAppend(mats_prop->items, std::move(prop));
|
arrayAppend(mats_prop->items, std::move(prop));
|
||||||
|
|
Loading…
Reference in a new issue