From 98ea254ca567aed98c2f58b4306b05b994f5d0cb Mon Sep 17 00:00:00 2001 From: Shroopy <46693163+Shroopy@users.noreply.github.com> Date: Mon, 12 Aug 2024 23:10:34 -0700 Subject: [PATCH 1/9] Revert "Removes operating table numbing (cherrypick 903d7ca from Nova)" This reverts commit 11ad334bf8d912fb4c47c739801191233c4c7c11. --- code/game/objects/structures/tables_racks.dm | 4 ++++ .../code/game/objects/structures/tables_racks.dm | 11 +++++++++++ 2 files changed, 15 insertions(+) diff --git a/code/game/objects/structures/tables_racks.dm b/code/game/objects/structures/tables_racks.dm index 813c7202ff8b..e2cc6a552021 100644 --- a/code/game/objects/structures/tables_racks.dm +++ b/code/game/objects/structures/tables_racks.dm @@ -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) diff --git a/modular_skyrat/master_files/code/game/objects/structures/tables_racks.dm b/modular_skyrat/master_files/code/game/objects/structures/tables_racks.dm index 2058fbd5467b..4f18ec0ab2e4 100644 --- a/modular_skyrat/master_files/code/game/objects/structures/tables_racks.dm +++ b/modular_skyrat/master_files/code/game/objects/structures/tables_racks.dm @@ -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) From 8cb883b7f70bf09953802110fffcab479b9cc2e8 Mon Sep 17 00:00:00 2001 From: Shroopy <46693163+Shroopy@users.noreply.github.com> Date: Tue, 13 Aug 2024 00:17:53 -0700 Subject: [PATCH 2/9] Semi-working automatic healing --- code/modules/mob/living/carbon/human/life.dm | 2 ++ .../modules/mob/living/carbon/human/life.dm | 18 ++++++++++++++++++ tgstation.dme | 1 + 3 files changed, 21 insertions(+) create mode 100644 modular_zzbug/code/modules/mob/living/carbon/human/life.dm diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index 6bdbf8322f26..3a033e578685 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -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) diff --git a/modular_zzbug/code/modules/mob/living/carbon/human/life.dm b/modular_zzbug/code/modules/mob/living/carbon/human/life.dm new file mode 100644 index 000000000000..016627f52730 --- /dev/null +++ b/modular_zzbug/code/modules/mob/living/carbon/human/life.dm @@ -0,0 +1,18 @@ +/mob/living/carbon/human/proc/heal(seconds_per_tick, times_fired) + var/healAmt = maxHealth / 900 / 3 // 900 seconds = 15 minutes to fully heal from crit, split across 3 damage types + var/need_mob_update = FALSE + var/leftover = 0 + var/amtHealed + amtHealed = adjustBruteLoss(-(healAmt * seconds_per_tick), updating_health = FALSE, required_bodytype = BODYTYPE_ORGANIC) + need_mob_update |= amtHealed + leftover = healAmt - amtHealed + amtHealed = adjustFireLoss(-(healAmt * seconds_per_tick + leftover), updating_health = FALSE, required_bodytype = BODYTYPE_ORGANIC) + need_mob_update |= amtHealed + leftover = healAmt - amtHealed + amtHealed = adjustToxLoss(-(healAmt * seconds_per_tick + leftover), updating_health = FALSE) + need_mob_update |= amtHealed + // leftover = healAmt - amtHealed // Unnecessary + // TODO deal liver damage for tox heal + + if(need_mob_update) + updatehealth() diff --git a/tgstation.dme b/tgstation.dme index 1cd402a0fbfc..baad4cdf3846 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -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" From 771e47e89f7dc6eccb946acd7e491c8cedb3a5f7 Mon Sep 17 00:00:00 2001 From: Shroopy <46693163+Shroopy@users.noreply.github.com> Date: Tue, 13 Aug 2024 12:06:38 -0700 Subject: [PATCH 3/9] Healing over time works basically as intended --- .../modules/mob/living/carbon/human/life.dm | 29 ++++++++++--------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/modular_zzbug/code/modules/mob/living/carbon/human/life.dm b/modular_zzbug/code/modules/mob/living/carbon/human/life.dm index 016627f52730..12901f5d1d80 100644 --- a/modular_zzbug/code/modules/mob/living/carbon/human/life.dm +++ b/modular_zzbug/code/modules/mob/living/carbon/human/life.dm @@ -1,18 +1,21 @@ /mob/living/carbon/human/proc/heal(seconds_per_tick, times_fired) - var/healAmt = maxHealth / 900 / 3 // 900 seconds = 15 minutes to fully heal from crit, split across 3 damage types + 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/amtHealed - amtHealed = adjustBruteLoss(-(healAmt * seconds_per_tick), updating_health = FALSE, required_bodytype = BODYTYPE_ORGANIC) - need_mob_update |= amtHealed - leftover = healAmt - amtHealed - amtHealed = adjustFireLoss(-(healAmt * seconds_per_tick + leftover), updating_health = FALSE, required_bodytype = BODYTYPE_ORGANIC) - need_mob_update |= amtHealed - leftover = healAmt - amtHealed - amtHealed = adjustToxLoss(-(healAmt * seconds_per_tick + leftover), updating_health = FALSE) - need_mob_update |= amtHealed - // leftover = healAmt - amtHealed // Unnecessary - // TODO deal liver damage for tox heal - + 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() From 0e3683adfecbdbf7f71740293a294b43cde80e8d Mon Sep 17 00:00:00 2001 From: Shroopy <46693163+Shroopy@users.noreply.github.com> Date: Tue, 13 Aug 2024 12:10:26 -0700 Subject: [PATCH 4/9] Remove direct healing from sutures, mesh, etc --- code/game/objects/items/stacks/medical.dm | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/code/game/objects/items/stacks/medical.dm b/code/game/objects/items/stacks/medical.dm index d76861b6c493..19a204ff7a81 100644 --- a/code/game/objects/items/stacks/medical.dm +++ b/code/game/objects/items/stacks/medical.dm @@ -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) @@ -338,7 +338,7 @@ 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 @@ -346,7 +346,7 @@ /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 @@ -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 @@ -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) @@ -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 @@ -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) @@ -457,6 +457,7 @@ return ..() icon_state = "aloe_mesh_closed" +/* /obj/item/stack/medical/aloe name = "aloe cream" desc = "A healing paste for minor cuts and burns." @@ -477,6 +478,7 @@ /obj/item/stack/medical/aloe/fresh amount = 2 +*/ /obj/item/stack/medical/bone_gel name = "bone gel" @@ -528,6 +530,7 @@ /obj/item/stack/medical/bone_gel/one amount = 1 +/* /obj/item/stack/medical/poultice name = "mourning poultices" singular_name = "mourning poultice" @@ -554,6 +557,7 @@ /obj/item/stack/medical/poultice/post_heal_effects(amount_healed, mob/living/carbon/healed_mob, mob/user) . = ..() healed_mob.adjustOxyLoss(amount_healed) +*/ /obj/item/stack/medical/bandage name = "first aid bandage" @@ -565,7 +569,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 From 7e369aeec4222a8003574ed7db35f3ac10a9b8d0 Mon Sep 17 00:00:00 2001 From: Shroopy <46693163+Shroopy@users.noreply.github.com> Date: Tue, 13 Aug 2024 13:04:01 -0700 Subject: [PATCH 5/9] Remove healing items that only do direct healing --- code/modules/hydroponics/grown/aloe.dm | 2 ++ code/modules/reagents/chemistry/recipes/medicine.dm | 2 ++ .../code/_globalvars/lists/maintenance_loot_trash.dm | 2 +- .../code/_globalvars/lists/maintenance_loot_uncommon.dm | 2 +- 4 files changed, 6 insertions(+), 2 deletions(-) diff --git a/code/modules/hydroponics/grown/aloe.dm b/code/modules/hydroponics/grown/aloe.dm index 054809873262..848b1b28dd5d 100644 --- a/code/modules/hydroponics/grown/aloe.dm +++ b/code/modules/hydroponics/grown/aloe.dm @@ -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) +*/ diff --git a/code/modules/reagents/chemistry/recipes/medicine.dm b/code/modules/reagents/chemistry/recipes/medicine.dm index 03b586223ef6..c18083c571c8 100644 --- a/code/modules/reagents/chemistry/recipes/medicine.dm +++ b/code/modules/reagents/chemistry/recipes/medicine.dm @@ -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) diff --git a/modular_zubbers/code/_globalvars/lists/maintenance_loot_trash.dm b/modular_zubbers/code/_globalvars/lists/maintenance_loot_trash.dm index 89575dcb4283..33bc7a894d67 100644 --- a/modular_zubbers/code/_globalvars/lists/maintenance_loot_trash.dm +++ b/modular_zubbers/code/_globalvars/lists/maintenance_loot_trash.dm @@ -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 diff --git a/modular_zubbers/code/_globalvars/lists/maintenance_loot_uncommon.dm b/modular_zubbers/code/_globalvars/lists/maintenance_loot_uncommon.dm index a2e608a98606..3c05cf09f89b 100644 --- a/modular_zubbers/code/_globalvars/lists/maintenance_loot_uncommon.dm +++ b/modular_zubbers/code/_globalvars/lists/maintenance_loot_uncommon.dm @@ -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, From 1a95cb12e3587ee96530c04ccac724bd0428e22c Mon Sep 17 00:00:00 2001 From: Shroopy <46693163+Shroopy@users.noreply.github.com> Date: Tue, 13 Aug 2024 13:23:02 -0700 Subject: [PATCH 6/9] Adds map override for icemoon bathhouse with removed aloe --- _maps/bug/automapper/automapper_config.toml | 8 ++++++++ .../IceRuins/icemoon_underground_bathhouse.dmm | 13 +++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 _maps/bug/automapper/templates/RandomRuins/IceRuins/icemoon_underground_bathhouse.dmm diff --git a/_maps/bug/automapper/automapper_config.toml b/_maps/bug/automapper/automapper_config.toml index c35397b30dc5..ff4902e8e521 100644 --- a/_maps/bug/automapper/automapper_config.toml +++ b/_maps/bug/automapper/automapper_config.toml @@ -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/RandomRuins/IceRuins/" +required_map = "icemoon_underground_bathouse.dmm" +coordinates = [10, 7, 1] +trait_name = "Station" diff --git a/_maps/bug/automapper/templates/RandomRuins/IceRuins/icemoon_underground_bathhouse.dmm b/_maps/bug/automapper/templates/RandomRuins/IceRuins/icemoon_underground_bathhouse.dmm new file mode 100644 index 000000000000..73113c1b1e0b --- /dev/null +++ b/_maps/bug/automapper/templates/RandomRuins/IceRuins/icemoon_underground_bathhouse.dmm @@ -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 +"} From 800a9765aa76d80c421bcb7b7f9c8fb2d8da3de6 Mon Sep 17 00:00:00 2001 From: Shroopy <46693163+Shroopy@users.noreply.github.com> Date: Tue, 13 Aug 2024 13:31:35 -0700 Subject: [PATCH 7/9] Uncomment out removed med, add warning to desc --- code/game/objects/items/stacks/medical.dm | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/code/game/objects/items/stacks/medical.dm b/code/game/objects/items/stacks/medical.dm index 19a204ff7a81..2759c4d1eae3 100644 --- a/code/game/objects/items/stacks/medical.dm +++ b/code/game/objects/items/stacks/medical.dm @@ -457,10 +457,9 @@ return ..() icon_state = "aloe_mesh_closed" -/* /obj/item/stack/medical/aloe 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" @@ -478,7 +477,6 @@ /obj/item/stack/medical/aloe/fresh amount = 2 -*/ /obj/item/stack/medical/bone_gel name = "bone gel" @@ -530,11 +528,10 @@ /obj/item/stack/medical/bone_gel/one amount = 1 -/* /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 @@ -557,7 +554,6 @@ /obj/item/stack/medical/poultice/post_heal_effects(amount_healed, mob/living/carbon/healed_mob, mob/user) . = ..() healed_mob.adjustOxyLoss(amount_healed) -*/ /obj/item/stack/medical/bandage name = "first aid bandage" From c4ec79c2b8d0d32ab8eda20857e2a201c51b0086 Mon Sep 17 00:00:00 2001 From: Shroopy <46693163+Shroopy@users.noreply.github.com> Date: Tue, 13 Aug 2024 13:45:28 -0700 Subject: [PATCH 8/9] Note to self for aloe cream --- code/game/objects/items/stacks/medical.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/game/objects/items/stacks/medical.dm b/code/game/objects/items/stacks/medical.dm index 2759c4d1eae3..72c9d2af96e2 100644 --- a/code/game/objects/items/stacks/medical.dm +++ b/code/game/objects/items/stacks/medical.dm @@ -457,7 +457,7 @@ 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. This shouldn't be found in normal gameplay, tell a dev!" From a0c94e47e494b3bafd7b5f4eb04bad718741e654 Mon Sep 17 00:00:00 2001 From: Shroopy <46693163+Shroopy@users.noreply.github.com> Date: Wed, 14 Aug 2024 12:48:22 -0700 Subject: [PATCH 9/9] Fix automapper config --- _maps/bug/automapper/automapper_config.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_maps/bug/automapper/automapper_config.toml b/_maps/bug/automapper/automapper_config.toml index ff4902e8e521..ca76459b279a 100644 --- a/_maps/bug/automapper/automapper_config.toml +++ b/_maps/bug/automapper/automapper_config.toml @@ -624,7 +624,7 @@ trait_name = "Station" # Icemoon Bathhouse [templates.icemoon_underground_bathouse] map_files = ["icemoon_underground_bathouse.dmm"] -directory = "_maps/bug/automapper/RandomRuins/IceRuins/" +directory = "_maps/bug/automapper/templates/RandomRuins/IceRuins/" required_map = "icemoon_underground_bathouse.dmm" coordinates = [10, 7, 1] trait_name = "Station"