Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Name as an object not supported for body_part type #37697

Closed
snipercup opened this issue Feb 4, 2020 · 1 comment · Fixed by #37807
Closed

Name as an object not supported for body_part type #37697

snipercup opened this issue Feb 4, 2020 · 1 comment · Fixed by #37807
Labels

Comments

@snipercup
Copy link
Contributor

snipercup commented Feb 4, 2020

Describe the bug

Writing the body_part name as "name": { "str": "right arm", "str_pl": "arms" },
produces this error:
DEBUG : Error: data/mods//dda/../../json/body_parts.json: line 71:13: Expected string

"id": "arm_l",
"type": "body_part",
"name": {
        ^
          "str": "left arm", "str_pl": "arms" },
"heading_singular": "L. Arm",
"heading_plural": "Arms",

FUNCTION : bool main_menu::load_character_tab(bool)
FILE : src/main_menu.cpp
LINE : 1069

Steps To Reproduce

Steps to reproduce the behavior:

  1. Write "name": { "str": "right arm", "str_pl": "arms" }, in a body_part
  2. Remove name_plural property
  3. Start a game
  4. Observe error

Expected behavior

Accepting the name as an object

Versions and configuration

  • OS: Windows
    • OS Version: MINGW/CYGWIN/MSYS2 on unknown Windows version
  • Game Version: 0.D-11806-g9df6c1607d [64-bit]
  • Graphics Version: Tiles
  • Mods loaded: [
    Dark Days Ahead [dda],
    Disable NPC Needs [no_npc_food],
    Aftershock [aftershock],
    C.R.I.T Expansion Mod [crt_expansion],
    Magiclysm [magiclysm],
    Bens GF recipes [Tolerate_This],
    Craftable Gun Pack [craftgp],
    DeadLeaves' Fictional Guns [FIC_Weapons],
    Garden Pots [growable-pots],
    Icecoon's Arsenal [ew_pack],
    Makeshift Items Mod [makeshift],
    Medieval and Historic Classes and Shields [Medieval_Stuff],
    More Survival Tools [More_Survival_Tools],
    Mythological Replicas [nw_pack],
    DinoMod [DinoMod],
    Modular Turrets [modular_turrets],
    Salvaged Robots [Salvaged_Robots],
    Mutant NPCs [mutant_npcs],
    More Locations [more_locations],
    Fuji's More Buildings [FujiStruct],
    Urban Development [Urban_Development],
    Folding Parts pack [deoxymod],
    Vehicle Additions Pack [blazemod],
    Tanks and Other Vehicles [Tanks],
    Roadheader and other mining vehicles [Heavy miners],
    Necromancy [necromancy]
    ]

Additional context

In order to implement #36611 and #37698 and fix #36110 this issue needs to be solved.

@snipercup
Copy link
Contributor Author

To quote Qrox:

This wasn't changed to the new format, because it doesn't actually use the new format: "name_plural" here means the name for a pair of body parts, and was only named "name_plural" because it was (incorrectly) implemented as a plural name. If this is to be changed, the proper change would be renaming it from "name_plural" to something like "name_pair".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants