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

Remove legacy enum handling for and the extern list of field types #74543

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

Procyonae
Copy link
Contributor

@Procyonae Procyonae commented Jun 15, 2024

Summary

None

Purpose of change

Extern bad
Random ancient legacy handling bad

Describe the solution

Replaces the extern list with the preferred per cpp static const definitions
Removes the legacy id code that I unhooked in #74497
Changes some gross if statement chains to gross if else statement chains, will probably make a followup PR changing them to something nicer
Replaces all fd_null usages with field_type_str_id::NULL_ID()
Make ammo effect's aoe_field_type and trail_field_type string ids instead of int ids and not load as raw strings first

Describe alternatives you've considered

Testing

Additional context

@github-actions github-actions bot added NPC / Factions NPCs, AI, Speech, Factions, Ownership [JSON] Changes (can be) made in JSON Bionics CBM (Compact Bionic Modules) Map / Mapgen Overmap, Mapgen, Map extras, Map display Vehicles Vehicles, parts, mechanics & interactions Mutations / Traits / Professions/ Hobbies Mutations / Traits / Professions/ Hobbies Code: Tests Measurement, self-control, statistics, balancing. [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. Items: Ammo / Guns Ammunition for all kinds of weapons and these weapons themselves Scenarios New Scenarios, balancing, bugs with scenarios Mechanics: Enchantments / Spells Enchantments and spells EOC: Effects On Condition Anything concerning Effects On Condition json-styled JSON lint passed, label assigned by github actions astyled astyled PR, label is assigned by github actions labels Jun 15, 2024
Copy link
Contributor

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. Please do not bump or comment on this issue unless you are actively working on it. Stale issues, and stale issues that are closed are still considered.

@github-actions github-actions bot added the stale Closed for lack of activity, but still valid. label Jul 16, 2024
@Procyonae Procyonae changed the title Remove legacy enum handiling for and the extern list of field types Remove legacy enum handling for and the extern list of field types Oct 18, 2024
@Procyonae Procyonae force-pushed the RemoveExternFieldTypes branch 2 times, most recently from 2750ad2 to 5a30768 Compare November 21, 2024 11:46
Remove remaining fd_null

Simplify weird field type loading

/tests

Remove legacy_enum_id s

Rest of /src

Remove the list proper

Merge weird nested function

Make an early return earlier

Sanity check some needless if checks
@Procyonae Procyonae marked this pull request as ready for review November 21, 2024 12:31
@Procyonae Procyonae removed the stale Closed for lack of activity, but still valid. label Nov 21, 2024
@Night-Pryanik Night-Pryanik reopened this Nov 21, 2024
@github-actions github-actions bot requested a review from KorGgenT December 11, 2024 23:31
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: @Fris0uman

@Night-Pryanik
Copy link
Contributor

@Procyonae could you please resolve conflicts?

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 Bionics CBM (Compact Bionic Modules) [C++] Changes (can be) made in C++. Previously named `Code` Code: Tests Measurement, self-control, statistics, balancing. EOC: Effects On Condition Anything concerning Effects On Condition Fields / Furniture / Terrain / Traps Objects that are part of the map or its features. Items: Ammo / Guns Ammunition for all kinds of weapons and these weapons themselves [JSON] Changes (can be) made in JSON json-styled JSON lint passed, label assigned by github actions Map / Mapgen Overmap, Mapgen, Map extras, Map display Mechanics: Enchantments / Spells Enchantments and spells Monsters Monsters both friendly and unfriendly. Mutations / Traits / Professions/ Hobbies Mutations / Traits / Professions/ Hobbies NPC / Factions NPCs, AI, Speech, Factions, Ownership Scenarios New Scenarios, balancing, bugs with scenarios Vehicles Vehicles, parts, mechanics & interactions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants