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

Expand NULL_ID() usage #79190

Merged
merged 4 commits into from
Jan 17, 2025
Merged

Expand NULL_ID() usage #79190

merged 4 commits into from
Jan 17, 2025

Conversation

Procyonae
Copy link
Contributor

@Procyonae Procyonae commented Jan 16, 2025

Summary

None

Purpose of change

Some code was using a debug limb sub body part as a null id instead of the already existing NULL_ID, me no likey

Describe the solution

Add attack_vector_id::NULL_ID()
Use sub_bodypart_str_id::NULL_ID() rather than sub_bodypart_str_id( "sub_limb_debug" ). I did consider changing the null id to sub_limb_debug or adding migration for one id to the other but as far as I can tell this should be fine.
Use bodypart_str_id::NULL_ID() when initialising and comparing bodypart_id (the int_id)

Describe alternatives you've considered

Bodyparts use externs and alot of just raw string initialising that also wants cleaning up into static consts

Testing

Game compiles

Additional context

@github-actions github-actions bot added NPC / Factions NPCs, AI, Speech, Factions, Ownership [JSON] Changes (can be) made in JSON [C++] Changes (can be) made in C++. Previously named `Code` Monsters Monsters both friendly and unfriendly. Fields / Furniture / Terrain / Traps Objects that are part of the map or its features. Melee Melee weapons, tactics, techniques, reach attack Mechanics: Enchantments / Spells Enchantments and spells Martial Arts Arts, Techniques, weapons and anything touching martial arts. Items: Armor / Clothing Armor and clothing Limbs Limbs, mutable limbs, and code related to them. labels Jan 16, 2025
@github-actions github-actions bot requested a review from KorGgenT January 16, 2025 15:57
@github-actions github-actions bot added json-styled JSON lint passed, label assigned by github actions astyled astyled PR, label is assigned by github actions Code: Tests Measurement, self-control, statistics, balancing. labels Jan 16, 2025
@github-actions github-actions bot added the BasicBuildPassed This PR builds correctly, label assigned by github actions label Jan 17, 2025
@Maleclypse Maleclypse merged commit f989034 into CleverRaven:master Jan 17, 2025
29 checks passed
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. Fields / Furniture / Terrain / Traps Objects that are part of the map or its features. Items: Armor / Clothing Armor and clothing [JSON] Changes (can be) made in JSON json-styled JSON lint passed, label assigned by github actions Limbs Limbs, mutable limbs, and code related to them. Martial Arts Arts, Techniques, weapons and anything touching martial arts. Mechanics: Enchantments / Spells Enchantments and spells Melee Melee weapons, tactics, techniques, reach attack Monsters Monsters both friendly and unfriendly. NPC / Factions NPCs, AI, Speech, Factions, Ownership
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants