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

replace baby_egg, baby_monster, baby_monster_group with struct #76266

Merged
merged 4 commits into from
Sep 10, 2024

Conversation

GuardianDll
Copy link
Member

@GuardianDll GuardianDll commented Sep 7, 2024

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

Testing

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

@github-actions github-actions bot added [JSON] Changes (can be) made in JSON Code: Tests Measurement, self-control, statistics, balancing. [C++] Changes (can be) made in C++. Previously named `Code` Monsters Monsters both friendly and unfriendly. Mods: Magiclysm Anything to do with the Magiclysm mod Mods: Aftershock Anything to do with the Aftershock mod Mods: Dinomod Anything to do with the Dinoclysm mod (DinoMod) Mods: Defense Mode Anything to do with the Defense Mode mod Mods: TropiCataclysm 🌴 Having to do with the tropical region mod for DDA. Mods: Xedra Evolved Anything to do with Xedra Evolved Mods: Mind Over Matter json-styled JSON lint passed, label assigned by github actions labels Sep 7, 2024
@github-actions github-actions bot added <Documentation> Design documents, internal info, guides and help. [Markdown] Markdown issues and PRs astyled astyled PR, label is assigned by github actions labels Sep 7, 2024
@github-actions github-actions bot added the Mods Issues related to mods or modding label Sep 8, 2024
@GuardianDll GuardianDll marked this pull request as ready for review September 8, 2024 20:41
@github-actions github-actions bot added the BasicBuildPassed This PR builds correctly, label assigned by github actions label Sep 8, 2024
@Maleclypse
Copy link
Member

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

@GuardianDll
Copy link
Member Author

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

@Maleclypse Maleclypse merged commit ab86595 into CleverRaven:master Sep 10, 2024
21 of 27 checks passed
@GuardianDll GuardianDll deleted the baby_struct branch September 10, 2024 12:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
astyled astyled PR, label is assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions [C++] Changes (can be) made in C++. Previously named `Code` Code: Tests Measurement, self-control, statistics, balancing. <Documentation> Design documents, internal info, guides and help. [JSON] Changes (can be) made in JSON json-styled JSON lint passed, label assigned by github actions [Markdown] Markdown issues and PRs Mods: Aftershock Anything to do with the Aftershock mod Mods: Defense Mode Anything to do with the Defense Mode mod Mods: Dinomod Anything to do with the Dinoclysm mod (DinoMod) Mods: Magiclysm Anything to do with the Magiclysm mod Mods: Mind Over Matter Mods: TropiCataclysm 🌴 Having to do with the tropical region mod for DDA. Mods: Xedra Evolved Anything to do with Xedra Evolved Mods Issues related to mods or modding Monsters Monsters both friendly and unfriendly.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants