mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-10 18:32:03 +00:00
Merge branch 'deluxe' into 'Bleeding-Edge'
Adds teeth, teeth necklaces, ability to knock teeth out, as well as some butchering stuff * Moved species and butchering_drops vars from mob/living/simple_animal to mob/living * Animal species var has been renamed to species_type (to prevent conflict with humans' species var) * Added a new resurrect() mob proc, which adds the mob to the living mob list, removes it from the dead mob list and removes the butcher proc from the verb list. All instances of "living_mob_list -= M; dead_mob_list |= M" have been replaced with M.resurrect() * Replaced mob/living/simple_animal/harvest() with mob/living/butcher() * Added "irregular_plural" variable for stacks **Aliens and monkeys can be butchered now** * Butchering non-animals like aliens and monkeys requires you to use the butcher proc, which is added to the mob's verb list on death * Butchering currently has no effect on the ability to bring the mob back to life * Their bodies can't be destroyed via butchering, unlike with animals * Aliens can be declawed (dropping one xenomorph claw) and skinned (dropping some chitin and an alien skin) * In addition, teeth may be harvested from aliens, corgis, goliaths, bears, aliens, cluwnes and creatures **Added claw and teeth necklaces** * Created by using 5 lengths of cable on a xenomorph claw or on a stack of teeth * Teeth necklaces track the type and amount of teeth. More teeth may be added to them after creation. * Teeth necklaces have a prefix depending on the amount of teeth. >=20 = fine, >=35 = well-made, >=50 = masterwork, >=100 = legendary **Species with claws (tajara) or beaks (vox) can butcher bodies without any tools. When using tools, they do it slightly faster** * Wearing gloves or masks negates that bonus **Examining a mob now tells you whether it has been skinned / its teeth were removed / everything else** **Hitting a human in the mouth with a heavy item or punching him has a chance of knocking some of his teeth out!** * This has no effect on the gameplay, other than some flavour text on examine * 1-3 teeth are sent flying! The chance is (force * w_class), capped at 40%. Items with less than 8 force or less than 2 w_class can't knock out teeth. * For punches, the chance of knocking out teeth is (0.5 * damage), which isn't really a lot. * Getting punched by a hulk has a minimum of 52.5% chance of knocking out from 9 to 11 teeth! Just like Gregor Clegane * Spawned teeth inherit their original owner's name (for example: "Dick Johnson's teeth"). Necklaces made from these teeth simply become "human teeth necklace", however   See merge request !114
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
//Actual butchering code is handled in living.dm
|
||||
|
||||
/datum/butchering_product
|
||||
var/obj/item/result
|
||||
//What item this is for
|
||||
@@ -9,18 +11,117 @@
|
||||
//Something like "skinning"
|
||||
|
||||
var/amount = 1
|
||||
var/initial_amount = 1
|
||||
//How much results you can spawn before this datum disappears
|
||||
|
||||
/datum/butchering_product/proc/spawn_result(location)
|
||||
/datum/butchering_product/New()
|
||||
..()
|
||||
|
||||
initial_amount = amount
|
||||
|
||||
/datum/butchering_product/proc/spawn_result(location, mob/parent)
|
||||
if(amount > 0)
|
||||
new result(location)
|
||||
amount--
|
||||
return new result(location)
|
||||
|
||||
//This is added to the description of dead mobs! It's important to add a space at the end (like this: "It has been skinned. ").
|
||||
/datum/butchering_product/proc/desc_modifier(mob/parent, mob/user) //User - the guy who is looking at Parent
|
||||
return
|
||||
|
||||
//==============Teeth============
|
||||
|
||||
/datum/butchering_product/teeth
|
||||
result = /obj/item/stack/teeth
|
||||
verb_name = "harvest teeth"
|
||||
verb_gerund = "removing teeth from"
|
||||
|
||||
/datum/butchering_product/teeth/desc_modifier(mob/parent, mob/user)
|
||||
if(amount == initial_amount) return
|
||||
if(!isliving(parent)) return
|
||||
|
||||
var/mob/living/L = parent
|
||||
|
||||
if(ishuman(L))
|
||||
var/mob/living/carbon/human/H = L
|
||||
var/datum/organ/external/head = H.get_organ("head")
|
||||
if((head.status & ORGAN_DESTROYED) || !head)
|
||||
return //If he has no head, you can't see whether he has teeth or not!
|
||||
|
||||
var/obj/item/clothing/mask/M = H.wear_mask
|
||||
if(istype(M) && (M.body_parts_covered & MOUTH)) return //If his mouth is covered, we can't see his teeth
|
||||
|
||||
var/pronoun = "Its"
|
||||
if(L.gender == MALE) pronoun = "His"
|
||||
if(L.gender == FEMALE) pronoun = "Her"
|
||||
|
||||
if(amount == 0)
|
||||
return "[pronoun] teeth are gone. "
|
||||
else
|
||||
if(parent.Adjacent(user))
|
||||
return "[(initial_amount - amount)] of [lowertext(pronoun)] teeth are missing."
|
||||
else
|
||||
return "Some of [lowertext(pronoun)] teeth are missing. "
|
||||
|
||||
#define ALL_TEETH -1
|
||||
/datum/butchering_product/teeth/spawn_result(location, mob/parent, drop_amount = ALL_TEETH)
|
||||
if(amount <= 0) return
|
||||
|
||||
var/obj/item/stack/teeth/T = new(location)
|
||||
if(parent)
|
||||
if(isliving(parent))
|
||||
var/mob/living/L = parent
|
||||
var/mob/parent_species = L.species_type
|
||||
var/parent_species_name = initial(parent_species.name)
|
||||
|
||||
if(ishuman(parent))
|
||||
parent_species_name = "[parent]'s" //Like "Dick Johnson's"
|
||||
|
||||
T.name = "[parent_species_name] teeth"
|
||||
T.singular_name = "[parent_species_name] tooth"
|
||||
T.animal_type = parent_species
|
||||
|
||||
if(drop_amount == ALL_TEETH) //Drop ALL teeth
|
||||
T.amount = amount
|
||||
amount = 0
|
||||
else //Drop a random amount
|
||||
var/actual_amount = min(src.amount, drop_amount)
|
||||
T.amount = actual_amount
|
||||
src.amount -= actual_amount
|
||||
|
||||
return T
|
||||
|
||||
/datum/butchering_product/teeth/few/New()
|
||||
amount = rand(4,8)
|
||||
..()
|
||||
|
||||
/datum/butchering_product/teeth/bunch/New()
|
||||
amount = rand(8,16)
|
||||
..()
|
||||
|
||||
/datum/butchering_product/teeth/lots/New()
|
||||
amount = rand(16,24)
|
||||
..()
|
||||
|
||||
/datum/butchering_product/teeth/human/New()
|
||||
amount = 32
|
||||
..()
|
||||
|
||||
#undef ALL_TEETH
|
||||
|
||||
//===============Skin=============
|
||||
|
||||
/datum/butchering_product/skin
|
||||
result = /obj/item/stack/sheet/animalhide
|
||||
verb_name = "skin"
|
||||
verb_gerund = "skinning"
|
||||
|
||||
/datum/butchering_product/skin/desc_modifier(mob/parent)
|
||||
if(!amount)
|
||||
var/pronoun = "It"
|
||||
if(parent.gender == MALE) pronoun = "He"
|
||||
if(parent.gender == FEMALE) pronoun = "She"
|
||||
return "[pronoun] has been skinned. "
|
||||
|
||||
/datum/butchering_product/skin/cat
|
||||
result = /obj/item/stack/sheet/animalhide/cat
|
||||
|
||||
@@ -36,17 +137,69 @@
|
||||
/datum/butchering_product/skin/bear
|
||||
result = /obj/item/clothing/head/bearpelt/real
|
||||
|
||||
/datum/butchering_product/skin/xeno
|
||||
result = /obj/item/stack/sheet/xenochitin
|
||||
verb_name = "remove chitin"
|
||||
verb_gerund = "removing chitin"
|
||||
|
||||
/datum/butchering_product/skin/xeno/New()
|
||||
amount = rand(1,3)
|
||||
|
||||
/datum/butchering_product/skin/xeno/spawn_result(location)
|
||||
..()
|
||||
if(!amount) //If all chitin was removed
|
||||
new /obj/item/stack/sheet/animalhide/xeno(location)
|
||||
|
||||
/datum/butchering_product/skin/monkey
|
||||
result = /obj/item/stack/sheet/animalhide/monkey
|
||||
|
||||
//--------------Spider legs-------
|
||||
|
||||
/datum/butchering_product/spider_legs
|
||||
result = /obj/item/weapon/reagent_containers/food/snacks/spiderleg
|
||||
verb_name = "remove legs from"
|
||||
verb_gerund = "removing legs from"
|
||||
amount = 8
|
||||
amount = 8 //Amount of legs that all normal spiders have
|
||||
|
||||
/datum/butchering_product/spider_legs/desc_modifier()
|
||||
if(amount < 8)
|
||||
return "It only has [amount] [amount==1 ? "leg" : "legs"]. "
|
||||
|
||||
//=============Alien claws========
|
||||
|
||||
/datum/butchering_product/xeno_claw
|
||||
result = /obj/item/xenos_claw
|
||||
verb_name = "declaw"
|
||||
verb_gerund = "declawing"
|
||||
|
||||
/datum/butchering_product/xeno_claw/desc_modifier()
|
||||
if(!amount)
|
||||
return "Its claws have been cut off. "
|
||||
|
||||
#define TEETH_FEW /datum/butchering_product/teeth/few //4-8
|
||||
#define TEETH_BUNCH /datum/butchering_product/teeth/bunch //8-16
|
||||
#define TEETH_LOTS /datum/butchering_product/teeth/lots //16-24
|
||||
#define TEETH_HUMAN /datum/butchering_product/teeth/human //32
|
||||
|
||||
var/global/list/animal_butchering_products = list(
|
||||
/mob/living/simple_animal/cat = list(/datum/butchering_product/skin/cat),
|
||||
/mob/living/simple_animal/corgi = list(/datum/butchering_product/skin/corgi),
|
||||
/mob/living/simple_animal/corgi = list(/datum/butchering_product/skin/corgi, TEETH_FEW),
|
||||
/mob/living/simple_animal/lizard = list(/datum/butchering_product/skin/lizard),
|
||||
/mob/living/simple_animal/hostile/asteroid/goliath = list(/datum/butchering_product/skin/goliath),
|
||||
/mob/living/simple_animal/hostile/asteroid/goliath = list(/datum/butchering_product/skin/goliath, TEETH_LOTS),
|
||||
/mob/living/simple_animal/hostile/giant_spider = list(/datum/butchering_product/spider_legs),
|
||||
/mob/living/simple_animal/hostile/bear = list(/datum/butchering_product/skin/bear)
|
||||
)
|
||||
/mob/living/simple_animal/hostile/bear = list(/datum/butchering_product/skin/bear, TEETH_LOTS),
|
||||
/mob/living/carbon/alien/humanoid = list(/datum/butchering_product/xeno_claw, /datum/butchering_product/skin/xeno, TEETH_BUNCH),
|
||||
/mob/living/simple_animal/hostile/alien = list(/datum/butchering_product/xeno_claw, /datum/butchering_product/skin/xeno, TEETH_BUNCH), //Same as the player-controlled aliens
|
||||
/mob/living/simple_animal/hostile/retaliate/cluwne = list(TEETH_BUNCH), //honk
|
||||
/mob/living/simple_animal/hostile/creature = list(TEETH_LOTS),
|
||||
/mob/living/carbon/monkey = list(/datum/butchering_product/skin/monkey),
|
||||
|
||||
/mob/living/carbon/human = list(TEETH_HUMAN),
|
||||
/mob/living/carbon/human/skellington = list(TEETH_HUMAN),
|
||||
/mob/living/carbon/human/tajaran = list(TEETH_HUMAN),
|
||||
|
||||
)
|
||||
|
||||
#undef TEETH_FEW
|
||||
#undef TEETH_BUNCH
|
||||
#undef TEETH_LOTS
|
||||
|
||||
Reference in New Issue
Block a user