Cataclysm-DDA icon indicating copy to clipboard operation
Cataclysm-DDA copied to clipboard

Two `effect_type` with the same `id` are not detected

Open RedMisao opened this issue 2 months ago • 2 comments

Describe the bug

Title. In other words, two effects with the same ID aren't detected by the game. In other words, it doesn't prevent loading, like it happens for other JSON types with the same ID.

Attach save file

N/A, this should cause an error and it is not, so it's undetectable unless you're looking for it in the repo

Steps to reproduce

Either load this as a mod, or copy and paste the two effects somewhere in data\json\effects.json

[
  {
    "type": "MOD_INFO",
    "id": "TEST_MOD",
    "name": "TEST MOD",
    "authors": [ "TEST MOD" ],
    "description": "TEST MOD.",
    "category": "AAA",
    "dependencies": [ "dda" ]
  },
  {
    "id": "effect_1",
    "type": "effect_type",
    "name": [ "" ],
    "desc": [ "" ],
    "max_intensity": 1,
    "max_effective_intensity": 1
  },
  {
    "id": "effect_1",
    "type": "effect_type",
    "name": [ "" ],
    "desc": [ "" ],
    "max_intensity": 1,
    "max_effective_intensity": 1
  }
]

Expected behavior

I expected the game not loading, with the usual: "Error: id (struct type) has two definitions from the same source (mod)!"

Screenshots

N/A, the game seems to not detect it.

Versions and configuration

  • OS: Windows
    • OS Version: 10.0.19044.2965 (21H2)
  • Game Version: ad13310 [64-bit]
  • Graphics Version: Tiles
  • Game Language: System language []
  • Mods loaded: [ Dark Days Ahead [dda], Disable NPC Needs [no_npc_food], Portal Storms Ignore NPCs [personal_portal_storms], Slowdown Fungal Growth [no_fungal_growth] ]

Additional context

Adding names and descriptions makes no difference.

Could be related to #51456, seems effect_type are handled different from other objects?

RedMisao avatar Nov 28 '24 20:11 RedMisao