From 4c4935f1559043972cbb359b79ae3fa88e2a1e05 Mon Sep 17 00:00:00 2001 From: Commandersand Date: Fri, 29 Nov 2019 14:13:39 -0600 Subject: [PATCH 1/8] yeet --- code/game/objects/items/stacks/medical.dm | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/code/game/objects/items/stacks/medical.dm b/code/game/objects/items/stacks/medical.dm index 9f3e5f6bd4..bf2f829873 100644 --- a/code/game/objects/items/stacks/medical.dm +++ b/code/game/objects/items/stacks/medical.dm @@ -108,8 +108,9 @@ 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 = 25 self_delay = 20 + max_amount = 12 grind_results = list("styptic_powder" = 10) /obj/item/stack/medical/bruise_pack/suicide_act(mob/user) @@ -118,13 +119,14 @@ /obj/item/stack/medical/gauze name = "medical gauze" - desc = "A roll of elastic cloth that is extremely effective at stopping bleeding, but does not heal wounds." + desc = "A roll of elastic cloth that is extremely effective at stopping bleeding, heals miner's minor wounds." gender = PLURAL singular_name = "medical gauze" icon_state = "gauze" stop_bleeding = 1800 - self_delay = 20 - max_amount = 12 + heal_brute = 5 + self_delay = 10 + max_amount = 6 /obj/item/stack/medical/gauze/attackby(obj/item/I, mob/user, params) @@ -153,7 +155,7 @@ /obj/item/stack/medical/gauze/cyborg materials = list() is_cyborg = 1 - cost = 250 + cost = 200 /obj/item/stack/medical/ointment name = "ointment" @@ -163,8 +165,9 @@ icon_state = "ointment" lefthand_file = 'icons/mob/inhands/equipment/medical_lefthand.dmi' righthand_file = 'icons/mob/inhands/equipment/medical_righthand.dmi' - heal_burn = 40 + heal_burn = 25 self_delay = 20 + max_amount = 12 grind_results = list("silver_sulfadiazine" = 10) /obj/item/stack/medical/ointment/suicide_act(mob/living/user) From 36b0ef53a091d2b1ccf41e07e0533603a9a4ed48 Mon Sep 17 00:00:00 2001 From: Commandersand Date: Fri, 29 Nov 2019 14:49:29 -0600 Subject: [PATCH 2/8] bruh --- 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 bf2f829873..67e7c35835 100644 --- a/code/game/objects/items/stacks/medical.dm +++ b/code/game/objects/items/stacks/medical.dm @@ -126,7 +126,7 @@ stop_bleeding = 1800 heal_brute = 5 self_delay = 10 - max_amount = 6 + max_amount = 12 /obj/item/stack/medical/gauze/attackby(obj/item/I, mob/user, params) From c0e77f8fdfad01ef44591d0cc645ed80e06bd40b Mon Sep 17 00:00:00 2001 From: loginsandylogout Date: Fri, 29 Nov 2019 15:10:30 -0600 Subject: [PATCH 3/8] Update code/game/objects/items/stacks/medical.dm Co-Authored-By: Ghom <42542238+Ghommie@users.noreply.github.com> --- 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 67e7c35835..1ec7275429 100644 --- a/code/game/objects/items/stacks/medical.dm +++ b/code/game/objects/items/stacks/medical.dm @@ -119,7 +119,7 @@ /obj/item/stack/medical/gauze name = "medical gauze" - desc = "A roll of elastic cloth that is extremely effective at stopping bleeding, heals miner's minor wounds." + desc = "A roll of elastic cloth that is extremely effective at stopping bleeding, heals minor wounds." gender = PLURAL singular_name = "medical gauze" icon_state = "gauze" From 17782a8c87c3aae42552718cce8647572e372175 Mon Sep 17 00:00:00 2001 From: loginsandylogout Date: Sun, 8 Dec 2019 17:10:50 -0600 Subject: [PATCH 4/8] ports refactor --- code/game/objects/items/stacks/medical.dm | 159 +++++++++------------- 1 file changed, 67 insertions(+), 92 deletions(-) diff --git a/code/game/objects/items/stacks/medical.dm b/code/game/objects/items/stacks/medical.dm index 1ec7275429..2249c9669e 100644 --- a/code/game/objects/items/stacks/medical.dm +++ b/code/game/objects/items/stacks/medical.dm @@ -11,95 +11,39 @@ resistance_flags = FLAMMABLE max_integrity = 40 novariants = FALSE - var/heal_brute = 0 - var/heal_burn = 0 - var/stop_bleeding = 0 + item_flags = NOBLUDGEON var/self_delay = 50 /obj/item/stack/medical/attack(mob/living/M, mob/user) - if(M.stat == DEAD && !stop_bleeding) - var/t_him = "it" - if(M.gender == MALE) - t_him = "him" - else if(M.gender == FEMALE) - t_him = "her" - to_chat(user, "\The [M] is dead, you cannot help [t_him]!") + . = ..() + if(!M.can_inject(user, TRUE)) return - - if(!iscarbon(M) && !isanimal(M)) - to_chat(user, "You don't know how to apply \the [src] to [M]!") - return 1 - - var/obj/item/bodypart/affecting - if(iscarbon(M)) - var/mob/living/carbon/C = M - affecting = C.get_bodypart(check_zone(user.zone_selected)) - if(!affecting) //Missing limb? - to_chat(user, "[C] doesn't have \a [parse_zone(user.zone_selected)]!") + if(M == user) + user.visible_message("[user] starts to apply \the [src] on [user.p_them()]self...", "You begin applying \the [src] on yourself...") + if(!do_mob(user, M, self_delay, extra_checks=CALLBACK(M, /mob/living/proc/can_inject, user, TRUE))) return - if(ishuman(C)) - var/mob/living/carbon/human/H = C - if(stop_bleeding) - if(H.bleedsuppress) - to_chat(user, "[H]'s bleeding is already bandaged!") - return - else if(!H.bleed_rate) - to_chat(user, "[H] isn't bleeding!") - return + if(heal(M, user)) + log_combat(user, M, "healed", src.name) + use(1) - if(isliving(M)) - if(!M.can_inject(user, 1)) - return +/obj/item/stack/medical/proc/heal(mob/living/M, mob/user) + return - if(user) - if (M != user) - if (isanimal(M)) - var/mob/living/simple_animal/critter = M - if (!(critter.healable)) - to_chat(user, " You cannot use [src] on [M]!") - return - else if (critter.health == critter.maxHealth) - to_chat(user, " [M] is at full health.") - return - else if(src.heal_brute < 1) - to_chat(user, " [src] won't help [M] at all.") - return - user.visible_message("[user] applies [src] on [M].", "You apply [src] on [M].") - else - var/t_himself = "itself" - if(user.gender == MALE) - t_himself = "himself" - else if(user.gender == FEMALE) - t_himself = "herself" - user.visible_message("[user] starts to apply [src] on [t_himself]...", "You begin applying [src] on yourself...") - if(!do_mob(user, M, self_delay, extra_checks=CALLBACK(M, /mob/living/proc/can_inject,user,1))) - return - user.visible_message("[user] applies [src] on [t_himself].", "You apply [src] on yourself.") - - - if(iscarbon(M)) - var/mob/living/carbon/C = M - affecting = C.get_bodypart(check_zone(user.zone_selected)) - if(!affecting) //Missing limb? - to_chat(user, "[C] doesn't have \a [parse_zone(user.zone_selected)]!") - return - if(ishuman(C)) - var/mob/living/carbon/human/H = C - if(stop_bleeding) - if(!H.bleedsuppress) //so you can't stack bleed suppression - H.suppress_bloodloss(stop_bleeding) - if(affecting.status == BODYPART_ORGANIC) //Limb must be organic to be healed - RR - if(affecting.heal_damage(heal_brute, heal_burn)) +/obj/item/stack/medical/proc/heal_carbon(mob/living/carbon/C, mob/user, brute, burn) + var/obj/item/bodypart/affecting = C.get_bodypart(check_zone(user.zone_selected)) + if(!affecting) //Missing limb? + to_chat(user, "[C] doesn't have \a [parse_zone(user.zone_selected)]!") + return + if(affecting.status == BODYPART_ORGANIC) //Limb must be organic to be healed - RR + if(affecting.brute_dam && brute || affecting.burn_dam && burn) + user.visible_message("[user] applies \the [src] on [C]'s [affecting.name].", "You apply \the [src] on [C]'s [affecting.name].") + if(affecting.heal_damage(brute, burn)) C.update_damage_overlays() - else - to_chat(user, "Medicine won't work on a robotic limb!") - else - M.heal_bodypart_damage((src.heal_brute/2), (src.heal_burn/2)) - - use(1) - - + return TRUE + to_chat(user, "[C]'s [affecting.name] can not be healed with \the [src].") + return + to_chat(user, "\The [src] won't work on a robotic limb!") /obj/item/stack/medical/bruise_pack name = "bruise pack" @@ -108,10 +52,29 @@ icon_state = "brutepack" lefthand_file = 'icons/mob/inhands/equipment/medical_lefthand.dmi' righthand_file = 'icons/mob/inhands/equipment/medical_righthand.dmi' - heal_brute = 25 + var/heal_brute = 25 self_delay = 20 max_amount = 12 - grind_results = list("styptic_powder" = 10) + grind_results = list(/datum/reagent/medicine/styptic_powder = 10) + +/obj/item/stack/medical/bruise_pack/heal(mob/living/M, mob/user) + if(M.stat == DEAD) + to_chat(user, " [M] is dead. You can not help [M.p_them()]!") + return + if(isanimal(M)) + var/mob/living/simple_animal/critter = M + if (!(critter.healable)) + to_chat(user, " You cannot use \the [src] on [M]!") + return FALSE + else if (critter.health == critter.maxHealth) + to_chat(user, " [M] is at full health.") + return FALSE + user.visible_message("[user] applies \the [src] on [M].", "You apply \the [src] on [M].") + M.heal_bodypart_damage((heal_brute/2)) + return TRUE + if(iscarbon(M)) + return heal_carbon(M, user, heal_brute, 0) + to_chat(user, "You can't heal [M] with the \the [src]!") /obj/item/stack/medical/bruise_pack/suicide_act(mob/user) user.visible_message("[user] is bludgeoning [user.p_them()]self with [src]! It looks like [user.p_theyre()] trying to commit suicide!") @@ -119,18 +82,25 @@ /obj/item/stack/medical/gauze name = "medical gauze" - desc = "A roll of elastic cloth that is extremely effective at stopping bleeding, heals minor wounds." + desc = "A roll of elastic cloth that is extremely effective at stopping bleeding, but does not heal wounds." gender = PLURAL singular_name = "medical gauze" icon_state = "gauze" - stop_bleeding = 1800 - heal_brute = 5 + var/stop_bleeding = 1800 self_delay = 10 max_amount = 12 +/obj/item/stack/medical/gauze/heal(mob/living/M, mob/user) + if(ishuman(M)) + var/mob/living/carbon/human/H = M + if(!H.bleedsuppress && H.bleed_rate) //so you can't stack bleed suppression + H.suppress_bloodloss(stop_bleeding) + to_chat(user, "You stop the bleeding of [M]!") + return TRUE + to_chat(user, "You can not use \the [src] on [M]!") /obj/item/stack/medical/gauze/attackby(obj/item/I, mob/user, params) - if(istype(I, /obj/item/wirecutters) || I.get_sharpness()) + if(I.tool_behaviour == TOOL_WIRECUTTER || I.get_sharpness()) if(get_amount() < 2) to_chat(user, "You need at least two gauzes to do this!") return @@ -155,7 +125,7 @@ /obj/item/stack/medical/gauze/cyborg materials = list() is_cyborg = 1 - cost = 200 + cost = 250 /obj/item/stack/medical/ointment name = "ointment" @@ -165,14 +135,19 @@ icon_state = "ointment" lefthand_file = 'icons/mob/inhands/equipment/medical_lefthand.dmi' righthand_file = 'icons/mob/inhands/equipment/medical_righthand.dmi' - heal_burn = 25 + var/heal_burn = 25 self_delay = 20 max_amount = 12 - grind_results = list("silver_sulfadiazine" = 10) + grind_results = list(/datum/reagent/medicine/silver_sulfadiazine = 10) + +/obj/item/stack/medical/ointment/heal(mob/living/M, mob/user) + if(M.stat == DEAD) + to_chat(user, " [M] is dead. You can not help [M.p_them()]!") + return + if(iscarbon(M)) + return heal_carbon(M, user, 0, heal_burn) + to_chat(user, "You can't heal [M] with the \the [src]!") /obj/item/stack/medical/ointment/suicide_act(mob/living/user) user.visible_message("[user] is squeezing \the [src] into [user.p_their()] mouth! [user.p_do(TRUE)]n't [user.p_they()] know that stuff is toxic?") return TOXLOSS - -/obj/item/stack/medical/get_belt_overlay() - return mutable_appearance('icons/obj/clothing/belt_overlays.dmi', "pouch") From 1bae17a2dee169f31dda955dffba0cc11cdd73b4 Mon Sep 17 00:00:00 2001 From: loginsandylogout Date: Sun, 8 Dec 2019 17:24:12 -0600 Subject: [PATCH 5/8] gauze --- code/game/objects/items/stacks/medical.dm | 1 + 1 file changed, 1 insertion(+) diff --git a/code/game/objects/items/stacks/medical.dm b/code/game/objects/items/stacks/medical.dm index 2249c9669e..81235736f9 100644 --- a/code/game/objects/items/stacks/medical.dm +++ b/code/game/objects/items/stacks/medical.dm @@ -87,6 +87,7 @@ singular_name = "medical gauze" icon_state = "gauze" var/stop_bleeding = 1800 + var/heal_brute = 25 self_delay = 10 max_amount = 12 From 2c08f7ac9599ae1bf27343d390915ceaaf7a2869 Mon Sep 17 00:00:00 2001 From: loginsandylogout Date: Sun, 8 Dec 2019 17:25:17 -0600 Subject: [PATCH 6/8] oops --- code/game/objects/items/stacks/medical.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/game/objects/items/stacks/medical.dm b/code/game/objects/items/stacks/medical.dm index 81235736f9..86c89fef5f 100644 --- a/code/game/objects/items/stacks/medical.dm +++ b/code/game/objects/items/stacks/medical.dm @@ -82,12 +82,12 @@ /obj/item/stack/medical/gauze name = "medical gauze" - desc = "A roll of elastic cloth that is extremely effective at stopping bleeding, but does not heal wounds." + desc = "A roll of elastic cloth that is extremely effective at stopping bleeding, heals minor wounds." gender = PLURAL singular_name = "medical gauze" icon_state = "gauze" var/stop_bleeding = 1800 - var/heal_brute = 25 + var/heal_brute = 5 self_delay = 10 max_amount = 12 From 491958475b01c15aa13c9804c45db1f54abb1c88 Mon Sep 17 00:00:00 2001 From: loginsandylogout Date: Sun, 15 Dec 2019 18:48:50 -0600 Subject: [PATCH 7/8] fixed --- code/game/objects/items/stacks/medical.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/game/objects/items/stacks/medical.dm b/code/game/objects/items/stacks/medical.dm index 86c89fef5f..52228ff058 100644 --- a/code/game/objects/items/stacks/medical.dm +++ b/code/game/objects/items/stacks/medical.dm @@ -55,7 +55,7 @@ var/heal_brute = 25 self_delay = 20 max_amount = 12 - grind_results = list(/datum/reagent/medicine/styptic_powder = 10) + grind_results = list("styptic_powder" = 10) /obj/item/stack/medical/bruise_pack/heal(mob/living/M, mob/user) if(M.stat == DEAD) @@ -139,7 +139,7 @@ var/heal_burn = 25 self_delay = 20 max_amount = 12 - grind_results = list(/datum/reagent/medicine/silver_sulfadiazine = 10) + grind_results = list("silver_sulfadiazine" = 10) /obj/item/stack/medical/ointment/heal(mob/living/M, mob/user) if(M.stat == DEAD) From 7f0ae5dbde4ac86a489869da1c7091b8213a24e3 Mon Sep 17 00:00:00 2001 From: Ghom <42542238+Ghommie@users.noreply.github.com> Date: Sat, 21 Dec 2019 13:04:27 +0100 Subject: [PATCH 8/8] I gotta go fast. --- code/game/objects/items/stacks/medical.dm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/code/game/objects/items/stacks/medical.dm b/code/game/objects/items/stacks/medical.dm index 52228ff058..f25c2c2265 100644 --- a/code/game/objects/items/stacks/medical.dm +++ b/code/game/objects/items/stacks/medical.dm @@ -45,6 +45,9 @@ return to_chat(user, "\The [src] won't work on a robotic limb!") +/obj/item/stack/medical/get_belt_overlay() + return mutable_appearance('icons/obj/clothing/belt_overlays.dmi', "pouch") + /obj/item/stack/medical/bruise_pack name = "bruise pack" singular_name = "bruise pack"