reagent holder rework (#6903)

- reagents are now singletons
- most of reagent holder datums are refactored.
This commit is contained in:
silicons
2025-03-06 20:44:34 +01:00
committed by GitHub
parent 03a5b8a3bf
commit ef19e75993
180 changed files with 4282 additions and 3903 deletions
+12 -12
View File
@@ -16,19 +16,19 @@
owner.reagents.add_reagent(chem, 5)
// They're also super gross and ooze ichor.
if(prob(5))
var/mob/living/carbon/human/H = owner
if(!istype(H))
return
// if(prob(5))
// var/mob/living/carbon/human/H = owner
// if(!istype(H))
// return
var/datum/reagent/blood/B = locate(/datum/reagent/blood) in H.vessel.reagent_list
blood_splatter(H,B,1)
var/obj/effect/debris/cleanable/blood/splatter/goo = locate() in get_turf(owner)
if(goo)
goo.name = "husk ichor"
goo.desc = "It's thick and stinks of decay."
goo.basecolor = "#412464"
goo.update_icon()
// var/datum/reagent/blood/B = locate(/datum/reagent/blood) in H.vessel.reagent_list
// blood_splatter(H,B,1)
// var/obj/effect/debris/cleanable/blood/splatter/goo = locate() in get_turf(owner)
// if(goo)
// goo.name = "husk ichor"
// goo.desc = "It's thick and stinks of decay."
// goo.basecolor = "#412464"
// goo.update_icon()
/obj/item/organ/internal/borer/removed(var/mob/living/user)
@@ -17,15 +17,13 @@
..()
if(!owner) return
var/datum/reagent/coffee = locate(/datum/reagent/drink/coffee) in owner.reagents.reagent_list
if(coffee)
if(owner.reagents.has_reagent(/datum/reagent/drink/coffee::id))
if(is_bruised())
owner.adjustToxLoss(0.1 * (delta_time * 5))
else if(is_broken())
owner.adjustToxLoss(0.3 * (delta_time * 5))
var/datum/reagent/sugar = locate(/datum/reagent/sugar) in owner.reagents.reagent_list
if(sugar)
if(owner.reagents.has_reagent(/datum/reagent/sugar::id))
if(is_bruised())
owner.adjustToxLoss(0.1 * (delta_time * 5))
else if(is_broken())
@@ -12,7 +12,7 @@
// Coffee is really bad for you with busted kidneys.
// This should probably be expanded in some way, but fucked if I know
// what else kidneys can process in our reagent list.
var/datum/reagent/coffee = locate(/datum/reagent/drink/coffee) in owner.reagents.reagent_list
var/datum/reagent/coffee = locate(/datum/reagent/drink/coffee) in owner.reagents.get_reagent_datums()
if(coffee)
if(is_bruised())
owner.adjustToxLoss(0.1 * (dt * 5))