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

Open
wants to merge 33 commits into
base: master
Choose a base branch
from
Open

CPR Buddy 9000 #7092

wants to merge 33 commits into from

Conversation

HIDgamer
Copy link

@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
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.

@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
Comment on lines +32 to +58
var/static/list/medical_facts = list(
"Did you know? The human heart beats over 100,000 times a day.",
"Fun fact: Blood makes up about 7% of your body's weight.",
"Medical trivia: Your brain uses 20% of the oxygen you breathe.",
"Laughter really can increase your pain tolerance.",
"Did you know? The human skeleton is made up of 206 bones.",
"Fun fact: The average adult human body contains about 5 liters of blood.",
"Medical trivia: The human body has around 37.2 trillion cells.",
"The skin is the largest organ in the human body.",
"Did you know? The liver can regenerate itself if a portion is removed.",
"Fun fact: Your sense of smell is closely linked to your memory.",
"The only muscle that never tires is that heart.",
"Did you know? Not breathing can lead to a premature cessation of life!"
)

var/static/list/idle_messages = list(
"Stay still, I'm assessing the situation.",
"Just a routine check-up, don't worry.",
"Scanning the area for any casualties.",
"I’m ready to save lives, one compression at a time.",
"I hope everyone is feeling alright today!",
"It's not magic, it's CPR Buddy 9000!",
"I should have been a plastic surgeon.",
"What kind of medbay is this? Everyone’s dropping like flies.",
"Each breath a day keeps me at bay!",
"I sense a disturbance in my circuit board, as if a million people stopped breathing and were suddenly silent."
)
Copy link
Contributor

Choose a reason for hiding this comment

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

use the strings system for this

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
@cuberound
Copy link
Contributor

kinda sad that it it locked behind whitelist, it at least medbay recived one

code/game/machinery/bots/cprbot.dm Outdated Show resolved Hide resolved
code/game/machinery/bots/cprbot.dm Outdated Show resolved Hide resolved
code/game/objects/items/cprbot.dm Outdated Show resolved Hide resolved
code/game/objects/items/cprbot.dm Outdated Show resolved Hide resolved
code/game/objects/items/cprbot.dm Outdated Show resolved Hide resolved
code/game/objects/items/cprbot.dm Outdated Show resolved Hide resolved
code/game/objects/items/cprbot.dm Outdated Show resolved Hide resolved
code/game/objects/items/cprbot.dm Outdated Show resolved Hide resolved
nauticall

This comment was marked as duplicate.

Copy link
Contributor

@nauticall nauticall left a comment

Choose a reason for hiding this comment

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

sprites look good

@nauticall nauticall added the Sprites Approved confirmed no stray pixels label Oct 26, 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
None yet
Development

Successfully merging this pull request may close these issues.

9 participants