mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-07-22 04:28:33 +01:00
Makes digestion efficiency affect vore mechanics
Per #Dev-Suggestions request
This commit is contained in:
@@ -14,4 +14,8 @@
|
||||
. = ..()
|
||||
|
||||
/mob/living/carbon/human/get_digestion_nutrition_modifier()
|
||||
return species.digestion_nutrition_modifier
|
||||
return species.digestion_nutrition_modifier
|
||||
|
||||
/mob/living/carbon/human/get_digestion_efficiency_modifier()
|
||||
return species.digestion_efficiency
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
|
||||
var/organic_food_coeff = 1
|
||||
var/synthetic_food_coeff = 0
|
||||
var/digestion_efficiency = 1 //VORE specific digestion var
|
||||
//var/vore_numbing = 0
|
||||
var/metabolism = 0.0015
|
||||
var/lightweight = FALSE //Oof! Nonhelpful bump stumbles.
|
||||
|
||||
@@ -162,7 +162,7 @@
|
||||
|
||||
/datum/trait/neutral/synth_chemfurnace
|
||||
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. NOTE: Only affects normal food, not alternate (vore, blood, succubusdrain)"
|
||||
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
|
||||
@@ -586,27 +586,27 @@
|
||||
|
||||
/datum/trait/neutral/food_value_down
|
||||
name = "Insatiable"
|
||||
desc = "You need to eat a third of a plate more to be sated. NOTE: Only affects normal food, not alternate (vore, blood, succubusdrain)"
|
||||
desc = "You need to eat a third of a plate more to be sated."
|
||||
cost = 0
|
||||
custom_only = FALSE
|
||||
can_take = ORGANICS
|
||||
var_changes = list(organic_food_coeff = 0.67)
|
||||
var_changes = list(organic_food_coeff = 0.67, digestion_efficiency = 0.66)
|
||||
excludes = list(/datum/trait/neutral/bloodsucker)
|
||||
|
||||
/datum/trait/neutral/food_value_down_plus
|
||||
name = "Insatiable, Greater"
|
||||
desc = "You need to eat three times as much to feel sated. NOTE: Only affects normal food, not alternate (vore, blood, succubusdrain)"
|
||||
desc = "You need to eat three times as much to feel sated."
|
||||
cost = 0
|
||||
custom_only = FALSE
|
||||
can_take = ORGANICS
|
||||
var_changes = list(organic_food_coeff = 0.33)
|
||||
var_changes = list(organic_food_coeff = 0.33, digestion_efficiency = 0.33)
|
||||
excludes = list(/datum/trait/neutral/bloodsucker, /datum/trait/neutral/food_value_down)
|
||||
|
||||
/datum/trait/neutral/biofuel_value_down
|
||||
name = "Discount Biofuel processor"
|
||||
desc = "You are able to gain energy through consuming and processing normal food. Unfortunately, it is half as effective as premium models. NOTE: Only affects normal food, not alternate (vore, blood, succubusdrain)"
|
||||
desc = "You are able to gain energy through consuming and processing normal food. Unfortunately, it is half as effective as premium models."
|
||||
cost = 0
|
||||
custom_only = FALSE
|
||||
can_take = SYNTHETICS
|
||||
var_changes = list("organic_food_coeff" = 0, "synthetic_food_coeff" = 0.3)
|
||||
var_changes = list("organic_food_coeff" = 0, "synthetic_food_coeff" = 0.3, digestion_efficiency = 0.5)
|
||||
excludes = list(/datum/trait/neutral/synth_chemfurnace)
|
||||
|
||||
@@ -63,9 +63,9 @@ GLOBAL_LIST_INIT(digest_modes, list())
|
||||
var/mob/living/silicon/robot/R = B.owner
|
||||
R.cell.charge += 25 * damage_gain
|
||||
if(offset) // If any different than default weight, multiply the % of offset.
|
||||
B.owner.adjust_nutrition(offset*(4.5 * (damage_gain) / difference)*L.get_digestion_nutrition_modifier()) //4.5 nutrition points per health point. Normal same size 100+100 health prey with average weight would give 900 points if the digestion was instant. With all the size/weight offset taxes plus over time oxyloss+hunger taxes deducted with non-instant digestion, this should be enough to not leave the pred starved.
|
||||
B.owner.adjust_nutrition(offset*(4.5 * (damage_gain) / difference)*L.get_digestion_nutrition_modifier()*B.owner.get_digestion_efficiency_modifier()) //4.5 nutrition points per health point. Normal same size 100+100 health prey with average weight would give 900 points if the digestion was instant. With all the size/weight offset taxes plus over time oxyloss+hunger taxes deducted with non-instant digestion, this should be enough to not leave the pred starved.
|
||||
else
|
||||
B.owner.adjust_nutrition((4.5 * (damage_gain) / difference)*L.get_digestion_nutrition_modifier())
|
||||
B.owner.adjust_nutrition((4.5 * (damage_gain) / difference)*L.get_digestion_nutrition_modifier()*B.owner.get_digestion_efficiency_modifier())
|
||||
if(L.stat != oldstat)
|
||||
return list("to_update" = TRUE)
|
||||
|
||||
|
||||
@@ -291,6 +291,7 @@
|
||||
GLOB.prey_digested_roundstat++
|
||||
|
||||
var/personal_nutrition_modifier = M.get_digestion_nutrition_modifier()
|
||||
var/pred_digestion_efficiency = owner.get_digestion_efficiency_modifier()
|
||||
|
||||
if((mode_flags & DM_FLAG_LEAVEREMAINS) && M.digest_leave_remains)
|
||||
handle_remains_leaving(M)
|
||||
@@ -301,7 +302,7 @@
|
||||
var/mob/living/silicon/robot/R = owner
|
||||
R.cell.charge += (nutrition_percent / 100) * compensation * 25 * personal_nutrition_modifier
|
||||
else
|
||||
owner.adjust_nutrition((nutrition_percent / 100) * compensation * 4.5 * personal_nutrition_modifier)
|
||||
owner.adjust_nutrition((nutrition_percent / 100) * compensation * 4.5 * personal_nutrition_modifier * pred_digestion_efficiency)
|
||||
|
||||
/obj/belly/proc/steal_nutrition(mob/living/L)
|
||||
if(L.nutrition >= 100)
|
||||
|
||||
@@ -727,6 +727,9 @@
|
||||
/mob/living/proc/get_digestion_nutrition_modifier()
|
||||
return 1
|
||||
|
||||
/mob/living/proc/get_digestion_efficiency_modifier()
|
||||
return 1
|
||||
|
||||
/mob/living/proc/eat_trash()
|
||||
set name = "Eat Trash"
|
||||
set category = "Abilities"
|
||||
|
||||
Reference in New Issue
Block a user