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

replace baby_egg, baby_monster, baby_monster_group with struct

Open GuardianDll opened this issue 1 year ago • 2 comments

Summary

None

Purpose of change

having three (now four) different field that need to be compared against each other all the time? let's just move it to something better

Describe the solution

Shove baby_egg, baby_monster, baby_monster_group to struct Add new type, baby_egg_group Compare each one against each other to prevent user using more than one by accident replace all json syntax with regex (something like "baby_egg": "(.*?)" and "baby_type": { "baby_egg": "$1" }) replace all using in code using the struct

  • [x] document
  • ~~finish unit test~~ moved to #76294

Testing

1 spawn eggs image 2 spawn books from itemgroup image 3 spawn dogs image 4 spawns cats from cat group image

GuardianDll avatar Sep 07 '24 13:09 GuardianDll

No gods no kings no tests! Do you want me to wait until the test PR is also passing?

Maleclypse avatar Sep 09 '24 02:09 Maleclypse

Nope, test relies on yet another PR by Ren, that's partially the reason i moved it to separate pr

GuardianDll avatar Sep 09 '24 05:09 GuardianDll