mirror of
https://github.com/SPLURT-Station/S.P.L.U.R.T-Station-13.git
synced 2026-08-29 15:50:10 +01:00
Bloodfledge nutrition fixes
The following is changed for Bloodlfedge Bite action: - Add reagent holder variable - Add reaction type (INGEST) to reagent transfer - Refactor transfer/nutrition state checks The following is changed for Strange Reagent: - Add logging for blood with no data - Reduce amount granted by blood to 10% of reaction volume - Move `NO_PROCESS_FOOD` check from `on_mob_life` to `reaction_mob`
This commit is contained in:
@@ -34,6 +34,8 @@
|
||||
|
||||
// Check if blood data exists
|
||||
if(!data)
|
||||
// Log warning and return
|
||||
log_game("[M] attempted to ingest blood that had no data!")
|
||||
return
|
||||
|
||||
// Check for Bloodfledge quirk
|
||||
@@ -45,7 +47,8 @@
|
||||
return
|
||||
|
||||
// Add nutrition reagent
|
||||
M.reagents.add_reagent(/datum/reagent/consumable/notriment, reac_volume)
|
||||
// Reduced to 10%
|
||||
M.reagents.add_reagent(/datum/reagent/consumable/notriment, reac_volume*0.1)
|
||||
|
||||
/datum/reagent/water/holywater/on_mob_life(mob/living/carbon/M)
|
||||
. = ..()
|
||||
@@ -98,12 +101,23 @@
|
||||
nutriment_factor = 10 * REAGENTS_METABOLISM
|
||||
color = "#66552f" // rgb: 102, 85, 47
|
||||
|
||||
/datum/reagent/consumable/notriment/on_mob_life(mob/living/carbon/M)
|
||||
. = ..()
|
||||
/datum/reagent/consumable/notriment/reaction_mob(mob/living/carbon/M, method=TOUCH, reac_volume)
|
||||
// Check if mob can process food
|
||||
if(!HAS_TRAIT(M, TRAIT_NO_PROCESS_FOOD))
|
||||
// Warn user
|
||||
to_chat(M, span_warning("Your body is incapable of processing the Strange Nutriment!"))
|
||||
|
||||
// Remove reagent
|
||||
M.reagents.remove_reagent(/datum/reagent/consumable/notriment/, reac_volume)
|
||||
|
||||
// Ignore this mob
|
||||
return
|
||||
|
||||
// Return normally
|
||||
. = ..()
|
||||
|
||||
/datum/reagent/consumable/notriment/on_mob_life(mob/living/carbon/M)
|
||||
. = ..()
|
||||
|
||||
// Add nutrition
|
||||
M.adjust_nutrition(nutriment_factor, max_nutrition)
|
||||
|
||||
Reference in New Issue
Block a user