refactor: Retire InnerObjTemplate fix (#7368)

This commit is contained in:
Timothy Banks
2026-07-01 11:36:28 -04:00
committed by GitHub
parent 0d149ba5b6
commit c53aafa6bf
8 changed files with 15 additions and 58 deletions

View File

@@ -78,12 +78,10 @@ STObject::makeInnerObject(SField const& name)
// The if is complicated because inner object templates were added in
// two phases:
// 1. If there are no available Rules, then always apply the template.
// 2. fixInnerObjTemplate added templates to two AMM inner objects.
// 3. fixInnerObjTemplate2 added templates to all remaining inner objects.
// 2. fixInnerObjTemplate2 added templates to all remaining inner objects.
std::optional<Rules> const& rules = getCurrentTransactionRules();
bool const isAMMObj = name == sfAuctionSlot || name == sfVoteEntry;
if (!rules || (rules->enabled(fixInnerObjTemplate) && isAMMObj) ||
(rules->enabled(fixInnerObjTemplate2) && !isAMMObj))
if (!rules || isAMMObj || rules->enabled(fixInnerObjTemplate2))
{
if (SOTemplate const* elements =
InnerObjectFormats::getInstance().findSOTemplateBySField(name))