Skip to content

[REQUEST] Separate ::Const.Items.WeaponType keys from strings matching categories #462

@Suor

Description

@Suor

Is your feature request related to a problem? Please describe.

If one tries to use MSU's .isWeaponType() with translated items, then that fails, which leads to some weapon specific skills, i.e. Reforged perks not working. The trick like this fixes the detection for russian language, however, it adds extra entries to ::Const.Items.WeaponType, which might result in unintended consequences when this table will be used to enumerate weapon types, by code like this - double mastery entries in this case:

Image

It looks like using ::Const.Items.WeaponType table as a reference of all weapon types and at the same type as a collection of string keys matching categories leads to this issue. Removing all english keys and only leaving russian or whatever the target language is also problematic, will break any mod that has untranslated weapons and may also cause other unpredictable bugs.

Describe the solution you'd like

Separate ::Const.Items.WeaponType and some category to type map. Then translation mods might safely add to this new ::Consts.Items.CategoryToWeaponType and be good.

Describe alternatives you've considered

One might switcheroo weapon.buildCategoriesFromWeaponType() or patch up the effects after, i.e. weapon.getTooltip() for Reforged. But the second one is not universal, will need to handle every mod and place and the first one is a switcheroo.

Also, both are too tricky for the most translators, who are not coders, while translating ::Const.Items.WeaponTypeName and adding to ::Consts.Items.CategoryToWeaponType are way more approachable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature requestA feature requested by the community

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions