mirror of
https://github.com/Xahau/xahaud.git
synced 2025-11-12 22:55:48 +00:00
Compare commits
1 Commits
workflow-t
...
meta-fix
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8ffe1ee1a9 |
@@ -130,6 +130,9 @@ ApplyStateTable::generateTxMeta(
|
|||||||
if (!hookEmission.empty())
|
if (!hookEmission.empty())
|
||||||
meta.setHookEmissions(STArray{hookEmission, sfHookEmissions});
|
meta.setHookEmissions(STArray{hookEmission, sfHookEmissions});
|
||||||
|
|
||||||
|
bool const recordDefaultAmounts =
|
||||||
|
to.rules().enabled(fixXahau1);
|
||||||
|
|
||||||
Mods newMod;
|
Mods newMod;
|
||||||
for (auto& item : items_)
|
for (auto& item : items_)
|
||||||
{
|
{
|
||||||
@@ -232,8 +235,11 @@ ApplyStateTable::generateTxMeta(
|
|||||||
STObject news(sfNewFields);
|
STObject news(sfNewFields);
|
||||||
for (auto const& obj : *curNode)
|
for (auto const& obj : *curNode)
|
||||||
{
|
{
|
||||||
|
bool const shouldRecord =
|
||||||
|
(obj.getSType() == STI_AMOUNT && recordDefaultAmounts) || !obj.isDefault();
|
||||||
|
|
||||||
// save non-default values
|
// save non-default values
|
||||||
if (!obj.isDefault() &&
|
if (shouldRecord &&
|
||||||
obj.getFName().shouldMeta(
|
obj.getFName().shouldMeta(
|
||||||
SField::sMD_Create | SField::sMD_Always))
|
SField::sMD_Create | SField::sMD_Always))
|
||||||
news.emplace_back(obj);
|
news.emplace_back(obj);
|
||||||
|
|||||||
Reference in New Issue
Block a user