From 8dd0aecac8730ddce0bdbe72a4e6b7cedf9ff928 Mon Sep 17 00:00:00 2001 From: Aurorablade Date: Fri, 25 Mar 2016 20:08:06 -0400 Subject: [PATCH] BUTCHER ALL THE THINGA --- code/_onclick/item_attack.dm | 8 ++------ code/modules/mob/living/carbon/human/species/monkey.dm | 1 - code/modules/mob/living/carbon/human/species/species.dm | 5 ++++- code/modules/mob/living/living.dm | 2 +- code/modules/mob/living/simple_animal/simple_animal.dm | 5 +---- 5 files changed, 8 insertions(+), 13 deletions(-) diff --git a/code/_onclick/item_attack.dm b/code/_onclick/item_attack.dm index c8527bc7c74..cee8ad99533 100644 --- a/code/_onclick/item_attack.dm +++ b/code/_onclick/item_attack.dm @@ -15,18 +15,14 @@ /mob/living/attackby(obj/item/I, mob/user, params) user.changeNext_move(CLICK_CD_MELEE) - - if(user.a_intent == I_HARM && stat == DEAD && !isnull(butcher_results)) //can we butcher it? + if(stat == DEAD && !isnull(butcher_results)) //can we butcher it? if(istype(I, /obj/item/weapon/kitchen/knife)) - world << "living" user << "You begin to butcher [src]..." playsound(loc, 'sound/weapons/slice.ogg', 50, 1, -1) if(do_mob(user, src, 80)) harvest(user) return - - if(istype(I) && ismob(user)) - I.attack(src, user) + I.attack(src, user) // Proximity_flag is 1 if this afterattack was called on something adjacent, in your square, or on your person. diff --git a/code/modules/mob/living/carbon/human/species/monkey.dm b/code/modules/mob/living/carbon/human/species/monkey.dm index cebcb1361b6..8115d3859fa 100644 --- a/code/modules/mob/living/carbon/human/species/monkey.dm +++ b/code/modules/mob/living/carbon/human/species/monkey.dm @@ -15,7 +15,6 @@ is_small = 1 has_fine_manipulation = 0 ventcrawler = 1 - butcher_results = list(/obj/item/weapon/reagent_containers/food/snacks/meat/monkey = 5, /obj/item/stack/sheet/animalhide/monkey = 1) show_ssd = 0 eyes = "blank_eyes" death_message = "lets out a faint chimper as it collapses and stops moving..." diff --git a/code/modules/mob/living/carbon/human/species/species.dm b/code/modules/mob/living/carbon/human/species/species.dm index d352cd84aea..03ed8e67c50 100644 --- a/code/modules/mob/living/carbon/human/species/species.dm +++ b/code/modules/mob/living/carbon/human/species/species.dm @@ -78,7 +78,6 @@ var/blood_color = "#A10808" //Red. var/flesh_color = "#FFC896" //Pink. var/single_gib_type = /obj/effect/decal/cleanable/blood/gibs - var/list/butcher_results = null var/base_color //Used when setting species. //Used in icon caching. @@ -324,6 +323,8 @@ return /datum/species/proc/handle_post_spawn(var/mob/living/carbon/C) //Handles anything not already covered by basic species assignment. + if(C.get_species() == "Monkey" || C.get_species() == "Farwa" || C.get_species() == "Stok" || C.get_species() == "Wolpin" || C.get_species() == "Neara") + C.butcher_results = list(/obj/item/weapon/reagent_containers/food/snacks/meat/monkey = 5) grant_abilities(C) return @@ -333,6 +334,8 @@ return /datum/species/proc/handle_pre_change(var/mob/living/carbon/human/H) + if(!H.get_species() == "Monkey" || !H.get_species() == "Farwa" || !H.get_species() == "Stok" || !H.get_species() == "Wolpin" || !H.get_species() == "Neara") + H.butcher_results = null remove_abilities(H) return diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index af4ccc91928..569ac341811 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -961,6 +961,6 @@ for(var/path in butcher_results) for(var/i = 1, i <= butcher_results[path], i++) new path(loc) - butcher_results.Remove(path) //In case you want to have things like simple_animals drop their butcher results on gib, so it won't double up below. + butcher_results.Remove(path) //In case you want to have things like simple_animals drop their butcher results on gib, so it won't double up below. visible_message("[user] butchers [src].") gib() \ No newline at end of file diff --git a/code/modules/mob/living/simple_animal/simple_animal.dm b/code/modules/mob/living/simple_animal/simple_animal.dm index 33dad643895..b4564428ba2 100644 --- a/code/modules/mob/living/simple_animal/simple_animal.dm +++ b/code/modules/mob/living/simple_animal/simple_animal.dm @@ -447,10 +447,6 @@ name = C.tagname real_name = C.tagname return - else if(butcher_results && (stat == DEAD)) //if the animal has a meat, and if it is dead. - if(istype(O, /obj/item/weapon/kitchen/knife)) - world << "Simple" - harvest(user) else user.changeNext_move(CLICK_CD_MELEE) user.do_attack_animation(src) @@ -471,6 +467,7 @@ user.visible_message("[user] gently taps [src] with [O].",\ "This weapon is ineffective, it does no damage.") adjustBruteLoss(damage) + ..() /mob/living/simple_animal/movement_delay()