Skip to content

Introduce central equipment modifier resolver and structured adjustment UI/schema - #37

Merged
V3-code merged 16 commits into
masterfrom
codex/avaliar-melhorias-no-modificador-de-equipamento-tnhd37
Oct 4, 2026
Merged

V3-code merged 16 commits into
masterfrom
codex/avaliar-melhorias-no-modificador-de-equipamento-tnhd37

Conversation

@V3-code

@V3-code V3-code commented Oct 2, 2026

Copy link
Copy Markdown
Owner

Motivation

  • Provide a single canonical resolver for equipment price and weight calculations to avoid duplicated logic and ease future features like structured features and effects.
  • Migrate legacy free-form modifier fields to a structured adjustment schema while keeping backward compatibility during transition.
  • Surface modifier properties (enabled, level, stages) in the item UI so GMs can control how modifiers apply and inspect resolved totals.

Description

  • Add a pure calculation module module/utils/equipment-resolution.mjs that implements parseEquipmentAdjustment, normalizeEquipmentModifier and resolveEquipment, with support for four stages (original, base, final_base, final), per-level and per-weight scaling, unit handling and deterministic calculation traces.
  • Update importer logic in module/apps/importers.js to map GCS fields into the structured schema (adjustment_schema, cost_adjustment_data, weight_adjustment_data, etc.) while preserving legacy expressions.
  • Update item sheet and templates (module/item/gurps-item-sheet.js, templates/items/item-sheet.hbs, template.json) to expose structured controls for equipment modifiers (enabled, level, cost/weight expression, stage and per-level/per-weight flags) and show resolved unit/extended totals.
  • Integrate the resolver into runtime flows: scripts/main.js now resolves item.system.equipmentResolution and assigns effectiveCost/effectiveWeight, and the equipment modifier browser (module/apps/eqp-modifier-browser.js) clones and preserves structured modifier data when adding modifiers to items.
  • Add documentation docs/equipment-modifiers.md describing the implemented stage model, scaling rules and migration notes.
  • Update and add tests around the new behavior (tests/equipment-resolution.test.mjs, tests/equipment-modifier-layout.test.mjs, tests/equipment-modifier-import.test.mjs) and adjust tests/equipment-modifier-browser.test.mjs to expect the structured fields.

Testing

  • Ran the repository unit tests including equipment-resolution.test.mjs, equipment-modifier-layout.test.mjs, equipment-modifier-import.test.mjs and the updated equipment-modifier-browser.test.mjs, all of which passed.
  • Executed template and item-sheet assertions that check presence of new fields and integration points, which also passed.
  • Verified that importer parsing tests for GCS modifiers preserve stages, scaling flags and legacy expressions, which succeeded.

Codex Task

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e3b5e97d89

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread module/apps/importers.js Outdated
template.enabled = gcsMod.disabled !== true;
template.level = 1;
template.cost_factor = /cf$/i.test(rawCostStr) ? Number.parseFloat(rawCostStr) || 0 : 0;
template.cost_adjustment = rawCostStr.replace("*", "x") || "0 CF";

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Convert bare GCS base costs to CF expressions

When GCS supplies a numeric cost such as "1" with cost_type: "to_base_cost", this now stores the expression unchanged. The resolver parses it as a flat addition, but the base-cost stage accepts only CFs and multipliers, so it reports unsupported_operation and leaves the equipment cost unchanged. The previous importer explicitly converted this input to +1 CF; preserve that conversion for base-cost imports.

Useful? React with 👍 / 👎.

Comment on lines +134 to +136
if (target === "cost" && stage === "base") return ["cost_factor", "multiply"].includes(operation);
if (target === "weight" && stage === "original") return ["add", "percent"].includes(operation);
if (target === "weight") return ["add", "multiply", "percent_multiplier"].includes(operation);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Infer compatible stages for legacy adjustments

For legacy records without structured stage data, normalization assigns both adjustments to base; these checks then reject previously supported expressions such as cost -10%/+50 and weight -10%. Existing equipment modifiers using the old sheet therefore silently stop affecting the displayed resolved values after upgrading. Legacy expressions need an operation-compatible inferred stage rather than all defaulting to base.

Useful? React with 👍 / 👎.

Comment thread module/item/gurps-item-sheet.js Outdated
const costExpression = formData["system.cost_adjustment_data.expression"];
const weightExpression = formData["system.weight_adjustment_data.expression"];
formData["system.adjustment_schema"] = 1;
if (costExpression !== undefined) formData["system.cost_adjustment"] = costExpression;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Synchronize cost_factor when saving CF expressions

When a modifier is edited to a structured CF expression such as +1 CF, saving updates cost_adjustment but leaves the legacy cost_factor at its previous value, commonly zero. The equipment-modifier browser still builds its CF range filter from system.cost_factor, so newly edited modifiers are misclassified or omitted from nonzero CF searches even though their calculations use the new value.

Useful? React with 👍 / 👎.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e5fbf5cf1c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread module/utils/equipment-resolution.mjs Outdated
continue;
}
if (parsed.operation === "cost_factor") totalFactor += parsed.value * scale;
if (parsed.operation === "multiply") totalFactor += ((parsed.value * scale) - 1);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Scale the multiplier's CF delta rather than its factor

When a base-cost multiplier is marked per-level or per-weight and its scale exceeds 1, this computes (N * scale) - 1 instead of scaling its documented CF equivalent (N - 1) * scale. For example, x2 at level 2 becomes x4, although two +1 CF contributions should produce x3; imported GCS multipliers using either scaling flag therefore overstate equipment costs.

Useful? React with 👍 / 👎.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7587707003

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread scripts/main.js Outdated
foundry.utils.getProperty(effect, "flags.gum.originItemId") === item.id
&& foundry.utils.getProperty(effect, "flags.gum.source") === EQUIPMENT_GRANTED_EFFECT_SOURCE
);
if ((grants.length > 0) !== (existing.length > 0)) await syncEquipmentModifierGrantedEffects(item);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Reconcile the actual granted-effect set

When an item expects multiple grants but only one generated effect remains—for example after one effect was manually deleted or a previous synchronization partially failed—both sides of this boolean comparison are still true, so startup reconciliation does nothing. The same occurs when the remaining effect belongs to an obsolete grant. Compare the expected grant/effect identities against the generated ActiveEffects and resynchronize whenever the sets differ.

Useful? React with 👍 / 👎.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c2bd26f54c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread scripts/main.js
console.warn(`GUM | Efeito de ataque "${grant.label}" não possui ações de rolagem ou combate compatíveis.`);
continue;
}
await applySingleEffect(effectItem, targets, {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Make lifecycle-bound granted effects persistent

When a wearer or source-attack grant references an ordinary Effect item, this call preserves that Effect's duration; the default Effect template is combat-bound for one round. applySingleEffect therefore creates the grant disabled while outside combat and lets it expire after a round once combat starts, and no hook recreates it while the equipment remains equipped or active. Override the applied duration for lifecycle-managed grants so their presence is governed by while_possessed/while_carried/while_equipped/while_active, rather than by the reusable Effect's transient duration.

Useful? React with 👍 / 👎.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3963aa9a47

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread scripts/main.js
Comment on lines +646 to +649
item.system.melee_attacks = resolution.meleeAttacks;
item.system.ranged_attacks = resolution.rangedAttacks;
for (const [path, value] of Object.entries(resolution.properties)) {
if (value !== undefined) item.system[path] = value;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Keep resolved equipment data out of editable system fields

When an actor-owned equipment item has an attack or property feature, these assignments replace the values exposed through item.system with resolved values. The item sheet binds its editable attack and property inputs to that same system object, so a subsequent sheet submission—such as editing an unrelated field—can persist modified attacks/properties (including generated attacks) as the new base data. Additive features then accumulate on later preparations, and generated attacks remain after their modifier is removed; keep the resolution in separate derived fields or populate editable inputs from _source.system.

Useful? React with 👍 / 👎.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a69db1865a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +982 to +986
await this.item.update({
[`system.features_data.${id}.effect_uuid`]: effect.uuid,
[`system.features_data.${id}.effect_name`]: effect.name,
[`system.features_data.${id}.effect_img`]: effect.img
});

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve unsaved feature edits before linking an effect

When a user changes this feature's domain, lifecycle, or attack filters and then selects a different Effect before the sheet form is submitted, this direct document update persists only the three link fields and triggers a sheet rerender from stored data, discarding the other edits still present only in the form. Submit or merge the current form data before updating the effect link.

Useful? React with 👍 / 👎.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f56c1de519

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread scripts/main.js Outdated
try {
const actionIds = grant.domain === "source_attack"
? getEffectActions(effectItem.system)
.filter(action => ["roll_modifier", "skill_modifier", "combat_modifier"].includes(action.type))

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Reject skill-only actions from source-attack grants

When a source_attack grant links an Effect whose only compatible-looking action is skill_modifier, this filter installs it, but the effect can never apply: applySingleEffect emits skill modifiers with a skill context and skill_roll_only: true, while the source-attack scope requires the rolled item to be the originating equipment and requires an attack. Consequently, both the roll prompt and derived-NH paths reject the entry, leaving the configured grant silently inert; either exclude skill_modifier here or translate it into an attack-compatible modifier.

Useful? React with 👍 / 👎.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6d5fc7e259

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread module/utils/equipment-resolution.mjs Outdated
}

function applyFeatureValue(current, feature, scale, { formula = false } = {}) {
if (feature.operation === "set") return feature.value;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Honor per-level scaling for set features

When a numeric equipment, location-DR, or attack feature uses set and the author enables “Por nível do modificador,” this early return ignores the computed scale entirely. For example, setting RD to 2 per level on a level-3 modifier still produces RD 2 rather than a level-dependent result, even though the sheet exposes that checkbox for set operations. Apply the scale to numeric set values or prevent per-level configuration when set is selected.

Useful? React with 👍 / 👎.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 313cce9c3b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread module/item/gurps-item-sheet.js Outdated
Comment on lines +487 to +488
const drLocationKeys = new Set([...Object.keys(drLocations), ...Object.keys(resolvedDrLocations)]);
context.drLocationRows = [...drLocationKeys].map(key => [key, drLocations[key] || {}])

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Keep derived DR locations out of editable rows

When an equipment_dr feature creates a location absent from the base item, this union renders that derived-only location as an editable row with an empty base value. Any later sheet submission calls _collectDRLocationsFromForm(), which converts the empty value to {base: 0} and persists it into system.dr_locations, so merely saving an unrelated edit mutates the base armor and leaves the location behind after the modifier is removed. Render modifier-only locations separately or exclude them when collecting the editable form.

Useful? React with 👍 / 👎.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: bd9e5e9c2b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread module/utils/equipment-resolution.mjs Outdated
Comment on lines +566 to +567
if (uses.mode !== "charges" || uses.max <= 0) {
return { consumed: true, mode: "quantity", updates: { "system.quantity": Math.max(0, quantity - 1) }, uses };

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Keep zero-capacity charge items from consuming quantity

When an item explicitly uses uses_mode: "charges" but its resolved capacity is zero—because max_uses is unset, configured as zero, or reduced by a feature—this branch treats the action as legacy quantity consumption and deletes one whole unit. Since the sheet exposes charge mode independently of capacity, a zero-capacity charge item should report empty_charges; only quantity mode should decrement system.quantity.

Useful? React with 👍 / 👎.

Comment on lines +328 to +329
const base = numericValue(current) ?? 0;
if (feature.operation === "multiply") return base * scaled;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Prevent numeric operations from zeroing textual attack fields

When the sheet's offered multiply operation is selected for a textual attack property such as damage_formula, the current value (for example GdP) cannot be parsed numerically, so this fallback changes the base to zero and resolves GdP × 2 as damage formula 0. Textual equipment properties have a related failure where add/multiply silently do nothing or produce numeric data; restrict those paths to set or implement appropriate formula/text handling instead of coercing a nonnumeric current value to zero.

Useful? React with 👍 / 👎.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e67b8e2b77

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread templates/items/item-sheet.hbs Outdated
<div class="form-grid-3">
<label class="custom-checkbox"><input type="checkbox" name="system.features_data.{{feature.id}}.enabled" {{checked feature.enabled}}/><span>Ativa</span></label>
<div class="form-group"><label>Nome</label><input type="text" name="system.features_data.{{feature.id}}.label" value="{{feature.label}}"/></div>
<div class="form-group"><label>Tipo</label><select name="system.features_data.{{feature.id}}.type">{{selectOptions ../equipmentFeatureTypeOptions selected=feature.type valueAttr="id" labelAttr="label"}}</select></div>

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Rerender when feature-shaping selections change

When an author changes the feature type, the type-specific editor remains based on the previously rendered value because GurpsItemSheet.defaultOptions does not enable submit-on-change and no change listener saves/rerenders this select. For example, changing the default equipment_property to granted_effect leaves the effect UUID/domain controls inaccessible until the entire sheet is closed and reopened; the create_attack attack-type selector similarly leaves the wrong melee/ranged fields visible. Persist the current form and rerender when these selections change.

Useful? React with 👍 / 👎.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3b0cf33020

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread module/apps/importers.js Outdated
const weaponPaths = {
weapon_bonus: "damage_formula", weapon_acc_bonus: "accuracy", weapon_scope_acc_bonus: "accuracy",
weapon_dr_divisor_bonus: "armor_divisor", weapon_min_st_bonus: "min_strength", weapon_recoil_bonus: "rcl",
weapon_bulk_bonus: "bulk"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Map imported Bulk bonuses to the runtime field

When GCS supplies a weapon_bulk_bonus, this creates an attack feature targeting bulk, but equipment ranged attacks store and consume that statistic as mag (the sheet, actor attack card, and roll context all read attack.mag). The resolver therefore adds an otherwise unused attack.bulk property, so the imported modifier has no visible or mechanical effect; map this feature to mag or migrate the equipment attack model consistently.

Useful? React with 👍 / 👎.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 74d64bea4e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread module/apps/importers.js
Comment on lines +2456 to +2457
location: String(location).toLowerCase() === "all" ? "all" : String(location),
damage_type: !feature.specialization || String(feature.specialization).toLowerCase() === "all" ? "base" : feature.specialization,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Normalize imported GCS DR keys

When a GCS modifier targets identifiers such as skull or arm, or specializes in cut, this stores the raw GCS values. The actor preparation path only accepts system locations such as head/arm_l/arm_r, while typed DR uses keys such as cort, so these imported bonuses are ignored or placed under an unused damage type. Reuse the existing getGUMBodyLocationKeysForGCS() and getGCSDrKey() mappings when constructing these features.

Useful? React with 👍 / 👎.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b0154f835c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

<span class="equip-stat-tag">x{{this.system.quantity}}</span>
<span class="equip-stat-tag">{{this.system.total_weight}} kg</span>
{{#if this.system.dr}}<span class="equip-stat-tag shield-tag">RD {{this.system.dr}}</span>{{/if}}
{{#if (eq this.system.uses_mode "charges")}}<span class="equip-stat-tag" title="Cargas restantes">{{this.system.effectiveUsesRemaining}}/{{this.system.effectiveUsesMax}} cargas</span>{{/if}}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Show charge counts on every inventory card

When a charge-based item is carried, stored, or inside any container, its card still exposes the “Consumir / Usar” action but does not show the remaining charges; this badge was added only to equipmentInUseLoose, and a repo-wide search shows no equivalent rendering in the other inventory sections. Consumables are normally carried rather than equipped, so users cannot see their updated charge count after using them without opening the item sheet.

Useful? React with 👍 / 👎.

@V3-code
V3-code merged commit 67f684e into master Oct 4, 2026
1 check passed
@V3-code
V3-code deleted the codex/avaliar-melhorias-no-modificador-de-equipamento-tnhd37 branch October 10, 2026 00:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant