-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Use ammo_effect_str_id instead of std::string #73931
Merged
Merged
Conversation
This file contains 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
github-actions
bot
added
Bionics
CBM (Compact Bionic Modules)
Vehicles
Vehicles, parts, mechanics & interactions
Code: Tests
Measurement, self-control, statistics, balancing.
[C++]
Changes (can be) made in C++. Previously named `Code`
Monsters
Monsters both friendly and unfriendly.
Items: Ammo / Guns
Ammunition for all kinds of weapons and these weapons themselves
json-styled
JSON lint passed, label assigned by github actions
labels
May 19, 2024
Fris0uman
force-pushed
the
ammo_effects_id
branch
from
May 22, 2024 14:42
aeed8dd
to
0ce593d
Compare
github-actions
bot
added
the
astyled
astyled PR, label is assigned by github actions
label
May 22, 2024
Fris0uman
force-pushed
the
ammo_effects_id
branch
from
May 30, 2024 07:17
0ce593d
to
8eeb9f4
Compare
github-actions
bot
added
[JSON]
Changes (can be) made in JSON
Items: Archery
Bows, crossbows, arrows, bolts
labels
May 30, 2024
Fris0uman
force-pushed
the
ammo_effects_id
branch
from
May 30, 2024 11:57
477815c
to
9cbca63
Compare
github-actions
bot
added
<Documentation>
Design documents, internal info, guides and help.
[Markdown]
Markdown issues and PRs
labels
May 30, 2024
github-actions
bot
added
Mods: Magiclysm
Anything to do with the Magiclysm mod
Mods: Xedra Evolved
Anything to do with Xedra Evolved
labels
May 30, 2024
github-actions
bot
added
the
BasicBuildPassed
This PR builds correctly, label assigned by github actions
label
May 30, 2024
Much clang angry. |
Fris0uman
force-pushed
the
ammo_effects_id
branch
from
June 3, 2024 15:36
9ace449
to
fb70cbb
Compare
Fris0uman
force-pushed
the
ammo_effects_id
branch
from
June 3, 2024 20:05
fb70cbb
to
cfa94c8
Compare
Fris0uman
force-pushed
the
ammo_effects_id
branch
from
June 5, 2024 12:45
cfa94c8
to
f71c869
Compare
Fris0uman
force-pushed
the
ammo_effects_id
branch
from
June 10, 2024 13:09
f71c869
to
db81e2a
Compare
github-actions
bot
added
the
SDL: Tiles / Sound
Tiles visual interface and sounds.
label
Jun 10, 2024
Fris0uman
force-pushed
the
ammo_effects_id
branch
from
June 10, 2024 13:10
db81e2a
to
9246a26
Compare
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
Bionics
CBM (Compact Bionic Modules)
[C++]
Changes (can be) made in C++. Previously named `Code`
Code: Tests
Measurement, self-control, statistics, balancing.
<Documentation>
Design documents, internal info, guides and help.
Items: Ammo / Guns
Ammunition for all kinds of weapons and these weapons themselves
Items: Archery
Bows, crossbows, arrows, bolts
[JSON]
Changes (can be) made in JSON
json-styled
JSON lint passed, label assigned by github actions
[Markdown]
Markdown issues and PRs
Mods: Magiclysm
Anything to do with the Magiclysm mod
Mods: Xedra Evolved
Anything to do with Xedra Evolved
Monsters
Monsters both friendly and unfriendly.
SDL: Tiles / Sound
Tiles visual interface and sounds.
Vehicles
Vehicles, parts, mechanics & interactions
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.
Summary
None
Purpose of change
ammo_effect_str_id
instead ofstd::string
ammo_effect
and intoislot_ammo
as a new intDescribe the solution
Replace the thing with the other thing
Replace the RECOVER_n pseudo flag string parsing with a
recovery_chance
entryChange how the probability is computed from
1 - (1/n)
ton/100
Update json to use the new system: I'm keeping the same number as I don't think anyone writing those json expected the probability to be
1-(1/n)
rather thann/100
Describe alternatives you've considered
Testing
Compile without error
Load a new game without error
Additional context
Most of those hardcoded "effects" should probably be flags instead but that's out of scope for this PR
We can change the recovery values if we want, some values seem pretty low but I'm not sure