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

AI medical stuff #17272

Merged
merged 16 commits into from
Mar 5, 2025
Merged

AI medical stuff #17272

merged 16 commits into from
Mar 5, 2025

Conversation

Lumipharon
Copy link
Contributor

@Lumipharon Lumipharon commented Mar 2, 2025

About The Pull Request

AI medics have arrived.

2025-03-02.16-18-29.mp4

They will treat all injuries (including organ/eye/brain damage, IB, shrap, fracs) like a human medic, only they won't accidentally OD you on tricord.

AI medics will keep track of people that need healing, and tend to them as best as they can.

Human players can do the medic emote to request healing.

ALL human AI will now try save friendlies in crit (i.e. inap/RR them etc).

Did some significant reorganising of AI code as it was already becoming complex and difficult to navigate.

A couple of random semi related fixes like some runtime and a duplicate proc, and a few minor AI fixes/improvements not directly related to medical stuff.

Why It's Good For The Game

Take human jobs away.

Changelog

🆑
add: Added human AI functionality for healing others
/:cl:

@github-actions github-actions bot added the Feature New interesting mechanics with new interesting bugs label Mar 2, 2025
@ilikesaying
Copy link

AI taking the jobs of humans

@despong
Copy link

despong commented Mar 2, 2025

CORPSMAN!!! WE HAVE A CASUALITY!!! CORPSMAN!!!

@github-actions github-actions bot added the Merge Conflict Pull request is in a conflicted state with base branch. label Mar 4, 2025
Comment on lines 226 to 227
if(INFECTION )
type_list = infection_list
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(INFECTION )
type_list = infection_list
if(INFECTION)
type_list = infection_list

@@ -156,7 +156,7 @@ Registers signals, handles the pathfinding element addition/removal alongside ma
set_atom_to_walk_to(next_target)

register_action_signals(current_action)
if(current_action == MOVING_TO_SAFETY)
if(current_action == MOVING_TO_SAFETY) //human_ai_state_flags & HUMAN_AI_HEALING (and HUMAN_AI_SELF_HEALING ??)
Copy link
Member

Choose a reason for hiding this comment

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

?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

whoops, removed

@@ -442,8 +445,9 @@ These are parameter based so the ai behavior can choose to (un)register the sign
if(interact_target)
do_unset_target(interact_target, FALSE)
interact_target = new_target
RegisterSignals(interact_target, list(COMSIG_QDELETING, COMSIG_MOB_DEATH, COMSIG_OBJ_DECONSTRUCT, COMSIG_MOVABLE_MOVED), PROC_REF(unset_target), TRUE) //dont follow an item after its picked up... maybe not in the future
RegisterSignals(interact_target, list(COMSIG_QDELETING, COMSIG_MOB_DEATH, COMSIG_OBJ_DECONSTRUCT, COMSIG_MOVABLE_Z_CHANGED), PROC_REF(unset_target), TRUE) //dont follow an item after its picked up... maybe not in the future //COMSIG_MOVABLE_MOVED
Copy link
Member

Choose a reason for hiding this comment

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

?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

Comment on lines +460 to +461
if(escorted_atom == old_target)
clean_escorted_atom() //TODO: kill this entirely
Copy link
Member

Choose a reason for hiding this comment

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

?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

todo because I can probably inline it, but I need to go over xeno code first to make sure its fine/is a good idea

Comment on lines 19 to 20

/datum/ai_behavior/human/proc/heal_secondaries(mob/living/carbon/human/patient)
Copy link
Member

Choose a reason for hiding this comment

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

doc

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

Comment on lines +55 to +60
///Optimal range for AI to fight at, using this weapon
/obj/item/weapon/proc/get_ai_combat_range()
return list(0, 1)

/obj/item/weapon/twohanded/spear/get_ai_combat_range()
return 2
Copy link
Member

Choose a reason for hiding this comment

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

Unrelated But I thought we said we should kill just unlabeled list and int mixing like this what happen

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I did? It now uses a min and max range.
SETTING the min and max range is just using min() and max() so whether its a 1 item list or not, it still works fine

@github-actions github-actions bot removed the Merge Conflict Pull request is in a conflicted state with base branch. label Mar 4, 2025
@TiviPlus TiviPlus merged commit 2276274 into tgstation:master Mar 5, 2025
6 checks passed
github-actions bot added a commit that referenced this pull request Mar 5, 2025
@Lumipharon Lumipharon deleted the ai_med_stuff branch March 6, 2025 10:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature New interesting mechanics with new interesting bugs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants