Skip to content

Conversation

@Reuzehagel
Copy link
Contributor

@Reuzehagel Reuzehagel commented Nov 27, 2025

⚠️ Draft PR - Looking for feedback on the approach before marking ready.

Question for maintainers: Is there a preferred way to handle weapons like Kuva variants that don't have weapon-class-specific paths in DE's data? Currently using manual path entries similar to the existing /LongGuns/PrimeStrun pattern.


What did you fix?

Primary weapons were incorrectly typed as "Rifle" when they should have specific weapon class types for mod compatibility:

  • Shotgun: Kuva Hek, Kuva Sobek, Kuva Drakgoon, Kuva Kohm, Vaykor Hek, Drakgoon, Kohm, Sancti Tigris, Tigris Prime, Astilla Prime, Corinth Prime, Cedo Prime, Tenet Arca Plasmor, Mk1-Strun, Bubonico, Convectrix
  • Bow: All weapons in /Bows/ and /Bow/ paths, Mk1-Paris
  • Crossbow: Zhuge, Zhuge Prime, Attica, Nagantaka, Nagantaka Prime
  • Launcher: Ogris, Kuva Ogris, Tonkor, Kuva Tonkor, Penta, Secura Penta, Carmine Penta, Zarr, Kuva Zarr, Torid, Tenet Envoy
  • Speargun: Afentis, Scourge, Scourge Prime, Ferrox, Tenet Ferrox, Javlok
  • Sniper Rifle: Rubico, Rubico Prime, Vectis, Vectis Prime, Lanka, Vulkar, Vulkar Wraith, Snipetron, Snipetron Vandal, Komorex, Sporothrix, Coda Sporothrix, Perigale, Vadarya Prime

These weapons were falling through to the itemType patterns which assigned them "Rifle" type.


Reproduction steps

  1. Run npm run build
  2. Check data/json/Primary.json for weapons like "Kuva Hek", "Paris", "Ogris"
  3. Notice they all have "type": "Rifle" instead of their correct weapon class

Evidence/screenshot/link to line

Reference: https://wiki.warframe.com/w/Template:WeaponNav#Primary

And Discord messages sent by Reuzehagel (Nov 27th 20:48)

The Wiki categorizes these weapons into classes (Shotguns, Bows, Sniper Rifles, etc.) which affects mod compatibility.


Considerations

  • Does this contain a new dependency? No
  • Does this introduce opinionated data formatting or manual data entry? Yes
    • These manual entries are needed because Kuva/Tenet/Prime variants don't have weapon-class-specific paths in DE's data. Open to suggestions if there's a more automated approach.
  • Does this pr include updated data files in a separate commit that can be reverted for a clean code-only pr? No (only config/itemTypes.json is changed, data files are generated)
  • Have I run the linter? Yes
  • Is it a bug fix, feature request, or enhancement? Bug Fix

Summary by CodeRabbit

  • New Features

    • Added new weapon categories (Bow, Launcher, Kitgun, Companion Weapon, Sniper) and greatly expanded weapon coverage across factions, variants and families.
  • Chores

    • Standardized and restructured weapon type labels and ordering (including Sniper and other renames).
    • Expanded pattern-based mappings to improve automatic classification of many weapon variants.
    • Updated tradability rules so Prime Bow/Launcher/Sniper items are evaluated as untradable.

✏️ Tip: You can customize this high-level summary in your review settings.

Changes needed

  • Add /Lotus/Weapons/Grineer/KuvaLich/Secondaries/Stubba/KuvaStubba to dual pistols1
  • Add /Lotus/Weapons/Corpus/LongGuns/CrpArSniper/CrpArSniperRifle to rifle2
  • Change /Lotus/Weapons/Grineer/KuvaLich/Secondaries/ to /KuvaLich/Secondaries/3
  • Add bow, launcher and sniper to the tradable first line Discord

@coderabbitai
Copy link

coderabbitai bot commented Nov 27, 2025

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

📝 Walkthrough

Walkthrough

Added many new weapon category entries to config/itemTypes.json, updated index.d.ts weapon-type literals (added Bow, Launcher, Kitgun, Companion Weapon; replaced Sniper Rifle with Sniper), and included Bow, Launcher, and Sniper in build/tradable.mjs's builtUntradable.

Changes

Cohort / File(s) Summary
Weapon configuration data
config/itemTypes.json
Appended 30+ explicit and regex-based public item-type entries across Pistols, Shotguns, Bows, Launchers, Snipers, and Rifles (KuvaLich secondaries, MK1 series, PrimeStrun moved to PrimeStrunWeapon, many launcher/sniper/rifle entries and regex groups).
Type declarations
index.d.ts
Updated Type / WeaponType unions: removed Crossbow and Speargun; added Bow, Kitgun, Launcher, Companion Weapon; replaced Sniper Rifle with Sniper and adjusted ordering.
Tradable build logic
build/tradable.mjs
Added Bow, Launcher, and Sniper to builtUntradable, causing Prime variants of those types to be treated as untradable by existing tradable logic.

Sequence Diagram(s)

(omitted — changes are data/type additions and a small classification change; no new multi-component control flow to visualize)

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested labels

Scope: Data

Suggested reviewers

  • AyAyEm
  • TobiTenno

Poem

"I hopped through JSON rows tonight,
New bows and guns in tidy sight.
I mapped each regex, filed each name,
A hopping rabbit stamps its claim.
Celebrate the data — carrot-bright delight!" 🐇

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: correcting weapon type classifications in itemTypes.json to fix weapons that were defaulting to 'Rifle'.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1a57bdb and 9b5a64e.

📒 Files selected for processing (1)
  • index.d.ts
🧰 Additional context used
🧠 Learnings (3)
📓 Common learnings
Learnt from: SlayerOrnstein
Repo: WFCD/warframe-items PR: 663
File: config/masterableCategories.json:1-2
Timestamp: 2024-12-03T23:47:24.677Z
Learning: In the 'warframe-items' repository, when suggesting changes to regex patterns in 'config/masterableCategories.json', ensure that added patterns only include items relevant to the current PR context, and avoid adding items not present in the context.
Learnt from: TobiTenno
Repo: WFCD/warframe-items PR: 805
File: build/tradable.mjs:1-1
Timestamp: 2025-12-22T12:16:24.709Z
Learning: In Warframe, Prime variants of Bow, Launcher, and Sniper weapon types are not tradable, just like Prime variants of Rifle, Shotgun, Pistol, and other built weapon types. These types should be included in the builtUntradable array in build/tradable.mjs.
📚 Learning: 2025-12-22T12:16:24.709Z
Learnt from: TobiTenno
Repo: WFCD/warframe-items PR: 805
File: build/tradable.mjs:1-1
Timestamp: 2025-12-22T12:16:24.709Z
Learning: In Warframe, Prime variants of Bow, Launcher, and Sniper weapon types are not tradable, just like Prime variants of Rifle, Shotgun, Pistol, and other built weapon types. These types should be included in the builtUntradable array in build/tradable.mjs.

Applied to files:

  • index.d.ts
📚 Learning: 2024-12-03T23:47:24.677Z
Learnt from: SlayerOrnstein
Repo: WFCD/warframe-items PR: 663
File: config/masterableCategories.json:1-2
Timestamp: 2024-12-03T23:47:24.677Z
Learning: In the 'warframe-items' repository, when suggesting changes to regex patterns in 'config/masterableCategories.json', ensure that added patterns only include items relevant to the current PR context, and avoid adding items not present in the context.

Applied to files:

  • index.d.ts
🔇 Additional comments (1)
index.d.ts (1)

942-945: LGTM! New weapon type literals support classification goals.

The additions of 'Bow', 'Kitgun', 'Launcher', and 'Companion Weapon' to the WeaponType union are appropriate for this PR's objective of correcting weapon type classifications for mod compatibility. These align with the changes being made in config/itemTypes.json and the existing ArcaneType entries (lines 321-323).


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@Reuzehagel Reuzehagel force-pushed the fix/weapon-type-classifications branch from 155b4dd to 0cb49cb Compare November 29, 2025 11:16
@TobiTenno
Copy link
Member

@Reuzehagel please rebase. (DO NOT MERGE UPSTREAM INTO YOUR BRANCH)

@TobiTenno TobiTenno force-pushed the fix/weapon-type-classifications branch from 0cb49cb to 19fc989 Compare November 29, 2025 15:40
@TobiTenno
Copy link
Member

@Reuzehagel i just rebased it, you'll want to pull

@Reuzehagel Reuzehagel marked this pull request as ready for review November 29, 2025 15:47
@Reuzehagel Reuzehagel requested a review from a team as a code owner November 29, 2025 15:47
@Reuzehagel Reuzehagel requested a review from AyAyEm November 29, 2025 15:47
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (2)
index.d.ts (1)

940-956: WeaponType expansion aligns with data; note TS surface-area change

Adding Bow, Crossbow, Launcher, Sniper Rifle, and Speargun (while retaining Kitgun and Companion Weapon) looks correct and matches the new item type mappings, so RivenMod['type'] can now express the intended categories via ${WeaponType} Riven Mod. This is a widening of the exported union, so TS consumers doing exhaustive switch/never checks may see new compile-time cases; worth calling out in release notes or a minor/major bump depending on your versioning policy.

config/itemTypes.json (1)

966-1177: Primary weapon subclass mappings match design; verify ordering and coverage

This block cleanly encodes the intended primary subclasses:

  • Shotguns: Kuva/Vaykor Hek, Kuva Sobek/Drakgoon/Kohm, Drakgoon/Kohm bases, Sancti/Tigris Prime, Astilla/Corinth/Cedo primes, Tenet Arca Plasmor, Mk1-Strun, Bubonico (InfArmCannon), Convectrix (CrpSplitLaser).
  • Bows: Mk1-Paris, all /Bows/ and /Bow/ paths.
  • Crossbows: Zhuge/Zhuge Prime, Attica, Nagantaka/Nagantaka Prime.
  • Launchers: Ogris/Kuva Ogris, Tonkor/Kuva Tonkor, Penta/Secura/Carmine Penta, Zarr/Kuva Zarr, Torid, Tenet Envoy.
  • Spearguns: Afentis, Scourge/Scourge Prime, Javlok (incl. Grineer flame spear variants), Tenet Ferrox.
  • Sniper rifles: Rubico/Rubico Prime, Vectis/Vectis Prime, Lanka, Vulkar/Vulkar Wraith, Snipetron/Vandal, Komorex, Sporothrix/Coda Sporothrix, Perigale, plus the generic sniper paths.

The placements before /LongGunsRifle and ClanTech/.*WeaponRifle look correct to ensure these don’t get typed as generic Rifles instead.

Two follow-ups to consider:

  • Confirm the matcher truly stops on the first hit for non-append entries; if it keeps scanning and overwriting, later generic patterns could still re-type these as Rifle.
  • Double-check whether any base variants (e.g., non-Tenet Ferrox, any newer launcher/speargun/sniper with slightly different paths) are missing and should also get explicit entries alongside these.

If both checks pass, this block should fix the reported mis-typings without collateral reclassification.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c5933af and 19fc989.

📒 Files selected for processing (2)
  • config/itemTypes.json (2 hunks)
  • index.d.ts (1 hunks)
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: SlayerOrnstein
Repo: WFCD/warframe-items PR: 663
File: config/masterableCategories.json:1-2
Timestamp: 2024-12-03T23:47:24.677Z
Learning: In the 'warframe-items' repository, when suggesting changes to regex patterns in 'config/masterableCategories.json', ensure that added patterns only include items relevant to the current PR context, and avoid adding items not present in the context.
📚 Learning: 2024-12-03T23:47:24.677Z
Learnt from: SlayerOrnstein
Repo: WFCD/warframe-items PR: 663
File: config/masterableCategories.json:1-2
Timestamp: 2024-12-03T23:47:24.677Z
Learning: In the 'warframe-items' repository, when suggesting changes to regex patterns in 'config/masterableCategories.json', ensure that added patterns only include items relevant to the current PR context, and avoid adding items not present in the context.

Applied to files:

  • config/itemTypes.json
🔇 Additional comments (1)
config/itemTypes.json (1)

906-931: Secondary classifications look right; confirm Grimoire/Tome intent

The new mappings here look consistent with in-game behavior:

  • /KuvaLich/Secondaries/, VTDetron, and MK1FurisPistol
  • MK1KunaiThrowing
  • Entrati wrist gun and Twin Grakatas → Pistol / Dual Pistols respectively

The only subtle point is /Tenno/Grimoire/Pistol while Tenno/Grimoire later in the file still maps to Tome. Depending on how the matcher walks this array (first-match vs last-match, substring vs regex), one of these will dominate. Please double-check which type you actually want exposed for Grimoire in data/json/Secondary.json and that the matching logic won’t silently pick the unintended one.

@AyAyEm
Copy link
Member

AyAyEm commented Nov 29, 2025

Thanks for the PR always good to fix some mistakes in the data, it seems the type checks were not happy though, gonna check it tomorrow

@TobiTenno
Copy link
Member

well, just on the last error in the list, it's a Bow Mod and it's getting type'd as Bow, so that seems wrong....

Copy link
Member

@AyAyEm AyAyEm left a comment

Choose a reason for hiding this comment

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

First good job i know it takes some time to add these things (if you didn't use ai), most of the additions are okay and could be merged fast but the ones that add a new data type we're gonna to have to discuss them first.

The short and long format for id are not really a thing in the itemTypes.json but using the long format helps in knowing that entry refers to a single item, so long id format should be used here in most entries.

Let's just agree on the already defined types:
Shotgun is basically reserved for weapons that shoots a lot of pellets, that's a shotgun in warframe.
The rifle is a weapon that (in general) shoots one pellet per round and for pratical purposes is basically any weapon that doesn't have a more defined type.

We should discuss the following:
Sniper Rifle should we use just Sniper or Sniper Rifle? Would a sniper be a rifle that has a scope (right click to zoom)?
Pistol would be basically a secondary rifle
Launcher a rifle that shoots a projectile that explodes?
What would the need be in adding speargun and crossbow?

Dont merge the suggestions until @TobiTenno (need your help on this one) puts a thumbs up emoji on them

In retrospect i should have done fewer suggestions with more code in it, it seems github doesnt handle very well this amount of suggestions.

@TobiTenno
Copy link
Member

i agree with the overall suggestions for change, i'm worried that these are all going to perpetuate a pattern of adding individual items into this itemTypes file, which is not the intention. Commonalities in unique names should be found and summarized, and every item should not need to be overridden to have the right type

@AyAyEm
Copy link
Member

AyAyEm commented Nov 30, 2025

I agree with you and i think the same but it's pretty messy sometimes that make any pattern out of it basically impossible, as long as we can figure out a pattern it should take precedence otherwise it's gonna to be messy and there's basically nothing we can do about it (other than not adding these because we dont like it)

@AyAyEm
Copy link
Member

AyAyEm commented Nov 30, 2025

@Reuzehagel please refactor the ids that are meant to a single weapon and ill delete the suggestions, its killing browser performance.

@Reuzehagel
Copy link
Contributor Author

For weapon type definitions:

  • Sniper, scoped primary (with shot combo multiplier), has exclusive mods. Game uses 'Sniper' on mods so I think just Sniper is enough. But the Wiki does classify it as a Sniper Rifle. Point to be made for both.
  • Launcher, explosive projectile weapon, has at least one exclusive mod (Adhesive Blast)
  • Crossbow / Speargun, agreed, these don't need separation. They use rifle mods. I'll remove these and keep them as Rifle.

I'll also refactor the IDs to use the full format as suggested when I get around to it tomorrow.

@Reuzehagel
Copy link
Contributor Author

Lowkey no idea what happened... let me try again

@Reuzehagel Reuzehagel force-pushed the fix/weapon-type-classifications branch from 6231275 to 7d3d59a Compare December 2, 2025 18:36
Copy link
Member

@AyAyEm AyAyEm left a comment

Choose a reason for hiding this comment

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

Please the full format should include the entire uniqueName, don't do rebases with upstream at this point and do not squash commits yet. Also see the previous review i already updated it.

Copilot AI review requested due to automatic review settings December 3, 2025 19:21
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
config/itemTypes.json (1)

967-1043: Consider consolidating individual weapon IDs with regex patterns for performance and maintainability.

This section introduces many entries with individual, fully-qualified weapon paths (e.g., /Lotus/Weapons/Grineer/KuvaLich/LongGuns/Hek/KuvaHekWeapon). While this approach ensures precise matching, it creates maintenance overhead and was flagged by reviewers as potentially harmful to browser performance when representing single weapons.

The code already uses broader pattern-based entries elsewhere in the file (e.g., line 1031–1036 with trailing slashes like /Lotus/Weapons/Tenno/Bows/). Consolidating similar weapon families with regex patterns would improve performance and reduce duplication.

Examples of potential consolidation opportunities:

  • Lines 971–985 (Kuva variants: Hek, Sobek, Drakgoon, Kohm) could use a regex pattern like /(Tenno|Grineer)/KuvaLich/LongGuns/.* with regex: true
  • Lines 1067–1085 (Launcher entries) include several individual paths that might benefit from broader patterns

Consider reviewing the regex suggestions from prior review comments (e.g., AyAyEm's Bow pattern suggestion) and applying similar consolidation here.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7d3d59a and 04c8bba.

📒 Files selected for processing (1)
  • config/itemTypes.json (3 hunks)
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: SlayerOrnstein
Repo: WFCD/warframe-items PR: 663
File: config/masterableCategories.json:1-2
Timestamp: 2024-12-03T23:47:24.677Z
Learning: In the 'warframe-items' repository, when suggesting changes to regex patterns in 'config/masterableCategories.json', ensure that added patterns only include items relevant to the current PR context, and avoid adding items not present in the context.
📚 Learning: 2024-12-03T23:47:24.677Z
Learnt from: SlayerOrnstein
Repo: WFCD/warframe-items PR: 663
File: config/masterableCategories.json:1-2
Timestamp: 2024-12-03T23:47:24.677Z
Learning: In the 'warframe-items' repository, when suggesting changes to regex patterns in 'config/masterableCategories.json', ensure that added patterns only include items relevant to the current PR context, and avoid adding items not present in the context.

Applied to files:

  • config/itemTypes.json
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Agent
🔇 Additional comments (1)
config/itemTypes.json (1)

1087-1137: Verify individual Sniper rifle IDs match game data and cannot be consolidated further.

The Sniper entries mix specific full-path IDs (e.g., lines 1103–1104, 1131–1132) with regex patterns (e.g., lines 1107–1108). Confirm that each individual entry is necessary and that there isn't a shared naming pattern that would allow consolidation (e.g., paths containing Sniper or SniperRifle).

This aligns with the earlier feedback about avoiding per-item overrides where patterns are available.

@Reuzehagel
Copy link
Contributor Author

Sorry for making some mistakes btw. Ive never really used Git, besides having a single branch for some personal things.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes weapon type classifications in the itemTypes.json configuration file to correctly categorize primary weapons by their specific weapon classes (Shotgun, Bow, Sniper, Launcher) instead of defaulting all of them to "Rifle". This is important for mod compatibility in Warframe, as different weapon classes accept different sets of mods. The changes include updates to TypeScript type definitions to add new weapon types ('Bow', 'Launcher', 'Sniper') to the WeaponType union, rename 'Sniper Rifle' to 'Sniper', and remove unused types ('Crossbow', 'Speargun').

Key changes:

  • Added ~230 explicit weapon path mappings for Shotguns, Bows, Launchers, and Snipers that were previously falling through to the generic "Rifle" classification
  • Added 'Bow', 'Launcher', 'Sniper', 'Companion Weapon', and 'Kitgun' to the WeaponType union
  • Renamed 'Sniper Rifle' to 'Sniper' and removed 'Crossbow' and 'Speargun' from ItemType
  • Corrected PrimeStrun path from partial to full weapon path
  • Added explicit mappings for secondary weapons including Kuva Lich variants, MK1 series, Grimoires, and Twin Grakatas

Reviewed changes

Copilot reviewed 1 out of 2 changed files in this pull request and generated 1 comment.

File Description
index.d.ts Updates TypeScript type definitions: adds weapon types to WeaponType union, renames 'Sniper Rifle' to 'Sniper', removes 'Crossbow' and 'Speargun' types
config/itemTypes.json Adds ~240 explicit weapon path mappings to correctly classify Shotguns, Bows, Launchers, Snipers, and various secondary weapons instead of defaulting to "Rifle"

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@AyAyEm
Copy link
Member

AyAyEm commented Dec 7, 2025

@Reuzehagel when you have time, take a look at the requested changes.

@Reuzehagel Reuzehagel force-pushed the fix/weapon-type-classifications branch from a93d671 to 3e4b006 Compare December 9, 2025 14:38
@AyAyEm AyAyEm requested a review from TobiTenno December 9, 2025 15:10
@AyAyEm
Copy link
Member

AyAyEm commented Dec 14, 2025

Added to the description, the first three are in the unresolved comments above the last one is something i told Reuzehagel in the discord channel

auto-merge was automatically disabled December 15, 2025 12:23

Head branch was pushed to by a user without write access

@Reuzehagel Reuzehagel force-pushed the fix/weapon-type-classifications branch from 15d020a to 073493e Compare December 15, 2025 12:23
@Reuzehagel
Copy link
Contributor Author

I keep pressing wrong things lmao. Ill try to update these today

@TobiTenno
Copy link
Member

TobiTenno commented Dec 15, 2025

I added citations w/ links to the description checklist

@Reuzehagel
Copy link
Contributor Author

I added citations w/ links to the description

Yep gonna try to do it rn

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
config/itemTypes.json (1)

1112-1114: Data generation needed: Primary.json must be rebuilt with the new config to apply correct weapon classifications.

The config/itemTypes.json ordering is correct—specific weapon type entries (Shotgun, Sniper, Launcher, Bow) properly precede the /LongGuns catch-all (line 1112). The matching logic uses first-match-wins via a break statement in the parser, so the current ordering will correctly classify weapons. However, Primary.json still reflects old data and needs to be regenerated by running the build script for the new classifications to take effect.

🧹 Nitpick comments (1)
config/itemTypes.json (1)

967-1047: Consider consolidating explicit shotgun entries into regex patterns.

While the explicit entries ensure correct classification, many follow predictable patterns that could be consolidated:

  1. Kuva Lich shotguns (lines 971-985): All follow /Lotus/Weapons/Grineer/KuvaLich/LongGuns/*/
  2. Prime shotguns (lines 1003-1017): Multiple follow /Lotus/Weapons/Tenno/LongGuns/Prime*/

Consolidating into patterns would reduce the entry count while maintaining correct classification, aligning with the maintainer feedback to "find common naming patterns to summarize groups instead of individual entries."

Example consolidation:

-  {
-    "id": "/Lotus/Weapons/Grineer/KuvaLich/LongGuns/Hek/KuvaHekWeapon",
-    "name": "Shotgun"
-  },
-  {
-    "id": "/Lotus/Weapons/Grineer/KuvaLich/LongGuns/Sobek/KuvaSobek",
-    "name": "Shotgun"
-  },
-  {
-    "id": "/Lotus/Weapons/Grineer/KuvaLich/LongGuns/Drakgoon/KuvaDrakgoon",
-    "name": "Shotgun"
-  },
-  {
-    "id": "/Lotus/Weapons/Grineer/KuvaLich/LongGuns/Kohm/KuvaKohm",
-    "name": "Shotgun"
-  },
+  {
+    "id": "/Lotus/Weapons/Grineer/KuvaLich/LongGuns/(Hek|Sobek|Drakgoon|Kohm)/",
+    "regex": true,
+    "name": "Shotgun"
+  },

Based on learnings, ensure patterns only include weapons present in the current context to avoid false matches.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 15d020a and 073493e.

📒 Files selected for processing (2)
  • config/itemTypes.json (2 hunks)
  • index.d.ts (2 hunks)
🧰 Additional context used
🧠 Learnings (3)
📓 Common learnings
Learnt from: SlayerOrnstein
Repo: WFCD/warframe-items PR: 663
File: config/masterableCategories.json:1-2
Timestamp: 2024-12-03T23:47:24.677Z
Learning: In the 'warframe-items' repository, when suggesting changes to regex patterns in 'config/masterableCategories.json', ensure that added patterns only include items relevant to the current PR context, and avoid adding items not present in the context.
📚 Learning: 2024-12-03T23:47:24.677Z
Learnt from: SlayerOrnstein
Repo: WFCD/warframe-items PR: 663
File: config/masterableCategories.json:1-2
Timestamp: 2024-12-03T23:47:24.677Z
Learning: In the 'warframe-items' repository, when suggesting changes to regex patterns in 'config/masterableCategories.json', ensure that added patterns only include items relevant to the current PR context, and avoid adding items not present in the context.

Applied to files:

  • config/itemTypes.json
📚 Learning: 2025-11-28T01:41:19.914Z
Learnt from: SlayerOrnstein
Repo: WFCD/warframe-items PR: 778
File: build/parser.mjs:568-574
Timestamp: 2025-11-28T01:41:19.914Z
Learning: In the WFCD/warframe-items repository, for Nightwave Act processing, the regex difference between `build/parser.mjs` (using `/[0-9]{1,3}$/` with anchor) and `build/build.mjs` (using `/[0-9]{1,3}/` without anchor) is intentional and serves different purposes in each file.

Applied to files:

  • config/itemTypes.json
🔇 Additional comments (5)
index.d.ts (1)

321-323: LGTM: Bow arcane type addition is appropriate.

The addition of 'Bow' to the ArcaneType union is consistent with the existing weapon-specific arcane types (Shotgun, Sniper) and aligns with the PR's goal of properly classifying bow weapons.

config/itemTypes.json (4)

906-937: LGTM: Pistol classifications use appropriate patterns and full paths.

The pistol entries properly use:

  • Pattern-based matching for Kuva Lich secondaries (line 906-909)
  • Full path format for performance (addressing earlier maintainer feedback)
  • Correct typing for edge cases (e.g., MK1Kunai as "Throwing")

1027-1039: LGTM: Bow classifications properly use regex patterns.

The bow entries demonstrate the preferred approach:

  • Regex patterns for broad matching (Tenno/Grineer/Corpus/Syndicate variants)
  • Minimal explicit entries for edge cases (MK1Paris)

This aligns well with the maintainer guidance to prefer patterns over per-item entries.


1048-1080: LGTM: Launcher classifications balance patterns and explicit entries.

The launcher entries use:

  • Regex pattern for common grenade/cannon launchers (line 1049-1052)
  • Explicit entries for special cases and Kuva variants

The Launcher type is justified based on exclusive mod compatibility (e.g., Adhesive Blast) as discussed in past review comments.


1081-1110: LGTM: Sniper classifications appropriately combine patterns and explicit entries.

The sniper entries use:

  • Regex patterns to match standard sniper paths (lines 1082-1090)
  • Explicit entries for Prime/special variants that don't match patterns

The Sniper type is justified based on scoped functionality and exclusive mod compatibility as verified in past review comments.

@Reuzehagel Reuzehagel force-pushed the fix/weapon-type-classifications branch from 073493e to 235c44d Compare December 15, 2025 12:37
@Reuzehagel
Copy link
Contributor Author

Wait that undid the regex changes...

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 3

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 073493e and 235c44d.

📒 Files selected for processing (3)
  • build/tradable.mjs (1 hunks)
  • config/itemTypes.json (2 hunks)
  • index.d.ts (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • index.d.ts
🧰 Additional context used
🧠 Learnings (3)
📓 Common learnings
Learnt from: SlayerOrnstein
Repo: WFCD/warframe-items PR: 663
File: config/masterableCategories.json:1-2
Timestamp: 2024-12-03T23:47:24.677Z
Learning: In the 'warframe-items' repository, when suggesting changes to regex patterns in 'config/masterableCategories.json', ensure that added patterns only include items relevant to the current PR context, and avoid adding items not present in the context.
📚 Learning: 2024-12-03T23:47:24.677Z
Learnt from: SlayerOrnstein
Repo: WFCD/warframe-items PR: 663
File: config/masterableCategories.json:1-2
Timestamp: 2024-12-03T23:47:24.677Z
Learning: In the 'warframe-items' repository, when suggesting changes to regex patterns in 'config/masterableCategories.json', ensure that added patterns only include items relevant to the current PR context, and avoid adding items not present in the context.

Applied to files:

  • config/itemTypes.json
📚 Learning: 2025-11-28T01:41:19.914Z
Learnt from: SlayerOrnstein
Repo: WFCD/warframe-items PR: 778
File: build/parser.mjs:568-574
Timestamp: 2025-11-28T01:41:19.914Z
Learning: In the WFCD/warframe-items repository, for Nightwave Act processing, the regex difference between `build/parser.mjs` (using `/[0-9]{1,3}$/` with anchor) and `build/build.mjs` (using `/[0-9]{1,3}/` without anchor) is intentional and serves different purposes in each file.

Applied to files:

  • config/itemTypes.json
🔇 Additional comments (4)
build/tradable.mjs (1)

1-1: LGTM!

Adding Bow, Launcher, and Sniper to the untradable types list is consistent with the new weapon classifications. The tradableConditions function on line 2 will correctly allow Prime variants of these types to be tradable while keeping base variants untradable.

config/itemTypes.json (3)

906-941: Secondary weapon classifications look reasonable.

The combination of the /KuvaLich/Secondaries/ pattern (lines 911-912) with specific overrides for dual pistols and unique weapon paths appears appropriate. Individual entries for MK1-series and special weapons are justified given they lack common path patterns.


1143-1145: Verify classification of Ambassador/Komorex as Rifle vs. Sniper.

Line 1143 explicitly classifies CrpArSniper as Rifle rather than Sniper. Based on past review comments, there was discussion about whether Ambassador should be Rifle. Please confirm this is intentional and aligns with in-game mod compatibility.


1031-1040: Bow pattern entries are sound.

The bow patterns (/Lotus/Weapons/Tenno/Bows/ and /Lotus/Weapons/Tenno/Bow/) are correctly placed since bow weapon paths do not contain /LongGuns/ in their structure. The entries will not be caught by any /LongGuns catch-all patterns at line 1147.

@Reuzehagel
Copy link
Contributor Author

I am so confused again ngl, was my branch out of date and did I recommit those things or something?

@TobiTenno
Copy link
Member

yeah, that's what it seems like

@TobiTenno
Copy link
Member

ack, sorry i haven't rebased yet.

@Reuzehagel Reuzehagel force-pushed the fix/weapon-type-classifications branch from 235c44d to 073493e Compare December 20, 2025 13:44
@TobiTenno TobiTenno force-pushed the fix/weapon-type-classifications branch from 073493e to 1848643 Compare December 20, 2025 19:08
- Add KuvaStubba as Dual Pistols
- Classify CrpArSniperRifle as Rifle
- Simplify KuvaLich Secondaries path
- Add Bow, Launcher, and Sniper to untradable built weapons
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

♻️ Duplicate comments (1)
config/itemTypes.json (1)

971-1118: CRITICAL: Ordering issue causes all specific weapon classifications to be overridden by the /LongGuns catch-all.

All weapon entries added here (lines 971-1118) contain /LongGuns/ in their paths and will therefore match the generic /LongGuns → Rifle rule at line 1120. Due to last-match-wins behavior (confirmed in past review discussions), every weapon in this section will be classified as "Rifle" regardless of their explicit Shotgun/Bow/Launcher/Sniper assignments, completely defeating the purpose of this PR.

Past review comments confirmed this issue by examining generated artifacts, and reviewers have requested pattern-based consolidation instead of individual entries.

Solution (aligning with reviewer feedback):

  1. Move the /LongGuns catch-all to line 970 (before all specific entries) to establish the Rifle default first
  2. Replace individual weapon entries with consolidated regex patterns placed after the catch-all so they override it:
{
  "id": "/LongGuns",
  "name": "Rifle"
},
{
  "id": "/LongGuns/.*(Hek|Sobek|Drakgoon|Kohm|Tigris|Strun|Astilla|Corinth|Cedo|Boar|ArcaPlasmor|InfArmCannon|CrpSplitLaser)",
  "regex": true,
  "name": "Shotgun"
},
{
  "id": "/Bows?/",
  "regex": true,
  "name": "Bow"
},
{
  "id": "/LongGuns/.*(Ogris|Tonkor|Zarr|Penta|Launcher|Grenade|Cannon|RocketLauncher|BioWeapon)",
  "regex": true,
  "name": "Launcher"
},
{
  "id": "/LongGuns/.*(Sniper|Rubico|Vectis|Lanka|Vulkar|Sporothrix|Perigale|Vadarya|Komorex|Railgun)",
  "regex": true,
  "name": "Sniper"
}

This approach:

  • Establishes Rifle as the default via the catch-all
  • Uses pattern-based rules that win via last-match-wins
  • Drastically reduces per-item entries as requested by reviewers
  • Ensures correct weapon classifications

Based on learnings: In the 'warframe-items' repository, when suggesting changes to regex patterns, ensure that added patterns only include items relevant to the current PR context.

📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1848643 and 0842560.

📒 Files selected for processing (2)
  • build/tradable.mjs (1 hunks)
  • config/itemTypes.json (2 hunks)
🧰 Additional context used
🧠 Learnings (3)
📓 Common learnings
Learnt from: SlayerOrnstein
Repo: WFCD/warframe-items PR: 663
File: config/masterableCategories.json:1-2
Timestamp: 2024-12-03T23:47:24.677Z
Learning: In the 'warframe-items' repository, when suggesting changes to regex patterns in 'config/masterableCategories.json', ensure that added patterns only include items relevant to the current PR context, and avoid adding items not present in the context.
📚 Learning: 2024-12-03T23:47:24.677Z
Learnt from: SlayerOrnstein
Repo: WFCD/warframe-items PR: 663
File: config/masterableCategories.json:1-2
Timestamp: 2024-12-03T23:47:24.677Z
Learning: In the 'warframe-items' repository, when suggesting changes to regex patterns in 'config/masterableCategories.json', ensure that added patterns only include items relevant to the current PR context, and avoid adding items not present in the context.

Applied to files:

  • config/itemTypes.json
📚 Learning: 2025-11-28T01:41:19.914Z
Learnt from: SlayerOrnstein
Repo: WFCD/warframe-items PR: 778
File: build/parser.mjs:568-574
Timestamp: 2025-11-28T01:41:19.914Z
Learning: In the WFCD/warframe-items repository, for Nightwave Act processing, the regex difference between `build/parser.mjs` (using `/[0-9]{1,3}$/` with anchor) and `build/build.mjs` (using `/[0-9]{1,3}/` without anchor) is intentional and serves different purposes in each file.

Applied to files:

  • config/itemTypes.json
🔇 Additional comments (1)
config/itemTypes.json (1)

906-941: LGTM - Secondary weapon mappings use appropriate specificity.

The secondary weapon entries correctly use explicit paths where needed and include a pattern-based rule for KuvaLich Secondaries (lines 906-909), which aligns well with the reviewers' preference for patterns over per-item entries.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (2)
config/itemTypes.json (2)

967-1047: Consider consolidating shotgun families with regex patterns.

While the ordering is correct, the shotgun entries could be condensed using weapon-family patterns to reduce maintenance burden. For example, consolidate Hek/Tigris/Drakgoon/Kohm families:

{
  "id": "/(Hek|Tigris|Drakgoon|Kohm|Strun|Astilla|Corinth|Cedo|ArcaPlasmor|FlakCannon|SparkRifle|InfArmCannon|SplitLaser)(/|Weapon|Rifle|$)",
  "regex": true,
  "name": "Shotgun"
}

This single pattern could replace many individual entries. However, if DE's data paths are too inconsistent (as noted in PR discussion), explicit entries may be necessary.

Balancing pattern vs explicit entries

Per maintainer feedback, prefer patterns over per-item overrides where possible. However, acknowledge that DE data inconsistencies may require manual entries when no reliable pattern exists.


1049-1080: Good regex pattern; consider consolidating KuvaLich launcher variants.

The regex at lines 1049-1052 for Grenade|Cannon is effective. The KuvaLich entries (lines 1070-1080) could be consolidated:

{
  "id": "/KuvaLich/LongGuns/(Tonkor|Ogris|Zarr)/",
  "regex": true,
  "name": "Launcher"
}

This would reduce three explicit entries to one pattern, improving maintainability.

📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0842560 and d7999ec.

📒 Files selected for processing (2)
  • build/tradable.mjs
  • config/itemTypes.json
🧰 Additional context used
🧠 Learnings (4)
📓 Common learnings
Learnt from: SlayerOrnstein
Repo: WFCD/warframe-items PR: 663
File: config/masterableCategories.json:1-2
Timestamp: 2024-12-03T23:47:24.677Z
Learning: In the 'warframe-items' repository, when suggesting changes to regex patterns in 'config/masterableCategories.json', ensure that added patterns only include items relevant to the current PR context, and avoid adding items not present in the context.
Learnt from: TobiTenno
Repo: WFCD/warframe-items PR: 805
File: build/tradable.mjs:1-1
Timestamp: 2025-12-22T12:16:24.709Z
Learning: In Warframe, Prime variants of Bow, Launcher, and Sniper weapon types are not tradable, just like Prime variants of Rifle, Shotgun, Pistol, and other built weapon types. These types should be included in the builtUntradable array in build/tradable.mjs.
📚 Learning: 2025-12-22T12:16:24.709Z
Learnt from: TobiTenno
Repo: WFCD/warframe-items PR: 805
File: build/tradable.mjs:1-1
Timestamp: 2025-12-22T12:16:24.709Z
Learning: In Warframe, Prime variants of Bow, Launcher, and Sniper weapon types are not tradable, just like Prime variants of Rifle, Shotgun, Pistol, and other built weapon types. These types should be included in the builtUntradable array in build/tradable.mjs.

Applied to files:

  • build/tradable.mjs
  • config/itemTypes.json
📚 Learning: 2024-12-03T23:47:24.677Z
Learnt from: SlayerOrnstein
Repo: WFCD/warframe-items PR: 663
File: config/masterableCategories.json:1-2
Timestamp: 2024-12-03T23:47:24.677Z
Learning: In the 'warframe-items' repository, when suggesting changes to regex patterns in 'config/masterableCategories.json', ensure that added patterns only include items relevant to the current PR context, and avoid adding items not present in the context.

Applied to files:

  • build/tradable.mjs
  • config/itemTypes.json
📚 Learning: 2025-11-28T01:41:19.914Z
Learnt from: SlayerOrnstein
Repo: WFCD/warframe-items PR: 778
File: build/parser.mjs:568-574
Timestamp: 2025-11-28T01:41:19.914Z
Learning: In the WFCD/warframe-items repository, for Nightwave Act processing, the regex difference between `build/parser.mjs` (using `/[0-9]{1,3}$/` with anchor) and `build/build.mjs` (using `/[0-9]{1,3}/` without anchor) is intentional and serves different purposes in each file.

Applied to files:

  • build/tradable.mjs
  • config/itemTypes.json
🔇 Additional comments (4)
build/tradable.mjs (1)

1-12: LGTM! Correct addition of weapon types to untradable list.

Adding Bow, Launcher, and Sniper to builtUntradable correctly ensures their Prime variants remain untradable, consistent with existing built weapon types like Rifle, Shotgun, and Pistol.

Based on learnings, Prime variants of Bow, Launcher, and Sniper weapon types are not tradable in Warframe.

config/itemTypes.json (3)

906-937: Correct ordering for first-match-wins logic.

The KuvaLich/Secondaries/ default (lines 907-909) is correctly placed before the specific KuvaStubba entry (lines 935-937). Per the type-matching logic shared by maintainers, the first matching pattern is applied and processing stops, so this ordering ensures KuvaStubba matches the Dual Pistols rule at line 935 rather than falling through to the Pistol default at line 908.


967-1118: Ordering is correct for first-match-wins logic.

The specific weapon entries (lines 967-1114) are correctly placed BEFORE the generic /LongGuns → Rifle catch-all (line 1116). Per maintainer clarification, the type-matching logic finds the first match and breaks, so this ordering ensures specific classifications take precedence over the generic default.

While the ordering is sound, several consolidation opportunities exist (flagged in separate comments) that could reduce the number of per-item entries, as preferred by maintainers.


1082-1114: The explicit sniper entries (lines 1091-1110) are necessary and cannot be consolidated. Verification shows that none of these weapon paths match the existing regex patterns:

  • Railgun lacks "Sniper" in its path structure
  • RubicoPrime, PrimeLightningGun, and PrimeVectis use alternate naming conventions (ending with "Weapon" or "Rifle" rather than containing "Sniper")
  • CodaSporothrix has no sniper indicator in its path

These explicit entries are the only mechanism to classify these weapons as snipers, placed correctly before the /LongGuns catch-all. The current implementation is sound.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

♻️ Duplicate comments (2)
index.d.ts (1)

813-900: Critical: Regenerate data files to complete 'Sniper Rifle' → 'Sniper' migration.

Per previous review findings, the Type union literal was changed from 'Sniper Rifle' to 'Sniper', but 63 references remain in generated data files (Primary.json, Mods.json, Arcanes.json, All.json, etc.). Run npm run build to regenerate all data files and ensure runtime values match these updated TypeScript definitions.

Additionally, reviewers noted that some additions here may be redundant with the WeaponType union. Confirm whether all additions at lines 813-900 are necessary or if some should rely solely on the WeaponType union reference at line 899.

config/itemTypes.json (1)

906-937: Refactor: Consolidate duplicate Grimoire entries.

The Pistol section correctly orders specific overrides (KuvaStubba, line 907-909) before the generic KuvaLich/Secondaries pattern (line 911-913). However, per previous reviewer feedback, the Grimoire entry at lines 927-929 can be simplified to a single pattern.

🔎 Suggested consolidation

Replace lines 927-929 with:

  {
-    "id": "/Weapons/Tenno/Grimoire/",
+    "id": "/Weapons/Tenno/Grimoire/",
    "name": "Pistol"
  },

(Removing any duplicate Grimoire entries if they exist elsewhere)

Based on past review comments.

🧹 Nitpick comments (3)
config/itemTypes.json (3)

1049-1080: Consider additional pattern consolidation for Launcher entries.

While the Launcher section includes a regex pattern at lines 1049-1052, it still contains many per-item entries (lines 1054-1080). Per reviewer guidance to minimize individual overrides, these could be consolidated into a more comprehensive pattern.

🔎 Suggested pattern consolidation

Consider replacing lines 1054-1080 with an expanded regex that matches launcher weapon families:

{
  "id": "/(Ogris|Tonkor|Zarr|Penta|Launcher|Grenade|Cannon|RocketLauncher|BioWeapon|Briefcase)",
  "regex": true,
  "name": "Launcher"
}

This would capture most launchers and reduce maintenance burden. Keep per-item entries only for edge cases that don't match common patterns.

Based on reviewer feedback preferring pattern-based rules.


1082-1114: Sniper section: Ambassador exception is correct, but consider further consolidation.

The explicit classification of Ambassador (CrpArSniper) as Rifle (lines 1082-1084) correctly implements previous reviewer discussion. The regex patterns at lines 1086-1094 are good, but the remaining per-item entries (lines 1096-1114) could be consolidated.

🔎 Suggested pattern consolidation

Consider adding a single regex after the existing patterns to capture remaining sniper families:

{
  "id": "/(Sniper|Rubico|Vectis|Lanka|Vulkar|Sporothrix|Perigale|Vadarya|Komorex|Railgun|LightningGun)",
  "regex": true,
  "name": "Sniper"
}

This would reduce the need for explicit entries for each Prime/Kuva/Tenet variant.

Based on reviewer feedback preferring pattern-based rules.


967-1047: Consider consolidating repeated Shotgun family entries into pattern-based rules for maintainability.

The individual Shotgun entries (lines 967-1025, 1041-1047) are correctly positioned before the /LongGuns catch-all (line 1116) and the paths match the actual weapon uniqueName values, so they will classify correctly once the build is run. However, consolidating similar weapons into regex patterns would reduce maintenance burden and improve readability.

For example, weapons like Hek, Sobek, Drakgoon, Kohm, Tigris, Strun, Astilla, Corinth, Cedo, ArcaPlasmor, InfArmCannon, and CrpSplitLaser could be matched by their distinctive names using a single pattern rather than individual entries.

📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d7999ec and 1a57bdb.

📒 Files selected for processing (2)
  • config/itemTypes.json
  • index.d.ts
🧰 Additional context used
🧠 Learnings (4)
📓 Common learnings
Learnt from: SlayerOrnstein
Repo: WFCD/warframe-items PR: 663
File: config/masterableCategories.json:1-2
Timestamp: 2024-12-03T23:47:24.677Z
Learning: In the 'warframe-items' repository, when suggesting changes to regex patterns in 'config/masterableCategories.json', ensure that added patterns only include items relevant to the current PR context, and avoid adding items not present in the context.
Learnt from: TobiTenno
Repo: WFCD/warframe-items PR: 805
File: build/tradable.mjs:1-1
Timestamp: 2025-12-22T12:16:24.709Z
Learning: In Warframe, Prime variants of Bow, Launcher, and Sniper weapon types are not tradable, just like Prime variants of Rifle, Shotgun, Pistol, and other built weapon types. These types should be included in the builtUntradable array in build/tradable.mjs.
📚 Learning: 2025-12-22T12:16:24.709Z
Learnt from: TobiTenno
Repo: WFCD/warframe-items PR: 805
File: build/tradable.mjs:1-1
Timestamp: 2025-12-22T12:16:24.709Z
Learning: In Warframe, Prime variants of Bow, Launcher, and Sniper weapon types are not tradable, just like Prime variants of Rifle, Shotgun, Pistol, and other built weapon types. These types should be included in the builtUntradable array in build/tradable.mjs.

Applied to files:

  • index.d.ts
  • config/itemTypes.json
📚 Learning: 2024-12-03T23:47:24.677Z
Learnt from: SlayerOrnstein
Repo: WFCD/warframe-items PR: 663
File: config/masterableCategories.json:1-2
Timestamp: 2024-12-03T23:47:24.677Z
Learning: In the 'warframe-items' repository, when suggesting changes to regex patterns in 'config/masterableCategories.json', ensure that added patterns only include items relevant to the current PR context, and avoid adding items not present in the context.

Applied to files:

  • index.d.ts
  • config/itemTypes.json
📚 Learning: 2025-11-28T01:41:19.914Z
Learnt from: SlayerOrnstein
Repo: WFCD/warframe-items PR: 778
File: build/parser.mjs:568-574
Timestamp: 2025-11-28T01:41:19.914Z
Learning: In the WFCD/warframe-items repository, for Nightwave Act processing, the regex difference between `build/parser.mjs` (using `/[0-9]{1,3}$/` with anchor) and `build/build.mjs` (using `/[0-9]{1,3}/` without anchor) is intentional and serves different purposes in each file.

Applied to files:

  • config/itemTypes.json
🔇 Additional comments (2)
index.d.ts (1)

939-953: LGTM! WeaponType union properly updated for new classifications.

The additions of 'Bow', 'Launcher', 'Sniper', 'Kitgun', and 'Companion Weapon' align with the PR's goal to correct weapon type classifications. The replacement of 'Sniper Rifle' with 'Sniper' is consistent with the broader changes.

Per retrieved learnings, Prime variants of Bow, Launcher, and Sniper should be marked untradable in build/tradable.mjs, which appears to have been addressed.

config/itemTypes.json (1)

1027-1039: LGTM! Bow classification uses pattern-based approach.

The Bow entries properly leverage regex patterns (lines 1031-1039) to match weapon families rather than listing individual weapons. The specific MK1Paris entry (line 1027-1029) is appropriately placed before the broader patterns.

This approach aligns with reviewer guidance to prefer patterns over per-item entries.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
index.d.ts (1)

813-813: Remove redundant Type union entries already covered by WeaponType.

Lines 813 ('Bow'), 817 ('Companion Weapon'), and 848 ('Launcher') add literals to the Type union that are also being added to WeaponType (lines 942-945). Since Type already includes WeaponType at line 898, these explicit additions are redundant and create unnecessary maintenance overhead.

Based on past review comments, these should be removed.

🔎 Proposed fix

Remove the three redundant lines from the Type union:

  | 'Boosters'
- | 'Bow'
  | 'Captura'
  | 'Color Palette'
- | 'Companion Weapon'
  | 'Conservation Tag'
  | 'Kubrow'
- | 'Launcher'
  | 'Medallion'

These types will still be included in Type through the WeaponType union at line 898.

Also applies to: 817-817, 848-848

♻️ Duplicate comments (1)
index.d.ts (1)

951-951: Duplicate: 'Sniper Rifle' → 'Sniper' migration requires data file regeneration.

This change from 'Sniper Rifle' to 'Sniper' in the TypeScript definitions has already been flagged in a previous review comment. The generated data files (Primary.json, Mods.json, Arcanes.json, All.json, etc.) still contain 63 references to 'Sniper Rifle', creating a type-safety violation.

Run npm run build to regenerate all data files so runtime values match the TypeScript definitions.

📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1a57bdb and 9b5a64e.

📒 Files selected for processing (1)
  • index.d.ts
🧰 Additional context used
🧠 Learnings (3)
📓 Common learnings
Learnt from: SlayerOrnstein
Repo: WFCD/warframe-items PR: 663
File: config/masterableCategories.json:1-2
Timestamp: 2024-12-03T23:47:24.677Z
Learning: In the 'warframe-items' repository, when suggesting changes to regex patterns in 'config/masterableCategories.json', ensure that added patterns only include items relevant to the current PR context, and avoid adding items not present in the context.
Learnt from: TobiTenno
Repo: WFCD/warframe-items PR: 805
File: build/tradable.mjs:1-1
Timestamp: 2025-12-22T12:16:24.709Z
Learning: In Warframe, Prime variants of Bow, Launcher, and Sniper weapon types are not tradable, just like Prime variants of Rifle, Shotgun, Pistol, and other built weapon types. These types should be included in the builtUntradable array in build/tradable.mjs.
📚 Learning: 2025-12-22T12:16:24.709Z
Learnt from: TobiTenno
Repo: WFCD/warframe-items PR: 805
File: build/tradable.mjs:1-1
Timestamp: 2025-12-22T12:16:24.709Z
Learning: In Warframe, Prime variants of Bow, Launcher, and Sniper weapon types are not tradable, just like Prime variants of Rifle, Shotgun, Pistol, and other built weapon types. These types should be included in the builtUntradable array in build/tradable.mjs.

Applied to files:

  • index.d.ts
📚 Learning: 2024-12-03T23:47:24.677Z
Learnt from: SlayerOrnstein
Repo: WFCD/warframe-items PR: 663
File: config/masterableCategories.json:1-2
Timestamp: 2024-12-03T23:47:24.677Z
Learning: In the 'warframe-items' repository, when suggesting changes to regex patterns in 'config/masterableCategories.json', ensure that added patterns only include items relevant to the current PR context, and avoid adding items not present in the context.

Applied to files:

  • index.d.ts
🔇 Additional comments (1)
index.d.ts (1)

942-945: LGTM! New weapon type literals support classification goals.

The additions of 'Bow', 'Kitgun', 'Launcher', and 'Companion Weapon' to the WeaponType union are appropriate for this PR's objective of correcting weapon type classifications for mod compatibility. These align with the changes being made in config/itemTypes.json and the existing ArcaneType entries (lines 321-323).

@TobiTenno TobiTenno merged commit 4ca90b9 into WFCD:master Dec 26, 2025
10 checks passed
@wfcd-bot-boi
Copy link
Collaborator

🎉 This PR is included in version 1.1272.87 🎉

The release is available on:

Your semantic-release bot 📦🚀

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.

4 participants