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

CPR Buddy 9000 #7092

Merged
merged 61 commits into from
Dec 27, 2024
Merged

CPR Buddy 9000 #7092

merged 61 commits into from
Dec 27, 2024

Conversation

HIDgamer
Copy link
Contributor

@HIDgamer HIDgamer commented Sep 3, 2024

About the pull request

Adds a brand new bot type called the CPR bot, which is able to target and locate downed marines and perform CPR automatically.

Mention if you have tested your changes. If you changed a map, make sure you used the mapmerge tool.
If this is an Issue Correction, you can type "Fixes Issue #169420" to link the PR to the corresponding Issue number #169420.

I have tested this CPR bot many times; it showed no problems or bugs that are known to me at least.
it functions as it should.

Explain why it's good for the game

I think this would be a huge change to how synthetics operate on the ground of operations.
It actually replaces a piece of equipment that was left out to collect dust for many years.
while the cpr bot is only a little bit better by a few seconds.
It is designed to make using the autocomprossor more fun and an enjoyable experience for synthetic players.
I think it will encourage synthetics to really think about what to pick for their experimental equipment, which is normally a good thing!

Code was inspected and edited by Sindorman

Testing Photographs and Procedure

I have tested the logic of the CPRbot many times, from it's pathfinding to it's CPR actions performed.
It performs CPR every 7 seconds and only restors 4 seconds to the downed person's CPR timer, which is done this way for balance reasons so it doesn't outperform the auto compressor as it doesn't have a battery like the auto compressor, but when tested, it performed the same with a few extra seconds gained but performed the same none the less.
It's pathfinding isn't the best as it's made with the Astar logic, which all other bots use ingame, but it's decent enough to do the job!
If a bot can't find a valid path, it stops marking that patient as a valid patient and stops looking for it to save on memory power.
cprbot also uses an IFF check to make sure it only assists people of it's faction from the USCM and no one else, much like the motion detector functions "same logic."
It also checks if the person is human, which is a strict requirement, and also checks if there is another cprbot nearby by at least 2 tiles; otherwise, the cprbot will go in and assist if all checks are clear.

2024-09-09.11-26-14.mp4

Changelog

🆑
add: Added CPR Buddy 9000 to the experimental vendor.
/:cl:

@github-actions github-actions bot added Sprites Remove the soul from the game. Feature Feature coder badge labels Sep 3, 2024
@HIDgamer HIDgamer marked this pull request as ready for review September 3, 2024 04:24
@Blundir
Copy link
Contributor

Blundir commented Sep 3, 2024

Please include some screenshots or video.

@HIDgamer
Copy link
Contributor Author

HIDgamer commented Sep 3, 2024

Please include some screenshots or video.

in the details there is a link to the test I have preformed!
I apologize if that wasn't clear as I don't know how to include pictures or videos directly in a PR...

Copy link
Contributor

@Zonespace27 Zonespace27 left a comment

Choose a reason for hiding this comment

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

Didn't add a comment to every issue but i think you get the idea

code/game/machinery/bots/cprbot.dm Outdated Show resolved Hide resolved
code/game/machinery/bots/cprbot.dm Outdated Show resolved Hide resolved
code/game/machinery/bots/cprbot.dm Outdated Show resolved Hide resolved
code/game/machinery/bots/cprbot.dm Outdated Show resolved Hide resolved
code/game/machinery/bots/cprbot.dm Outdated Show resolved Hide resolved
code/game/machinery/bots/cprbot.dm Outdated Show resolved Hide resolved
code/game/machinery/bots/cprbot.dm Outdated Show resolved Hide resolved
code/game/machinery/bots/cprbot.dm Outdated Show resolved Hide resolved
code/game/machinery/bots/cprbot.dm Outdated Show resolved Hide resolved
code/game/machinery/bots/cprbot.dm Outdated Show resolved Hide resolved
@zzzmike
Copy link
Contributor

zzzmike commented Sep 3, 2024

I wish this was added for points in the corpsman vendor too rather than locked behind a whitelist, but, good first PR in any case.

@HIDgamer HIDgamer requested a review from Zonespace27 September 4, 2024 00:31
@Zonespace27 Zonespace27 marked this pull request as draft September 4, 2024 04:24
code/game/machinery/bots/cprbot.dm Outdated Show resolved Hide resolved
code/game/machinery/bots/cprbot.dm Outdated Show resolved Hide resolved
code/game/machinery/bots/cprbot.dm Outdated Show resolved Hide resolved
code/game/machinery/bots/cprbot.dm Outdated Show resolved Hide resolved
code/game/machinery/bots/cprbot.dm Outdated Show resolved Hide resolved
code/game/machinery/bots/cprbot.dm Show resolved Hide resolved
code/game/machinery/bots/cprbot.dm Outdated Show resolved Hide resolved
@HIDgamer HIDgamer marked this pull request as ready for review September 8, 2024 08:40
@HIDgamer HIDgamer marked this pull request as draft September 8, 2024 17:05
@github-actions github-actions bot added the Sound Blast 5 minutes of bass boosted music to our players label Sep 9, 2024
@HIDgamer HIDgamer marked this pull request as ready for review September 9, 2024 08:43
@HIDgamer HIDgamer requested a review from Zonespace27 September 9, 2024 16:45
@HIDgamer HIDgamer requested a review from kiVts December 23, 2024 10:16
code/game/machinery/bots/cprbot.dm Outdated Show resolved Hide resolved
code/game/machinery/bots/cprbot.dm Outdated Show resolved Hide resolved
@kiVts
Copy link
Contributor

kiVts commented Dec 24, 2024

Besides completely rewriting the code this cant be much more reviewed

Copy link
Contributor

@Drulikar Drulikar left a comment

Choose a reason for hiding this comment

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

Please make this not normally acquireable. E.g. remove it from the vendor. (Meaning this would be event only).

Too many people think it just doesn't fit the setting.

@Drulikar Drulikar marked this pull request as draft December 24, 2024 17:19
@HIDgamer HIDgamer marked this pull request as ready for review December 24, 2024 17:52
@HIDgamer HIDgamer requested a review from Drulikar December 24, 2024 17:52
@kiVts kiVts added this pull request to the merge queue Dec 27, 2024
Merged via the queue into cmss13-devs:master with commit d2d90e3 Dec 27, 2024
28 checks passed
cmss13-ci bot added a commit that referenced this pull request Dec 27, 2024
Git-Nivrak pushed a commit to Git-Nivrak/cmss13 that referenced this pull request Dec 31, 2024
# About the pull request

Adds a brand new bot type called the CPR bot, which is able to target
and locate downed marines and perform CPR automatically.

Mention if you have tested your changes. If you changed a map, make sure
you used the mapmerge tool.
If this is an Issue Correction, you can type "Fixes Issue #169420" to
link the PR to the corresponding Issue number #169420.

I have tested this CPR bot many times; it showed no problems or bugs
that are known to me at least.
it functions as it should.

# Explain why it's good for the game

I think this would be a huge change to how synthetics operate on the
ground of operations.
It actually replaces a piece of equipment that was left out to collect
dust for many years.
while the cpr bot is only a little bit better by a few seconds.
It is designed to make using the autocomprossor more fun and an
enjoyable experience for synthetic players.
I think it will encourage synthetics to really think about what to pick
for their experimental equipment, which is normally a good thing!

Code was inspected and edited by Sindorman

# Testing Photographs and Procedure
I have tested the logic of the CPRbot many times, from it's pathfinding
to it's CPR actions performed.
It performs CPR every 7 seconds and only restors 4 seconds to the downed
person's CPR timer, which is done this way for balance reasons so it
doesn't outperform the auto compressor as it doesn't have a battery like
the auto compressor, but when tested, it performed the same with a few
extra seconds gained but performed the same none the less.
It's pathfinding isn't the best as it's made with the Astar logic, which
all other bots use ingame, but it's decent enough to do the job!
If a bot can't find a valid path, it stops marking that patient as a
valid patient and stops looking for it to save on memory power.
cprbot also uses an IFF check to make sure it only assists people of
it's faction from the USCM and no one else, much like the motion
detector functions "same logic."
It also checks if the person is human, which is a strict requirement,
and also checks if there is another cprbot nearby by at least 2 tiles;
otherwise, the cprbot will go in and assist if all checks are clear.

<details>


https://github.com/user-attachments/assets/c65709d7-a043-4a29-a6f4-9e5e94ae4172

</details>


# Changelog

:cl:
add: Added CPR Buddy 9000 to the experimental vendor.
/:cl:

---------

Co-authored-by: kiVts <[email protected]>
Git-Nivrak pushed a commit to Git-Nivrak/cmss13 that referenced this pull request Dec 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Feature coder badge Sound Blast 5 minutes of bass boosted music to our players Sprites Approved confirmed no stray pixels Sprites Remove the soul from the game.
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.