From 44b734c3724e057887b153405c63089f4e3012aa Mon Sep 17 00:00:00 2001 From: Killian <49700375+KillianKirilenko@users.noreply.github.com> Date: Sat, 22 Aug 2020 16:26:18 +0100 Subject: [PATCH 1/8] FBP Munchies --- .../Chemistry-Reagents-Food-Drinks_vr.dm | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Food-Drinks_vr.dm b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Food-Drinks_vr.dm index d5e2b1a8df1..944f70f1ad3 100644 --- a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Food-Drinks_vr.dm +++ b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Food-Drinks_vr.dm @@ -415,3 +415,22 @@ if(M.species.gets_food_nutrition) if(alien == IS_SLIME || alien == IS_CHIMERA) //slimes and chimera can get nutrition from injected nutriment and protein M.nutrition += (alt_nutriment_factor * removed) + +/datum/reagent/nutriment + affects_robots = 1 //fbps can get energy from food, but; + var/fbp_factor = 2 //divisor for how much it's worth (so, one half normal) + +/datum/reagent/nutriment/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed) + switch(alien) + if(IS_DIONA) return + 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. + if(M.species.gets_food_nutrition) //VOREStation edit. If this is set to 0, they don't get nutrition from food. + if(M.isSynthetic()) + M.adjust_nutrition((nutriment_factor / fbp_factor) * removed) + else + M.adjust_nutrition(nutriment_factor * removed) + if(!M.isSynthetic()) //only meatbags get healing and blood from nutriment + M.heal_organ_damage(0.5 * removed, 0) + M.add_chemical_effect(CE_BLOODRESTORE, 4 * removed) \ No newline at end of file From 46e560dd8e91a5a18acaf50b25e00ee665fa55d2 Mon Sep 17 00:00:00 2001 From: Killian <49700375+KillianKirilenko@users.noreply.github.com> Date: Mon, 21 Sep 2020 20:24:52 +0100 Subject: [PATCH 2/8] cycler adjustment, charge limit --- .../Chemistry-Reagents-Food-Drinks_vr.dm | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Food-Drinks_vr.dm b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Food-Drinks_vr.dm index 944f70f1ad3..43200df10c2 100644 --- a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Food-Drinks_vr.dm +++ b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Food-Drinks_vr.dm @@ -418,7 +418,13 @@ /datum/reagent/nutriment affects_robots = 1 //fbps can get energy from food, but; - var/fbp_factor = 2 //divisor for how much it's worth (so, one half normal) + var/fbp_factor = 1.5 //divisor for how much it's worth (so, two-thirds normal) + +/datum/reagent/nutriment/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) + if(!injectable && alien != IS_SLIME && alien != IS_CHIMERA && !M.isSynthetic()) + M.adjustToxLoss(0.1 * removed) + return + affect_ingest(M, alien, removed) /datum/reagent/nutriment/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed) switch(alien) @@ -427,7 +433,7 @@ if(IS_CHIMERA) removed *= 0.25 //VOREStation Edit if(issmall(M)) removed *= 2 // Small bodymass, more effect from lower volume. if(M.species.gets_food_nutrition) //VOREStation edit. If this is set to 0, they don't get nutrition from food. - if(M.isSynthetic()) + if(M.isSynthetic() && H.nutrition < 500) //cap us off at the limit just like a charger M.adjust_nutrition((nutriment_factor / fbp_factor) * removed) else M.adjust_nutrition(nutriment_factor * removed) From 06d7b68c492c4a9da1935f236b80efa3178677fc Mon Sep 17 00:00:00 2001 From: Killian <49700375+KillianKirilenko@users.noreply.github.com> Date: Mon, 21 Sep 2020 20:51:13 +0100 Subject: [PATCH 3/8] Update Chemistry-Reagents-Food-Drinks_vr.dm --- .../Chemistry-Reagents/Chemistry-Reagents-Food-Drinks_vr.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Food-Drinks_vr.dm b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Food-Drinks_vr.dm index 43200df10c2..8ddb3e69d30 100644 --- a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Food-Drinks_vr.dm +++ b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Food-Drinks_vr.dm @@ -433,7 +433,7 @@ if(IS_CHIMERA) removed *= 0.25 //VOREStation Edit if(issmall(M)) removed *= 2 // Small bodymass, more effect from lower volume. if(M.species.gets_food_nutrition) //VOREStation edit. If this is set to 0, they don't get nutrition from food. - if(M.isSynthetic() && H.nutrition < 500) //cap us off at the limit just like a charger + if(M.isSynthetic() && M.nutrition < 500) //cap us off at the limit just like a charger M.adjust_nutrition((nutriment_factor / fbp_factor) * removed) else M.adjust_nutrition(nutriment_factor * removed) From 542595cb5a04bfdb30576d838b34a912e8977930 Mon Sep 17 00:00:00 2001 From: Killian <49700375+KillianKirilenko@users.noreply.github.com> Date: Mon, 21 Sep 2020 21:05:29 +0100 Subject: [PATCH 4/8] Update Chemistry-Reagents-Food-Drinks_vr.dm --- .../Chemistry-Reagents/Chemistry-Reagents-Food-Drinks_vr.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Food-Drinks_vr.dm b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Food-Drinks_vr.dm index 8ddb3e69d30..d664e23d3fe 100644 --- a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Food-Drinks_vr.dm +++ b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Food-Drinks_vr.dm @@ -435,7 +435,7 @@ if(M.species.gets_food_nutrition) //VOREStation edit. If this is set to 0, they don't get nutrition from food. if(M.isSynthetic() && M.nutrition < 500) //cap us off at the limit just like a charger M.adjust_nutrition((nutriment_factor / fbp_factor) * removed) - else + else if(!M.isSynthetic()) M.adjust_nutrition(nutriment_factor * removed) if(!M.isSynthetic()) //only meatbags get healing and blood from nutriment M.heal_organ_damage(0.5 * removed, 0) From 6baa1afdae45971a4a077bce1fa8ecea597845fe Mon Sep 17 00:00:00 2001 From: Killian <49700375+VarkaSelyn@users.noreply.github.com> Date: Fri, 5 Feb 2021 01:19:03 +0000 Subject: [PATCH 5/8] new traitified version, with some refactoring cleans up a couple things too --- .../living/carbon/human/species/species_vr.dm | 9 +++++++++ .../carbon/human/species/station/blank_vr.dm | 11 ----------- .../human/species/station/traits_vr/neutral.dm | 10 ++++++++-- .../Chemistry-Reagents-Core.dm | 2 +- .../Chemistry-Reagents-Food-Drinks.dm | 16 +++++++++++----- 5 files changed, 29 insertions(+), 19 deletions(-) diff --git a/code/modules/mob/living/carbon/human/species/species_vr.dm b/code/modules/mob/living/carbon/human/species/species_vr.dm index 353946d9767..d08ae0ee928 100644 --- a/code/modules/mob/living/carbon/human/species/species_vr.dm +++ b/code/modules/mob/living/carbon/human/species/species_vr.dm @@ -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() diff --git a/code/modules/mob/living/carbon/human/species/station/blank_vr.dm b/code/modules/mob/living/carbon/human/species/station/blank_vr.dm index 6fd2e5db2db..bddb63f0920 100644 --- a/code/modules/mob/living/carbon/human/species/station/blank_vr.dm +++ b/code/modules/mob/living/carbon/human/species/station/blank_vr.dm @@ -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" diff --git a/code/modules/mob/living/carbon/human/species/station/traits_vr/neutral.dm b/code/modules/mob/living/carbon/human/species/station/traits_vr/neutral.dm index 9487ea36faf..dc20b206971 100644 --- a/code/modules/mob/living/carbon/human/species/station/traits_vr/neutral.dm +++ b/code/modules/mob/living/carbon/human/species/station/traits_vr/neutral.dm @@ -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" diff --git a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Core.dm b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Core.dm index d8cdbc4c110..a235a617552 100644 --- a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Core.dm +++ b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Core.dm @@ -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. diff --git a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Food-Drinks.dm b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Food-Drinks.dm index 8dea8f6d14e..3cc17501f15 100644 --- a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Food-Drinks.dm +++ b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Food-Drinks.dm @@ -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 From 7be872f86c67ab05009e6c52b8acc5796707c501 Mon Sep 17 00:00:00 2001 From: Killian <49700375+VarkaSelyn@users.noreply.github.com> Date: Fri, 5 Feb 2021 01:24:27 +0000 Subject: [PATCH 6/8] upstream compat. --- .../living/carbon/human/species/station/traits_vr/neutral.dm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/code/modules/mob/living/carbon/human/species/station/traits_vr/neutral.dm b/code/modules/mob/living/carbon/human/species/station/traits_vr/neutral.dm index dc20b206971..91422e7dd8d 100644 --- a/code/modules/mob/living/carbon/human/species/station/traits_vr/neutral.dm +++ b/code/modules/mob/living/carbon/human/species/station/traits_vr/neutral.dm @@ -63,6 +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 + custom_only = FALSE 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) @@ -112,6 +113,7 @@ 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 + custom_only = FALSE 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) @@ -122,6 +124,7 @@ 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 + custom_only = FALSE var_changes = list("organic_food_coeff" = 0, "synthetic_food_coeff" = 0.25) /datum/trait/glowing_eyes From f98116d32c44cb2f316d5e6cdb25ac24458bdea5 Mon Sep 17 00:00:00 2001 From: Killian <49700375+VarkaSelyn@users.noreply.github.com> Date: Fri, 5 Feb 2021 01:30:35 +0000 Subject: [PATCH 7/8] Update Chemistry-Reagents-Food-Drinks_vr.dm --- .../Chemistry-Reagents-Food-Drinks_vr.dm | 35 +++---------------- 1 file changed, 5 insertions(+), 30 deletions(-) diff --git a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Food-Drinks_vr.dm b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Food-Drinks_vr.dm index 1d71f957fe9..246bb05b2c8 100644 --- a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Food-Drinks_vr.dm +++ b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Food-Drinks_vr.dm @@ -125,7 +125,7 @@ /datum/reagent/ethanol/monstertamer/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed) ..() - if(M.species.gets_food_nutrition) //it's still food! + if(M.species.organic_food_coeff) //it's still food! switch(alien) if(IS_DIONA) //Diona don't get any nutrition from nutriment or protein. if(IS_SKRELL) @@ -151,7 +151,7 @@ ..() if(alien == IS_SKRELL) M.adjustToxLoss(removed) //Equivalent to half as much protein, since it's half protein. - if(M.species.gets_food_nutrition) + if(M.species.organic_food_coeff) if(alien == IS_SLIME || alien == IS_CHIMERA) //slimes and chimera can get nutrition from injected nutriment and protein M.adjust_nutrition(alt_nutriment_factor * removed) @@ -430,7 +430,7 @@ /datum/reagent/ethanol/hairoftherat/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed) ..() - if(M.species.gets_food_nutrition) //it's still food! + if(M.species.organic_food_coeff) //it's still food! switch(alien) if(IS_DIONA) //Diona don't get any nutrition from nutriment or protein. if(IS_SKRELL) @@ -456,31 +456,6 @@ ..() if(alien == IS_SKRELL) M.adjustToxLoss(removed) //Equivalent to half as much protein, since it's half protein. - if(M.species.gets_food_nutrition) + if(M.species.organic_food_coeff) if(alien == IS_SLIME || alien == IS_CHIMERA) //slimes and chimera can get nutrition from injected nutriment and protein - M.nutrition += (alt_nutriment_factor * removed) - -/datum/reagent/nutriment - affects_robots = 1 //fbps can get energy from food, but; - var/fbp_factor = 1.5 //divisor for how much it's worth (so, two-thirds normal) - -/datum/reagent/nutriment/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) - if(!injectable && alien != IS_SLIME && alien != IS_CHIMERA && !M.isSynthetic()) - M.adjustToxLoss(0.1 * removed) - return - affect_ingest(M, alien, removed) - -/datum/reagent/nutriment/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed) - switch(alien) - if(IS_DIONA) return - 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. - if(M.species.gets_food_nutrition) //VOREStation edit. If this is set to 0, they don't get nutrition from food. - if(M.isSynthetic() && M.nutrition < 500) //cap us off at the limit just like a charger - M.adjust_nutrition((nutriment_factor / fbp_factor) * removed) - else if(!M.isSynthetic()) - M.adjust_nutrition(nutriment_factor * removed) - if(!M.isSynthetic()) //only meatbags get healing and blood from nutriment - M.heal_organ_damage(0.5 * removed, 0) - M.add_chemical_effect(CE_BLOODRESTORE, 4 * removed) \ No newline at end of file + M.nutrition += (alt_nutriment_factor * removed) \ No newline at end of file From 01dca7736118773b170e2e5147d4f5f4ac7125ef Mon Sep 17 00:00:00 2001 From: Killian <49700375+VarkaSelyn@users.noreply.github.com> Date: Mon, 8 Feb 2021 19:29:50 +0000 Subject: [PATCH 8/8] update to #9659 logic --- .../living/carbon/human/species/station/traits_vr/neutral.dm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/code/modules/mob/living/carbon/human/species/station/traits_vr/neutral.dm b/code/modules/mob/living/carbon/human/species/station/traits_vr/neutral.dm index 7d7508cc751..d3cf48b399a 100644 --- a/code/modules/mob/living/carbon/human/species/station/traits_vr/neutral.dm +++ b/code/modules/mob/living/carbon/human/species/station/traits_vr/neutral.dm @@ -128,10 +128,11 @@ 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." + name = "Biofuel Processor" + desc = "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 custom_only = FALSE + can_take = SYNTHETICS var_changes = list("organic_food_coeff" = 0, "synthetic_food_coeff" = 0.25) /datum/trait/glowing_eyes