Skip to content

fix!(lua.utils): gamestate enhancement field uses localized text instead of stable key #194

Description

@S1M0N38

Ref: PR #190

Description

After adding an enhancement to a playing card, the modifier.enhancement field in the gamestate response contains the localized text from card.ability.effect (e.g. "BONUS") instead of a stable identifier. This breaks any automation that depends on reading the enhancement type, especially in non-English locales.

Steps to Reproduce

  1. Start a run
  2. Add a playing card with an enhancement: add({"key": "H_A", "enhancement": "BONUS"})
  3. Inspect the gamestate response

Expected Behavior

modifier.enhancement should contain a stable, locale-independent key (e.g. "m_bonus").

Actual Behavior

modifier.enhancement contains "BONUS" — derived from the English string "Bonus Card" via :gsub(" Card", ""). This breaks in other languages.

Environment

  • OS: macOS
  • Lovely version: 0.8.0
  • SMODS version: v1.0.0~BETA-1221a
  • BalatroBot commit: 084044e

Files

Metadata

Metadata

Assignees

Labels

completed-in-devThis issue have been solved in dev branch

Type

No fields configured for Bug.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions