Skip to content

Add math function that return the enchantment value #81691

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

GuardianDll
Copy link
Member

Summary

None

Purpose of change

Json power

Describe the solution

Add a code that exposes character enchantment to math

Testing

image image

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Auto-requesting reviews from non-collaborators: @andrei8l

@github-actions github-actions bot added <Documentation> Design documents, internal info, guides and help. NPC / Factions NPCs, AI, Speech, Factions, Ownership [C++] Changes (can be) made in C++. Previously named `Code` [Markdown] Markdown issues and PRs astyled astyled PR, label is assigned by github actions json-styled JSON lint passed, label assigned by github actions labels Jul 10, 2025
@GuardianDll GuardianDll force-pushed the math_enchantment_reading branch from c4fac82 to 1a679b3 Compare July 10, 2025 21:27
@RenechCDDA
Copy link
Member

You probably want to use string_to_enum_look_up_optional and check the return value, debugmsg with callstack if it's std::nullopt.

string_to_enum will throw if the provided value is not an actual enum, which is bad (crashing!) and difficult to diagnose.

@GuardianDll GuardianDll force-pushed the math_enchantment_reading branch from 1a679b3 to b71037b Compare July 11, 2025 18:10
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 [C++] Changes (can be) made in C++. Previously named `Code` <Documentation> Design documents, internal info, guides and help. json-styled JSON lint passed, label assigned by github actions [Markdown] Markdown issues and PRs NPC / Factions NPCs, AI, Speech, Factions, Ownership
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants