Medical Adjustments (#17455)

* Defib and tank

* Defib, CPR, and stabilizer changes

qol: Defib now informs you WHY it's failing, so you can properly fix the problem.
balance: CPR can now REVIVE people if their HP is below a threshold with a 10% chance per CPR usage.
balance: CPR will cause the recipient to metabolize reagents.
balance: CPR now has a small chance of causing brute damage and rib fractures to the chest.
balance: Patient Stabilizer will cause the patient to metabolize reagents if dead.

* Broken bone fix

A fracture has a random chance of shifting around inside the first time you break it.

* shadekin runtime fix

* tgui

Adds two new TGUI states - living and living_adjacent
Fixes tram to allow mobs (and robots)

* Vital Organ chance fix

* flip flop
This commit is contained in:
Cameron Lennox
2025-04-07 04:58:56 -04:00
committed by GitHub
parent ffe4129bc8
commit d4e4c8268c
15 changed files with 195 additions and 47 deletions
+17
View File
@@ -0,0 +1,17 @@
/*!
* Copyright (c) 2020 Aleksej Komarov
* SPDX-License-Identifier: MIT
*/
/**
* tgui state: living_state
*
* Checks that the user is a mob/living.
**/
GLOBAL_DATUM_INIT(tgui_living_state, /datum/tgui_state/living_state, new)
/datum/tgui_state/living_state/can_use_topic(src_object, mob/user)
if(isliving(user))
return STATUS_INTERACTIVE
return STATUS_CLOSE
@@ -0,0 +1,21 @@
/*!
* Copyright (c) 2020 Aleksej Komarov
* SPDX-License-Identifier: MIT
*/
/**
* tgui state: living_adjacent_state
*
* In addition to default checks, only allows interaction for a
* living adjacent user.
**/
GLOBAL_DATUM_INIT(tgui_living_adjacent_state, /datum/tgui_state/living_adjacent_state, new)
/datum/tgui_state/living_adjacent_state/can_use_topic(src_object, mob/user)
. = user.default_can_use_tgui_topic(src_object)
var/dist = get_dist(src_object, user)
if((dist > 1) || (!isliving(user)))
// Can't be used unless adjacent and human, even with TK
. = min(., STATUS_UPDATE)