Skip to content

[H] fix pocketdata#266

Merged
TheGoatGod merged 3 commits into
masterfrom
Tools_pocket_data
Jun 8, 2026
Merged

[H] fix pocketdata#266
TheGoatGod merged 3 commits into
masterfrom
Tools_pocket_data

Conversation

@TheGoatGod

Copy link
Copy Markdown
Member

No description provided.

Rewrite tools/fix_pocket_data_volume_limits.py to bump pocket max_contains_volume values up to an object's own top-level volume instead of only targeting specific 20L/20kg pockets. The script no longer requires strict JSON parsing and operates text-preservingly (handles CDDA-style files with comments/trailing commas), scans files/directories recursively, and skips objects with a local TARDIS flag. Added options: --safety-gap-ml, --update-weight (optional realistic max_contains_weight update using --kg-per-liter), --force-all-pockets, and --formatter to run a post-write formatter. Internal changes include regex-based parsing, top-level object/pocket range detection, new FixStats dataclass for reporting, improved unit parsing/formatting helpers, dry-run support, and updated log filename and output messages.
Normalize volume/weight representations across multiple item JSONs: replace many max_contains_volume/max_contains_weight ml/g string values with standardized units (e.g. "20 L" / "20 kg") in Aftershock, Generic_Guns and Xedra_Evolved items; convert artifact weight strings like "1 g" to numeric values (1); and fix activity_noise.volume to numeric values. These changes unify types/units for pockets, magazines and artifact weights to avoid inconsistent parsing.
Replace varied "max_contains_volume" and "max_contains_weight" ml/g values with standardized "20 L" and "20 kg" for MAGAZINE_WELL and related pockets across many mod item files. This normalizes capacity/weight limits for magazines, batteries and holsters to remove inconsistencies and simplify balancing across mods.
@TheGoatGod TheGoatGod self-assigned this Jun 8, 2026
@codeant-ai

codeant-ai Bot commented Jun 8, 2026

Copy link
Copy Markdown

Skipping CodeAnt AI review — this PR changes more than 100 files, which usually means a migration, codemod, or vendored drop. Line-level review on diffs this large produces duplicate findings on the same rewrite pattern and drowns out anything that actually matters.

If you still want a review, comment @codeant-ai : review. For better signal, consider splitting the PR into smaller chunks.

@TheGoatGod TheGoatGod merged commit aa23022 into master Jun 8, 2026
2 checks passed
@TheGoatGod TheGoatGod deleted the Tools_pocket_data branch June 8, 2026 20:39

@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: c1d5ce5423

ℹ️ 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".

"pocket_type": "MAGAZINE_WELL",
"holster": true,
"max_contains_volume": "499 ml",
"max_contains_volume": "20 L",

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 non-TARDIS pocket volume under the item volume

This changes the Browning Hi-Power's magazine-well pocket from just under its own volume (500 ml, line 16) to 20 L without adding TARDIS or increasing the item volume. In the same repo, tools/storage_to_pocket_data.py documents that converted pockets must keep the item's outside volume larger than the pocket capacity to avoid needing TARDIS, so loading this mod can fail validation for this and the other similarly changed guns whose pockets now exceed their item volumes by orders of magnitude.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant