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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

CPR will now automatically repeat, but you can no longer do it multiple times at once #52521

Merged
merged 7 commits into from
Aug 10, 2020

Conversation

Mothblocks
Copy link
Member

About The Pull Request

2020-07-26T04-28-12

This is from clicking once. The first time you do CPR, it will take the normal 3 seconds, but after that every attempt will take 0.8 seconds.

Why It's Good For The Game

Everyone and their mother knows to just repeatedly click on someone to do CPR. This just unjankifies it.

Changelog

馃啈
add: CPR will now automatically repeat, but you can no longer do it multiple times at once.
/:cl:

@tgstation-server tgstation-server added the Feature Exposes new bugs in interesting ways label Jul 26, 2020
@Mothblocks
Copy link
Member Author

Turned it into a loop, haven't tested it yet though.

visible_message("<span class='notice'>[src] is trying to perform CPR on [target.name]!</span>", \
"<span class='notice'>You try to perform CPR on [target.name]... Hold still!</span>")

if (!do_mob(src, target, time = panicking ? CPR_PANIC_SPEED : null))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if (!do_mob(src, target, time = panicking ? CPR_PANIC_SPEED : null))
if (!do_mob(src, target, time = panicking ? CPR_PANIC_SPEED : 3 SECONDS))

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would you accept something that moves 3 SECONDS out to a define that do_after_mob uses as well for consistency's sake?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missed this one
And yea, it would have been fine
I just want clarity, because null in no way suggests it will be 3 seconds

Comment on lines 707 to 711
if (target.health <= target.crit_threshold)
if (!panicking)
to_chat(src, "<span class='warning'>[target] still isn't up! You try harder!</span>")
panicking = TRUE
while (target.health <= target.crit_threshold)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if (target.health <= target.crit_threshold)
if (!panicking)
to_chat(src, "<span class='warning'>[target] still isn't up! You try harder!</span>")
panicking = TRUE
while (target.health <= target.crit_threshold)
if (target.health > target.crit_threshold)
panicking = FALSE
else
if (!panicking)
to_chat(src, "<span class='warning'>[target] still isn't up! You try harder!</span>")
panicking = TRUE
while (panicking)

I meant something like this.

@github-actions
Copy link
Contributor

github-actions bot commented Aug 9, 2020

This PR has been inactive for long enough to be automatically marked as stale. This means it is at risk of being auto closed in ~ 7 days, please address any outstanding review items and ensure your PR is finished, if these are all true and you are auto-staled anyway, you need to actively ask maintainers if your PR will be merged. Once you have done any of the previous actions then you should request a maintainer remove the stale label on your PR, to reset the stale timer. If you feel no maintainer will respond in that time, you may wish to close this PR youself, while you seek maintainer comment, as you will then be able to reopen the PR yourself

@github-actions github-actions bot added the Stale Even the uncaring universe rejects you, why even go on label Aug 9, 2020
@Mothblocks
Copy link
Member Author

Not stale.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Exposes new bugs in interesting ways
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants