Skip to content

Conversation

@Andrettin
Copy link
Contributor

This pull request adds the (header-only) magic_enum library as a dependency, and uses it to simplify ParseMonsterId(). The library could be used in the future to simplify other similar functions as well.

@AJenbo
Copy link
Member

AJenbo commented Aug 9, 2025

Will you be able to fix this for other builds? Since most fail from it we can't really merge it as is.

@Andrettin
Copy link
Contributor Author

Will you be able to fix this for other builds? Since most fail from it we can't really merge it as is.

I think yes, but I'll need some time, since I need to figure out what is wrong, and I don't have any leads at the moment. I think during next week I'll be able to fix this.

@glebm
Copy link
Collaborator

glebm commented Aug 10, 2025

A dependency on magic enum needs to be added to the libdevilutionx CMake target

@Andrettin Andrettin force-pushed the master branch 3 times, most recently from f9600c6 to 5449984 Compare August 10, 2025 19:22
@Andrettin
Copy link
Contributor Author

A dependency on magic enum needs to be added to the libdevilutionx CMake target

Yup, that was it :) Thank you so much!


tl::expected<_monster_id, std::string> ParseMonsterId(std::string_view value)
{
if (value == "MT_NZOMBIE") return MT_NZOMBIE;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What happens once this is renamed to MonsterType::Zombie? Ideal it should produce Zombie

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that's exactly what it would produce :)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In that case could you resolve the merge conflict, after that i think it's ready to merge.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I fixed the merge conflicts now :)

@AJenbo AJenbo merged commit d7404c0 into diasurgical:master Aug 12, 2025
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants