Procházet zdrojové kódy

Publish every value-gated lore category, not a chosen subset

All eighteen value-gated books carry the identical gate -- READ_VALUE on
their own slot, op11, op8 -- so there is no reading of the shipped data on
which some should be satisfied and others left shut. apply_category_gates
skipped ten of them on a distinction invented here: that their gate index
equals their bar index and writing one would falsify the other. The pass
only ever raises a zero, so the cost is a 1 on those ten parent triumphs
while nothing is claimed, and the true count the moment anything is.

Those ten really do have one slot where the other eight have two. The
search for a separate gate is closed, not abandoned. Every slot in the
account value bank was written non-zero -- everything outside the bar slots
at 1 and at 100, then the bar slots themselves, then those excluding the
ten's own -- and the ten appear only when their own slot does. The account
flag bank was swept 0-8922, plus the profile flags, the character flags and
both character value banks. The family5 override path reaches the same
index by raw slot and outranks the bank: an override of 0 there overrode a
gate of 1 and shut the book, which proves one number rather than two.

Their gate expression is three instructions ending at READ_VALUE with no
second operand, unlike node 827's, whose READ_FLAG the decoder does find
and which resolves to the visibilityFlagIndex the extractor recorded. So
the single operand is real and not a decode failure.
Millie před 2 týdny
rodič
revize
bb22f3ec66

+ 8 - 10
Sunrise/src/state/build_data/nodes/node_catalog.cpp

@@ -140,16 +140,14 @@ std::size_t apply_category_gates(std::span<std::int32_t> objectiveValues, bool r
         // is acquired from a quest or vendor. That is the same acquisition marker apply_visibility
         // already publishes for the flag-gated books, just held in the value bank instead, so it
         // is satisfied here unconditionally for the same reason.
-        bool acquisitionGate = false;
-        for (const auto& bar : record_claims::parent_bar_table::kBars) {
-            if (bar.nodeIndex == node.definitionIndex) {
-                acquisitionGate = bar.valueIndex != node.valueIndex;
-                break;
-            }
-        }
-        if (!acquisitionGate && !revealAll) {
-            continue;
-        }
+        // Every value-gated category is published, with no distinction between them. All
+        // eighteen carry the identical gate -- READ_VALUE on their own slot, op11, op8 -- so
+        // there is no reading of the shipped data on which some of them should be satisfied and
+        // others left shut. An earlier version skipped the ten whose gate index equals their bar
+        // index, on the theory that writing one would falsify the other. It does not: this pass
+        // only ever raises a zero, so those ten read 1 on their parent triumph while nothing is
+        // claimed and the true count the moment anything is, which is the same bargain the other
+        // eight already make.
         // Never lower a value already written -- a non-zero slot is either already open or holds a
         // count from elsewhere, and this pass only ever needs to prove the gate, never reset it.
         if (objectiveValues[node.valueIndex] == 0) {

+ 1 - 1
Sunrise/src/state/record_claims/record_claims.cpp

@@ -657,7 +657,7 @@ std::size_t apply_node_progress(std::span<std::int32_t> objectiveValues) noexcep
                 // locked, which is what claiming-only produced. It is only reached when the slot
                 // is not also the book's bar: the guard above skips it when they coincide, and for
                 // those ten the slot is the bar and has to keep counting claims.
-                state->values[node.valueIndex] = collected;
+                state->values[node.valueIndex] = chapters;
                 ++state->written;
             }
             // Eight books name no value at field 136 and so have no table entry, but their parent