-
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
JSONify addictions #56786
Merged
Merged
JSONify addictions #56786
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
[C++]
Changes (can be) made in C++. Previously named `Code`
[JSON]
Changes (can be) made in JSON
Code: Tests
Measurement, self-control, statistics, balancing.
Code: Tooling
Tooling that is not part of the main game but is part of the repo.
json-styled
JSON lint passed, label assigned by github actions
astyled
astyled PR, label is assigned by github actions
labels
Apr 13, 2022
dseguin
force-pushed
the
jsonify_addictions
branch
2 times, most recently
from
April 13, 2022 22:52
944b1f1
to
055ecbe
Compare
github-actions
bot
removed
the
json-styled
JSON lint passed, label assigned by github actions
label
Apr 13, 2022
dseguin
force-pushed
the
jsonify_addictions
branch
from
April 13, 2022 22:58
055ecbe
to
e752c2a
Compare
github-actions
bot
added
the
json-styled
JSON lint passed, label assigned by github actions
label
Apr 13, 2022
dseguin
force-pushed
the
jsonify_addictions
branch
2 times, most recently
from
April 14, 2022 00:08
50f27b5
to
4d859d4
Compare
github-actions
bot
added
BasicBuildPassed
This PR builds correctly, label assigned by github actions
<Documentation>
Design documents, internal info, guides and help.
[Python]
Code made in Python
Translation
I18n
and removed
BasicBuildPassed
This PR builds correctly, label assigned by github actions
labels
Apr 14, 2022
dseguin
force-pushed
the
jsonify_addictions
branch
from
April 14, 2022 07:51
41b3e92
to
c159c1a
Compare
github-actions
bot
added
Mods
Issues related to mods or modding
Lore
Game lore, in-game communication. Also the Lore tab.
BasicBuildPassed
This PR builds correctly, label assigned by github actions
labels
Apr 14, 2022
dseguin
force-pushed
the
jsonify_addictions
branch
from
April 15, 2022 01:46
a2c2c9f
to
e278564
Compare
dseguin
force-pushed
the
jsonify_addictions
branch
from
April 15, 2022 03:24
e278564
to
1326d67
Compare
dseguin
force-pushed
the
jsonify_addictions
branch
from
April 17, 2022 17:19
1326d67
to
96744e4
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
[C++]
Changes (can be) made in C++. Previously named `Code`
Code: Tests
Measurement, self-control, statistics, balancing.
Code: Tooling
Tooling that is not part of the main game but is part of the repo.
<Documentation>
Design documents, internal info, guides and help.
[JSON]
Changes (can be) made in JSON
json-styled
JSON lint passed, label assigned by github actions
Lore
Game lore, in-game communication. Also the Lore tab.
Mods
Issues related to mods or modding
[Python]
Code made in Python
Translation
I18n
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
(alternate summary: "pldata.h is dead, long live addictions.json")
Purpose of change
Describe the solution
Promote the
add_type
enum into an object with it's own string_id, and migrate hardcoded addiction functions to the"addiction_type"
JSON object:(definition of EOC_CAFFEINE_ADDICTION)
Field definitions
"name"
"type_name"
"description"
"craving_morale"
morale_type
penalty"effect_on_condition"
effect_on_condition
(can also be an inline EOC) which activates on eachupdate_body
(aka every turn)"builtin"
"effect_on_condition"
instead.Describe alternatives you've considered
Using a different mechanism for applying addiction effects, like some custom built-ins or effect stuff.
Testing
Added extensive unit tests for validating JSON vs. hardcoded addiction effects:
Additional context
TODO:
add_type
to data object"builtin"
field