Shot cfg format#4732
Open
PieterVdc wants to merge 5 commits intodkfans:masterfrom
Open
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the “shot” configuration format/parsing to use the generic named-field parser and consolidates several per-shot boolean settings into ShotModelFlags, alongside updating magic.cfg to use named (string) logic identifiers.
Changes:
- Migrates shot parsing from the bespoke
parse_magic_shot_blocks()implementation toparse_named_field_blocks()using a newmagic_shot_named_fields_set. - Moves
no_air_damage,wind_immune,fixed_damage, andhidden_projectileintoShotConfigStats::model_flags(newShMF_*bits) and updates gameplay code to read from flags. - Updates
config/fxdata/magic.cfgto use named values (e.g.,Default,Beam,Lightning) forFireLogic/UpdateLogic.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/thing_traps.c | Switches fixed-damage behavior check to ShMF_FixedDamage. |
| src/thing_shots.c | Uses new ShMF_* flags for air-damage, wind immunity, and hidden projectile; adds a direct include for shot flag definitions. |
| src/thing_creature.c | Switches fixed-damage behavior check to ShMF_FixedDamage. |
| src/config_magic.h | Adds new ShMF_* bits; removes legacy per-shot boolean fields; updates hit-effect model type. |
| src/config_magic.c | Replaces legacy shot parser with named-field parsing; introduces named commands for properties/withstand/logics. |
| config/fxdata/magic.cfg | Updates shot logic fields from numeric IDs to named strings. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
25 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.