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

JSON-ify sleep 2: Skeep No More #76003

Merged
merged 1 commit into from
Aug 29, 2024
Merged

Conversation

phi2dao
Copy link
Contributor

@phi2dao phi2dao commented Aug 28, 2024

Summary

None

Purpose of change

While working on #75852 I noticed that you can try to fall asleep while floating in mid-air. This didn't seem intended, but it was out of scope for that PR, so I didn't do anything about it. I'm doing something about it now.

Describe the solution

I added an additional check to handle_action::sleep for the NO_FLOOR tag. You can no longer skeep (sky sleep) without valid comfort data, just like trying to sleep in DEEP_WATER.

Describe alternatives you've considered

Has anyone ever even tried to skeep? I'm pretty sure this PR is fixing a problem no one has actually had.

Testing

I gave myself MoM's levitation effect, flew up into the air, and tried to sleep. Before the change it let me, after the change it didn't.

Additional context

To skeep successfully, just add something like the following comfort data to a mutation:

"comfort": [
  {
    "conditions": [ { "type": "terrain", "flag": "NO_FLOOR" } ],
    "comfort": "very_comfortable"
  }
]

@github-actions github-actions bot added the [C++] Changes (can be) made in C++. Previously named `Code` label Aug 28, 2024
@Standing-Storm
Copy link
Contributor

Considering the calorie cost of long-term Levitation, this is probably a good countermeasure to keep telekinetics from accidentally starving to death in their sleep.

@github-actions github-actions bot added astyled astyled PR, label is assigned by github actions json-styled JSON lint passed, label assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions labels Aug 28, 2024
@Maleclypse Maleclypse merged commit 962c0c7 into CleverRaven:master Aug 29, 2024
28 checks passed
@phi2dao phi2dao deleted the jsonify_sleep_2 branch November 22, 2024 10:29
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` json-styled JSON lint passed, label assigned by github actions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants