-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
JSON-ify sleep-affecting mutations, trying to sleep, and sleep comfort (
#75852) * Add sleep_data * Add comfort calculations * Rework handle_action::sleep() * Add sleep aid msg to avatar::try_to_sleep Add fall asleep msg to Character::fall_asleep * Cleanup old functions, add comfort to json * Fix code and json errors * Move sleep messaging into sleep.h/cpp * Commented code * Documented comfort data and conditions * Fix typo in mutations.json * Update msvc-full-features/Cataclysm-lib-vcpkg-static.vcxproj * Appease clang-tidy * Fix discomfort messaging * Renamed comfort_data::condition::category to ccategory to appease GCC --------- Co-authored-by: Maleclypse <[email protected]>
- Loading branch information
1 parent
5237214
commit 0d9bfb5
Showing
15 changed files
with
787 additions
and
388 deletions.
There are no files selected for viewing
25 changes: 25 additions & 0 deletions
25
data/json/effects_on_condition/mutation_eocs/mutation_sleep_eocs.json
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
[ | ||
{ | ||
"type": "effect_on_condition", | ||
"id": "EOC_PRE_THRESHOLD_SPIDER_SLEEP_MUTATION", | ||
"eoc_type": "EVENT", | ||
"required_event": "character_attempt_to_fall_asleep", | ||
"condition": { | ||
"and": [ | ||
{ "u_has_trait": "WEB_WALKER" }, | ||
{ "not": { "u_has_trait": "WEB_SPINNER" } }, | ||
{ "not": { "u_has_trait": "WEB_WEAVER" } }, | ||
{ "math": [ "u_field_strength('fd_web')", "<", "3" ] } | ||
] | ||
}, | ||
"deactivate_condition": { | ||
"or": [ { "not": { "u_has_trait": "WEB_WALKER" } }, { "u_has_trait": "WEB_SPINNER" }, { "u_has_trait": "WEB_WEAVER" } ] | ||
}, | ||
"effect": [ { "u_transform_radius": 0, "ter_furn_transform": "spider_clear_webs" } ] | ||
}, | ||
{ | ||
"type": "ter_furn_transform", | ||
"id": "spider_clear_webs", | ||
"field": [ { "result": "fd_null", "valid_field": [ "fd_web" ] } ] | ||
} | ||
] |
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
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
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
Oops, something went wrong.