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

Med rework #8

Draft
wants to merge 10 commits into
base: master
Choose a base branch
from
8 changes: 8 additions & 0 deletions _maps/bug/automapper/automapper_config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -620,3 +620,11 @@ directory = "_maps/bug/automapper/templates/MetaStation/"
required_map = "MetaStation.dmm"
coordinates = [105, 177, 1]
trait_name = "Station"

# Icemoon Bathhouse
[templates.icemoon_underground_bathouse]
map_files = ["icemoon_underground_bathouse.dmm"]
directory = "_maps/bug/automapper/templates/RandomRuins/IceRuins/"
required_map = "icemoon_underground_bathouse.dmm"
coordinates = [10, 7, 1]
trait_name = "Station"
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
//MAP CONVERTED BY dmm2tgm.py THIS HEADER COMMENT PREVENTS RECONVERSION, DO NOT REMOVE
"a" = (
/obj/structure/table/greyscale,
/obj/item/clothing/shoes/sneakers/white{
name = "white slippers"
},
/obj/item/clothing/under/misc/pj/blue,
/turf/open/floor/iron/white,
/area/ruin/powered/bathhouse)

(1,1,1) = {"
a
"}
22 changes: 11 additions & 11 deletions code/game/objects/items/stacks/medical.dm
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@
icon_state = "brutepack"
lefthand_file = 'icons/mob/inhands/equipment/medical_lefthand.dmi'
righthand_file = 'icons/mob/inhands/equipment/medical_righthand.dmi'
heal_brute = 40
heal_brute = 0
self_delay = 4 SECONDS
other_delay = 2 SECONDS
grind_results = list(/datum/reagent/medicine/c2/libital = 10)
Expand Down Expand Up @@ -338,15 +338,15 @@
amount = 10
max_amount = 10
repeating = TRUE
heal_brute = 10
heal_brute = 0
stop_bleeding = 0.6
grind_results = list(/datum/reagent/medicine/spaceacillin = 2)
merge_type = /obj/item/stack/medical/suture

/obj/item/stack/medical/suture/emergency
name = "emergency suture"
desc = "A value pack of cheap sutures, not very good at repairing damage, but still decent at stopping bleeding."
heal_brute = 5
heal_brute = 0
amount = 5
max_amount = 5
merge_type = /obj/item/stack/medical/suture/emergency
Expand All @@ -355,7 +355,7 @@
name = "medicated suture"
icon_state = "suture_purp"
desc = "A suture infused with drugs that speed up wound healing of the treated laceration."
heal_brute = 15
heal_brute = 0
stop_bleeding = 0.75
grind_results = list(/datum/reagent/medicine/polypyr = 1)
merge_type = /obj/item/stack/medical/suture/medicated
Expand All @@ -373,7 +373,7 @@
self_delay = 4 SECONDS
other_delay = 2 SECONDS

heal_burn = 5
heal_burn = 0
flesh_regeneration = 2.5
sanitization = 0.25
grind_results = list(/datum/reagent/medicine/c2/lenturi = 10)
Expand All @@ -392,7 +392,7 @@
self_delay = 3 SECONDS
other_delay = 1 SECONDS
amount = 15
heal_burn = 10
heal_burn = 0
max_amount = 15
repeating = TRUE
sanitization = 0.75
Expand Down Expand Up @@ -446,7 +446,7 @@

gender = PLURAL
icon_state = "aloe_mesh"
heal_burn = 15
heal_burn = 0
sanitization = 1.25
flesh_regeneration = 3.5
grind_results = list(/datum/reagent/consumable/aloejuice = 1)
Expand All @@ -457,9 +457,9 @@
return ..()
icon_state = "aloe_mesh_closed"

/obj/item/stack/medical/aloe
/obj/item/stack/medical/aloe // TODO should probably sanitize burns
name = "aloe cream"
desc = "A healing paste for minor cuts and burns."
desc = "A healing paste for minor cuts and burns. This shouldn't be found in normal gameplay, tell a dev!"

gender = PLURAL
singular_name = "aloe cream"
Expand Down Expand Up @@ -531,7 +531,7 @@
/obj/item/stack/medical/poultice
name = "mourning poultices"
singular_name = "mourning poultice"
desc = "A type of primitive herbal poultice.\nWhile traditionally used to prepare corpses for the mourning feast, it can also treat scrapes and burns on the living, however, it is liable to cause shortness of breath when employed in this manner.\nIt is imbued with ancient wisdom."
desc = "A type of primitive herbal poultice.\nWhile traditionally used to prepare corpses for the mourning feast, it can also treat scrapes and burns on the living, however, it is liable to cause shortness of breath when employed in this manner.\nIt is imbued with ancient wisdom.\nThis shouldn't be found in normal gameplay, tell a dev!"
icon_state = "poultice"
amount = 15
max_amount = 15
Expand Down Expand Up @@ -565,7 +565,7 @@
max_amount = 1
lefthand_file = 'icons/mob/inhands/equipment/medical_lefthand.dmi'
righthand_file = 'icons/mob/inhands/equipment/medical_righthand.dmi'
heal_brute = 25
heal_brute = 0
stop_bleeding = 0.2
self_delay = 3 SECONDS
other_delay = 1 SECONDS
Expand Down
4 changes: 4 additions & 0 deletions code/game/objects/structures/tables_racks.dm
Original file line number Diff line number Diff line change
Expand Up @@ -831,8 +831,12 @@

if(potential_patient.body_position == LYING_DOWN && potential_patient.loc == loc)
patient = potential_patient
chill_out(patient) // SKYRAT EDIT - Operation Table Numbing
return

if(!isnull(patient)) // SKYRAT EDIT - Operation Table Numbing
thaw_them(patient) // SKYRAT EDIT - Operation Table Numbing

// Find another lying mob as a replacement.
for (var/mob/living/carbon/replacement_patient in loc.contents)
if(replacement_patient.body_position == LYING_DOWN)
Expand Down
2 changes: 2 additions & 0 deletions code/modules/hydroponics/grown/aloe.dm
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,10 @@
juice_typepath = /datum/reagent/consumable/aloejuice
distill_reagent = /datum/reagent/consumable/ethanol/tequila

/*
/obj/item/food/grown/aloe/make_bakeable()
AddComponent(/datum/component/bakeable, /obj/item/stack/medical/aloe/fresh, rand(15 SECONDS, 20 SECONDS), TRUE, TRUE)

/obj/item/food/grown/aloe/make_microwaveable()
AddElement(/datum/element/microwavable, /obj/item/stack/medical/aloe/fresh)
*/
2 changes: 2 additions & 0 deletions code/modules/mob/living/carbon/human/life.dm
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@
handle_heart(seconds_per_tick, times_fired)
//handles liver failure effects, if we lack a liver
handle_liver(seconds_per_tick, times_fired)
if(!(src.mob_biotypes & MOB_ROBOTIC) && src.health < src.maxHealth)
heal(seconds_per_tick, times_fired)

// for special species interactions
dna.species.spec_life(src, seconds_per_tick, times_fired)
Expand Down
2 changes: 2 additions & 0 deletions code/modules/reagents/chemistry/recipes/medicine.dm
Original file line number Diff line number Diff line change
Expand Up @@ -373,10 +373,12 @@
reaction_flags = REACTION_INSTANT
reaction_tags = REACTION_TAG_EASY | REACTION_TAG_HEALING | REACTION_TAG_BRUTE | REACTION_TAG_BURN

/*
/datum/chemical_reaction/medicine/poultice/on_reaction(datum/reagents/holder, datum/equilibrium/reaction, created_volume)
var/location = get_turf(holder.my_atom)
for(var/i in 1 to created_volume)
new /obj/item/stack/medical/poultice(location)
*/

/datum/chemical_reaction/medicine/seraka_destroy //seraka extract is destroyed by sodium hydroxide
results = list(/datum/reagent/consumable/sugar = 1)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,14 @@
/obj/structure/table/reinforced/Initialize()
. = ..()
AddElement(/datum/element/liquids_height, 20)

/// Used to numb a patient and apply stasis to them if enabled.
/obj/structure/table/optable/proc/chill_out(mob/living/target)
playsound(src, 'sound/effects/spray.ogg', 5, TRUE, 2, frequency = rand(24750, 26550))
ADD_TRAIT(target, TRAIT_ANALGESIA, REF(src))
target.throw_alert("numbed", /atom/movable/screen/alert/numbed)

///Used to remove the effects of stasis and numbing when a patient is unbuckled
/obj/structure/table/optable/proc/thaw_them(mob/living/target)
REMOVE_TRAIT(target, TRAIT_ANALGESIA, REF(src))
target.clear_alert("numbed", /atom/movable/screen/alert/numbed)
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ GLOBAL_LIST_INIT(trash_loot, list(//junk: useless, very easy to get, or ghetto c
/obj/item/reagent_containers/cup/tube = 50,
/obj/item/reagent_containers/dropper = 25,
/obj/item/reagent_containers/syringe/crude = 50,
/obj/item/stack/medical/aloe/fresh = 25,
// /obj/item/stack/medical/aloe/fresh = 25,
/obj/item/stack/medical/gauze/improvised = 25,
/obj/item/thermometer = 10,
/obj/item/thermometer/pen = 10
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ GLOBAL_LIST_INIT(uncommon_loot, list(//uncommon: useful items
/obj/item/stack/medical/gauze = 50,
/obj/item/stack/medical/mesh = 25,
/obj/item/stack/medical/ointment = 50,
/obj/item/stack/medical/poultice = 50,
// /obj/item/stack/medical/poultice = 50,
/obj/item/stack/medical/suture = 25,
/obj/item/stack/sticky_tape/surgical = 25,
/obj/item/storage/organbox = 25,
Expand Down
21 changes: 21 additions & 0 deletions modular_zzbug/code/modules/mob/living/carbon/human/life.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/mob/living/carbon/human/proc/heal(seconds_per_tick, times_fired)
var/heal_amt = maxHealth / 900 // 900 seconds = 15 minutes to fully heal from crit, it turns out more like 11 minutes because of rounding shenanigans but it's close enough
var/need_mob_update = FALSE
var/leftover = 0
var/amt_healed
var/list/damage_types = list(BRUTE, BURN, TOX)
do
var/damage_type = pick_n_take(damage_types)
switch(damage_type)
if(BRUTE)
amt_healed = adjustBruteLoss(-(heal_amt * seconds_per_tick + leftover), updating_health = FALSE, required_bodytype = BODYTYPE_ORGANIC)
if(BURN)
amt_healed = adjustFireLoss(-(heal_amt * seconds_per_tick + leftover), updating_health = FALSE, required_bodytype = BODYTYPE_ORGANIC)
if(TOX)
amt_healed = adjustToxLoss(-(heal_amt * seconds_per_tick + leftover), updating_health = FALSE)
// TODO deal liver damage for tox heal
need_mob_update |= amt_healed > 0
leftover = max(0, heal_amt - amt_healed)
while(damage_types.len > 0 && leftover > 0)
if(need_mob_update)
updatehealth()
1 change: 1 addition & 0 deletions tgstation.dme
Original file line number Diff line number Diff line change
Expand Up @@ -9214,6 +9214,7 @@
#include "modular_zzbug\code\game\objects\items\plushes.dm"
#include "modular_zzbug\code\modules\client\preferences\preferences.dm"
#include "modular_zzbug\code\modules\events\appendicitis.dm"
#include "modular_zzbug\code\modules\mob\living\carbon\human\life.dm"
#include "modular_zzbug\code\modules\research\designs\weapon_designs.dm"
#include "modular_zzbug\code\modules\research\techweb\all_nodes.dm"
#include "modular_zzbug\code\modules\storyteller\storytellers\storyteller_tellers.dm"
Expand Down
Loading