From 0e13e14693bc4e41fcb465ee7b1dde94bb0b20da Mon Sep 17 00:00:00 2001 From: Mewchild Date: Sun, 24 Feb 2019 14:58:57 -0600 Subject: [PATCH 1/5] Antiseptic Mlems take 3 --- .../species/station/traits_vr/positive.dm | 9 +++ code/modules/mob/living/carbon/lick_wounds.dm | 78 +++++++++++++++++++ vorestation.dme | 1 + 3 files changed, 88 insertions(+) create mode 100644 code/modules/mob/living/carbon/lick_wounds.dm diff --git a/code/modules/mob/living/carbon/human/species/station/traits_vr/positive.dm b/code/modules/mob/living/carbon/human/species/station/traits_vr/positive.dm index a4154692158..ee17c5073f8 100644 --- a/code/modules/mob/living/carbon/human/species/station/traits_vr/positive.dm +++ b/code/modules/mob/living/carbon/human/species/station/traits_vr/positive.dm @@ -109,3 +109,12 @@ desc = "Makes your nice clawed, scaled, hooved, armored, or otherwise just awfully calloused feet immune to glass shards." cost = 1 var_changes = list("flags" = NO_MINOR_CUT) //Checked the flag is only used by shard stepping. + +/datum/trait/antiseptic_saliva + name = "Antiseptic Saliva" + desc = "Your saliva has especially strong antiseptic properties that can be used to heal small wounds." + cost = 1 + +/datum/trait/antiseptic_saliva/apply(var/datum/species/S,var/mob/living/carbon/human/H) + ..() + H.verbs |= /mob/living/carbon/human/verb/lick_wounds \ No newline at end of file diff --git a/code/modules/mob/living/carbon/lick_wounds.dm b/code/modules/mob/living/carbon/lick_wounds.dm new file mode 100644 index 00000000000..f6bd8b169a2 --- /dev/null +++ b/code/modules/mob/living/carbon/lick_wounds.dm @@ -0,0 +1,78 @@ +/mob/living/carbon/human/verb/lick_wounds(var/mob/living/carbon/M in living_mobs(1)) + set name = "Lick Wounds" + set category = "Abilities" + set desc = "Disinfect and heal small wounds with your saliva." + + if(nutrition < 50) + to_chat(src, "You need more energy to produce antiseptic enzymes. Eat something and try again.") + return + + if ( ! (istype(src, /mob/living/carbon/human) || \ + istype(src, /mob/living/silicon)) ) + src << "If you even have a tongue, it doesn't work that way." + return + + if (istype(M, /mob/living/carbon/human)) + var/mob/living/carbon/human/H = M + var/obj/item/organ/external/affecting = H.get_organ(src.zone_sel.selecting) + + if(!affecting) + to_chat(src, "No body part there to work on!") + return + + if(affecting.organ_tag == BP_HEAD) + if(H.head && istype(H.head,/obj/item/clothing/head/helmet/space)) + to_chat(src, "You can't seem to lick through [H.head]!") + return + + else + if(H.wear_suit && istype(H.wear_suit,/obj/item/clothing/suit/space)) + to_chat(src, "You can't lick your way through [H.wear_suit]!") + return + + if(affecting.robotic == ORGAN_ROBOT) + to_chat(src, "You don't think your spit will help a robotic limb.") + return + + if(affecting.robotic >= ORGAN_LIFELIKE) + to_chat(src, "You lick [M]'s [affecting.name], but it seems to have no effect...") + return + + if(affecting.open) + to_chat(src, "The [affecting.name] is cut open, you don't think your spit will help them!") + return + + if(affecting.is_bandaged() && affecting.is_salved()) + to_chat(src, "The wounds on [M]'s [affecting.name] have already been treated.") + return + + else + visible_message("\The [src] starts licking the wounds on [M]'s [affecting.name] clean.", \ + "You start licking the wounds on [M]'s [affecting.name] clean." ) + + for (var/datum/wound/W in affecting.wounds) + + if(W.bandaged && W.salved && W.disinfected) + continue + + if(!do_mob(src, M, W.damage/5)) + to_chat(src, "You must stand still to clean wounds.") + break + + if(affecting.is_bandaged() && affecting.is_salved()) // We do a second check after the delay, in case it was bandaged after the first check. + to_chat(src, "The wounds on [M]'s [affecting.name] have already been treated.") + return + + else + visible_message("\The [src] [pick("slathers \a [W.desc] on [M]'s [affecting.name] with their spit.", + "drags their tongue across \a [W.desc] on [M]'s [affecting.name].", + "drips saliva onto \a [W.desc] on [M]'s [affecting.name].", + "uses their tongue to disinfect \a [W.desc] on [M]'s [affecting.name].", + "licks \a [W.desc] on [M]'s [affecting.name], cleaning it.")]", \ + "You treat \a [W.desc] on [M]'s [affecting.name] with your antiseptic saliva." ) + nutrition -= 20 + W.salve() + W.bandage() + W.disinfect() + H.UpdateDamageIcon() + playsound(src.loc, 'sound/effects/ointment.ogg', 25) \ No newline at end of file diff --git a/vorestation.dme b/vorestation.dme index 8d3a8318af6..5ae4ef34340 100644 --- a/vorestation.dme +++ b/vorestation.dme @@ -2055,6 +2055,7 @@ #include "code\modules\mob\living\carbon\carbon_defines.dm" #include "code\modules\mob\living\carbon\carbon_powers.dm" #include "code\modules\mob\living\carbon\give.dm" +#include "code\modules\mob\living\carbon\lick_wounds.dm" #include "code\modules\mob\living\carbon\resist.dm" #include "code\modules\mob\living\carbon\shock.dm" #include "code\modules\mob\living\carbon\taste.dm" From 97346102b403851570e766b2121a10b345d0d3a2 Mon Sep 17 00:00:00 2001 From: Mewchild Date: Thu, 28 Feb 2019 00:07:57 -0600 Subject: [PATCH 2/5] Adds damage check. Credits to Heroman --- code/modules/mob/living/carbon/lick_wounds.dm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/code/modules/mob/living/carbon/lick_wounds.dm b/code/modules/mob/living/carbon/lick_wounds.dm index f6bd8b169a2..eccace774ba 100644 --- a/code/modules/mob/living/carbon/lick_wounds.dm +++ b/code/modules/mob/living/carbon/lick_wounds.dm @@ -46,6 +46,10 @@ to_chat(src, "The wounds on [M]'s [affecting.name] have already been treated.") return + if(affecting.brute_dam > 20 || affecting.burn_dam > 20) + to_chat(src, "The wounds on [M]'s [affecting.name] are too severe to treat with just licking.") + return + else visible_message("\The [src] starts licking the wounds on [M]'s [affecting.name] clean.", \ "You start licking the wounds on [M]'s [affecting.name] clean." ) From 15b6f812e4d3315b2a48a8aa1584f96c0843f55f Mon Sep 17 00:00:00 2001 From: Mewchild Date: Thu, 28 Feb 2019 00:10:58 -0600 Subject: [PATCH 3/5] Make it a proc! --- code/modules/mob/living/carbon/lick_wounds.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/mob/living/carbon/lick_wounds.dm b/code/modules/mob/living/carbon/lick_wounds.dm index eccace774ba..9f30d1843ca 100644 --- a/code/modules/mob/living/carbon/lick_wounds.dm +++ b/code/modules/mob/living/carbon/lick_wounds.dm @@ -1,4 +1,4 @@ -/mob/living/carbon/human/verb/lick_wounds(var/mob/living/carbon/M in living_mobs(1)) +/mob/living/carbon/human/proc/lick_wounds(var/mob/living/carbon/M in living_mobs(1)) set name = "Lick Wounds" set category = "Abilities" set desc = "Disinfect and heal small wounds with your saliva." From b33b089a91837d7c2ad15b9ecd6d988fb9d758ff Mon Sep 17 00:00:00 2001 From: Mewchild Date: Thu, 28 Feb 2019 00:11:57 -0600 Subject: [PATCH 4/5] And shuts up travis --- code/modules/mob/living/carbon/lick_wounds.dm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/code/modules/mob/living/carbon/lick_wounds.dm b/code/modules/mob/living/carbon/lick_wounds.dm index 9f30d1843ca..4c992e772c8 100644 --- a/code/modules/mob/living/carbon/lick_wounds.dm +++ b/code/modules/mob/living/carbon/lick_wounds.dm @@ -46,9 +46,9 @@ to_chat(src, "The wounds on [M]'s [affecting.name] have already been treated.") return - if(affecting.brute_dam > 20 || affecting.burn_dam > 20) - to_chat(src, "The wounds on [M]'s [affecting.name] are too severe to treat with just licking.") - return + if(affecting.brute_dam > 20 || affecting.burn_dam > 20) + to_chat(src, "The wounds on [M]'s [affecting.name] are too severe to treat with just licking.") + return else visible_message("\The [src] starts licking the wounds on [M]'s [affecting.name] clean.", \ From 4c8f4bcc17109c18dbd53706ca50ab9c37b765d1 Mon Sep 17 00:00:00 2001 From: Mewchild Date: Thu, 28 Feb 2019 00:28:53 -0600 Subject: [PATCH 5/5] Makes it a proc everywhere --- .../living/carbon/human/species/station/traits_vr/positive.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/mob/living/carbon/human/species/station/traits_vr/positive.dm b/code/modules/mob/living/carbon/human/species/station/traits_vr/positive.dm index ee17c5073f8..1a01c84692f 100644 --- a/code/modules/mob/living/carbon/human/species/station/traits_vr/positive.dm +++ b/code/modules/mob/living/carbon/human/species/station/traits_vr/positive.dm @@ -117,4 +117,4 @@ /datum/trait/antiseptic_saliva/apply(var/datum/species/S,var/mob/living/carbon/human/H) ..() - H.verbs |= /mob/living/carbon/human/verb/lick_wounds \ No newline at end of file + H.verbs |= /mob/living/carbon/human/proc/lick_wounds \ No newline at end of file