new traitified version, with some refactoring

cleans up a couple things too
This commit is contained in:
Killian
2021-02-05 01:19:03 +00:00
parent d470e34bca
commit 6baa1afdae
5 changed files with 29 additions and 19 deletions
@@ -20,6 +20,15 @@
var/wikilink = null //link to wiki page for species
var/icon_height = 32
var/agility = 20 //prob() to do agile things
var/organic_food_coeff = 1
var/synthetic_food_coeff = 0
//var/vore_numbing = 0
var/metabolism = 0.0015
var/lightweight = FALSE //Oof! Nonhelpful bump stumbles.
var/trashcan = FALSE //It's always sunny in the wrestling ring.
var/eat_minerals = FALSE //HEAVY METAL DIET
var/base_species = null // Unused outside of a few species
var/selects_bodytype = FALSE // Allows the species to choose from body types like custom species can, affecting suit fitting and etcetera as you would expect.
/datum/species/proc/update_attack_types()
unarmed_attacks = list()
@@ -1,14 +1,3 @@
/datum/species
//var/vore_numbing = 0
var/gets_food_nutrition = TRUE // If this is set to 0, the person can't get nutrition from food.
var/metabolism = 0.0015
var/lightweight = FALSE //Oof! Nonhelpful bump stumbles.
var/trashcan = FALSE //It's always sunny in the wrestling ring.
var/eat_minerals = FALSE //HEAVY METAL DIET
var/base_species = null // Unused outside of a few species
var/selects_bodytype = FALSE // Allows the species to choose from body types intead of being forced to be just one.
/datum/species/custom
name = SPECIES_CUSTOM
name_plural = "Custom"
@@ -63,7 +63,7 @@
name = "Bloodsucker"
desc = "Makes you unable to gain nutrition from anything but blood. To compenstate, you get fangs that can be used to drain blood from prey."
cost = 0
var_changes = list("gets_food_nutrition" = 0) //The verb is given in human.dm
var_changes = list("organic_food_coeff" = 0) //The verb is given in human.dm
/datum/trait/bloodsucker/apply(var/datum/species/S,var/mob/living/carbon/human/H)
..(S,H)
@@ -112,11 +112,17 @@
name = "Expensive Taste"
desc = "You only gain nutrition from raw ore and refined minerals. There's nothing that sates the appetite better than precious gems, exotic or rare minerals and you have damn fine taste. Anything else is beneath you."
cost = 0
var_changes = list("gets_food_nutrition" = 0, "eat_minerals" = 1)
var_changes = list("organic_food_coeff" = 0, "eat_minerals" = 1)
/datum/trait/gem_eater/apply(var/datum/species/S,var/mob/living/carbon/human/H)
..(S,H)
H.verbs |= /mob/living/proc/eat_minerals
/datum/trait/synth_chemfurnace
name = "(SYNTH) Biofuel Processor"
desc = "Only useful for Synthetics! You are able to gain energy through consuming and processing normal food. Energy-dense foods such as protein bars and survival food will yield the best results."
cost = 0
var_changes = list("organic_food_coeff" = 0, "synthetic_food_coeff" = 0.25)
/datum/trait/glowing_eyes
name = "Glowing Eyes"
@@ -46,7 +46,7 @@
var/is_vampire = 0 //VOREStation Edit START
if(ishuman(M))
var/mob/living/carbon/human/H = M
if(H.species.gets_food_nutrition == 0)
if(H.species.organic_food_coeff == 0)
H.adjust_nutrition(removed)
is_vampire = 1 //VOREStation Edit END
if(alien == IS_SLIME) // Treat it like nutriment for the jello, but not equivalent.
@@ -11,6 +11,7 @@
var/nutriment_factor = 30 // Per unit
var/injectable = 0
color = "#664330"
affects_robots = 1 //VOREStation Edit
/datum/reagent/nutriment/mix_data(var/list/newdata, var/newamount)
@@ -37,10 +38,14 @@
data -= taste
/datum/reagent/nutriment/affect_blood(var/mob/living/carbon/M, var/alien, var/removed)
if(!injectable && alien != IS_SLIME && alien != IS_CHIMERA) //VOREStation Edit
if(!injectable && alien != IS_SLIME && alien != IS_CHIMERA && !M.isSynthetic()) //VOREStation Edit
M.adjustToxLoss(0.1 * removed)
return
affect_ingest(M, alien, removed)
//VOREStation Edits Start
if(M.isSynthetic() && M.nutrition < 500)
M.adjust_nutrition((nutriment_factor * removed) * M.species.synthetic_food_coeff)
//VOREStation Edits End
/datum/reagent/nutriment/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed)
switch(alien)
@@ -48,10 +53,11 @@
if(IS_UNATHI) removed *= 0.5
if(IS_CHIMERA) removed *= 0.25 //VOREStation Edit
if(issmall(M)) removed *= 2 // Small bodymass, more effect from lower volume.
M.heal_organ_damage(0.5 * removed, 0)
if(M.species.gets_food_nutrition) //VOREStation edit. If this is set to 0, they don't get nutrition from food.
M.adjust_nutrition(nutriment_factor * removed) // For hunger and fatness
M.add_chemical_effect(CE_BLOODRESTORE, 4 * removed)
//VOREStation Edits Start
if(!M.isSynthetic())
M.adjust_nutrition((nutriment_factor * removed) * M.species.organic_food_coeff)
M.heal_organ_damage(0.5 * removed, 0)
M.add_chemical_effect(CE_BLOODRESTORE, 4 * removed)
// Aurora Cooking Port Insertion Begin