Patches and pills are now no longer subtypes of food (#23063)

* Part 2 - feeding others doesn't work as intended

* Part 3: fixing force feeding

* Fixes patches being wack

* Makes this less ass

* Adds patches to the chemistry bag

* Update code/modules/mob/living/carbon/carbon.dm

* Update code/modules/mob/living/carbon/carbon.dm

* Some missed patches

* Apply suggestions from code review

Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com>

* Fixes IPC logic

* Henri Review

* Add updatepaths

* Jimkil review

* IPCs now aren't allowed to eat pills and get patch

* Update code/modules/mob/living/carbon/carbon.dm

Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>

* Update code/modules/reagents/reagent_containers/patch.dm

Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>

* Update code/modules/mob/living/carbon/carbon.dm

---------

Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com>
Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>
This commit is contained in:
DGamerL
2023-11-21 15:37:16 +00:00
committed by GitHub
co-authored by Henri215 Burzah
parent ba44b18102
commit 307120e7d3
28 changed files with 285 additions and 236 deletions
+1 -1
View File
@@ -575,7 +575,7 @@
shoes = /obj/item/clothing/shoes/workboots
l_ear = /obj/item/radio/headset/headset_cargo/mining
id = /obj/item/card/id/shaftminer
l_pocket = /obj/item/reagent_containers/food/pill/patch/styptic
l_pocket = /obj/item/reagent_containers/patch/styptic
r_pocket = /obj/item/flashlight/seclite
//Scientist corpse.
+1 -1
View File
@@ -348,5 +348,5 @@
desc = "A tweed mantle, worn by the Research Director. Smells like science."
icon_state = "rdmantle"
item_state = "rdmantle"
allowed = list(/obj/item/analyzer, /obj/item/stack/medical, /obj/item/dnainjector, /obj/item/reagent_containers/dropper, /obj/item/reagent_containers/syringe, /obj/item/reagent_containers/hypospray, /obj/item/reagent_containers/applicator, /obj/item/healthanalyzer, /obj/item/flashlight/pen, /obj/item/reagent_containers/glass/bottle, /obj/item/reagent_containers/glass/beaker, /obj/item/reagent_containers/food/pill, /obj/item/storage/pill_bottle, /obj/item/paper)
allowed = list(/obj/item/analyzer, /obj/item/stack/medical, /obj/item/dnainjector, /obj/item/reagent_containers/dropper, /obj/item/reagent_containers/syringe, /obj/item/reagent_containers/hypospray, /obj/item/reagent_containers/applicator, /obj/item/healthanalyzer, /obj/item/flashlight/pen, /obj/item/reagent_containers/glass/bottle, /obj/item/reagent_containers/glass/beaker, /obj/item/reagent_containers/pill, /obj/item/storage/pill_bottle, /obj/item/paper)
armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 0, RAD = 0, FIRE = 50, ACID = 50)
+1 -1
View File
@@ -7,7 +7,7 @@
suit_adjusted = 1
blood_overlay_type = "coat"
body_parts_covered = UPPER_TORSO|LOWER_TORSO|ARMS
allowed = list(/obj/item/analyzer, /obj/item/stack/medical, /obj/item/dnainjector, /obj/item/reagent_containers/dropper, /obj/item/reagent_containers/syringe, /obj/item/reagent_containers/hypospray, /obj/item/reagent_containers/applicator, /obj/item/healthanalyzer, /obj/item/flashlight/pen, /obj/item/reagent_containers/glass/bottle, /obj/item/reagent_containers/glass/beaker, /obj/item/reagent_containers/food/pill, /obj/item/storage/pill_bottle, /obj/item/paper, /obj/item/robotanalyzer)
allowed = list(/obj/item/analyzer, /obj/item/stack/medical, /obj/item/dnainjector, /obj/item/reagent_containers/dropper, /obj/item/reagent_containers/syringe, /obj/item/reagent_containers/hypospray, /obj/item/reagent_containers/applicator, /obj/item/healthanalyzer, /obj/item/flashlight/pen, /obj/item/reagent_containers/glass/bottle, /obj/item/reagent_containers/glass/beaker, /obj/item/reagent_containers/pill, /obj/item/storage/pill_bottle, /obj/item/paper, /obj/item/robotanalyzer)
armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 0, RAD = 0, FIRE = 50, ACID = 50)
species_exception = list(/datum/species/golem)
sprite_sheets = list(
@@ -9,11 +9,6 @@
var/junkiness = 0 //for junk food. used to lower human satiety.
var/bitesize = 2
var/consume_sound = 'sound/items/eatfood.ogg'
var/apply_type = REAGENT_INGEST
var/apply_method = "swallow"
var/transfer_efficiency = 1.0
var/instant_application = 0 //if we want to bypass the forcedfeed delay
var/can_taste = TRUE//whether you can taste eating from this
var/antable = TRUE // Will ants come near it?
/// location checked every 5 minutes. If its the same place, the food has a chance to spawn ants
var/ant_location
@@ -578,7 +578,7 @@
/obj/item/reagent_containers/iv_bag,
/obj/item/reagent_containers/applicator,
/obj/item/storage/pill_bottle,
/obj/item/reagent_containers/food/pill,
/obj/item/reagent_containers/pill,
/obj/item/stack/medical
))
@@ -618,7 +618,7 @@
/obj/item/reagent_containers/iv_bag,
/obj/item/reagent_containers/applicator,
/obj/item/storage/pill_bottle,
/obj/item/reagent_containers/food/pill,
/obj/item/reagent_containers/pill,
/obj/item/stack/medical
))
@@ -652,8 +652,8 @@
/obj/machinery/smartfridge/secure/chemistry/preloaded/Initialize(mapload)
starting_items = list(
/obj/item/reagent_containers/food/pill/epinephrine = 12,
/obj/item/reagent_containers/food/pill/charcoal = 5,
/obj/item/reagent_containers/pill/epinephrine = 12,
/obj/item/reagent_containers/pill/charcoal = 5,
/obj/item/reagent_containers/glass/bottle/epinephrine = 1,
/obj/item/reagent_containers/glass/bottle/charcoal = 1,
)
+105 -59
View File
@@ -515,7 +515,7 @@ GLOBAL_LIST_INIT(ventcrawl_machinery, list(/obj/machinery/atmospherics/unary/ven
var/failed = 0
if(istype(I, /obj/item/implant))
continue
if(istype(I, /obj/item/reagent_containers/food/pill/patch))
if(istype(I, /obj/item/reagent_containers/patch))
continue
if(I.flags & ABSTRACT)
continue
@@ -1133,87 +1133,133 @@ GLOBAL_LIST_INIT(ventcrawl_machinery, list(/obj/machinery/atmospherics/unary/ven
return shock_reduction
/mob/living/carbon/proc/can_eat(flags = 255)
return 1
return TRUE
/mob/living/carbon/proc/eat(obj/item/reagent_containers/food/toEat, mob/user, bitesize_override)
if(!istype(toEat))
return 0
/mob/living/carbon/proc/eat(obj/item/reagent_containers/to_eat, mob/user, bitesize_override)
if(ispill(to_eat) || ispatch(to_eat))
return consume_patch_or_pill(to_eat, user)
if(!isfood(to_eat)) // We first have to know if it's either a pill or a patch, only then can we check if it's a food item
return FALSE
var/obj/item/reagent_containers/food/food = to_eat // It's not a patch or a pill so it must be food
var/fullness = nutrition + 10
if(istype(toEat, /obj/item/reagent_containers/food/snacks))
if(istype(food, /obj/item/reagent_containers/food/snacks))
for(var/datum/reagent/consumable/C in reagents.reagent_list) //we add the nutrition value of what we're currently digesting
fullness += C.nutriment_factor * C.volume / (C.metabolization_rate * metabolism_efficiency)
if(user == src)
if(istype(toEat, /obj/item/reagent_containers/food/drinks))
if(!selfDrink(toEat))
return 0
else
if(!selfFeed(toEat, fullness))
return 0
else
if(!forceFed(toEat, user, fullness))
return 0
consume(toEat, bitesize_override, can_taste_container = toEat.can_taste)
SSticker.score.score_food_eaten++
return 1
/mob/living/carbon/proc/selfFeed(obj/item/reagent_containers/food/toEat, fullness)
if(ispill(toEat))
to_chat(src, "<span class='notify'>You [toEat.apply_method] [toEat].</span>")
if(user == src)
if(istype(food, /obj/item/reagent_containers/food/drinks))
if(!selfDrink(food))
return FALSE
else
if(!selfFeed(food, fullness))
return FALSE
else
if(toEat.junkiness && satiety < -150 && nutrition > NUTRITION_LEVEL_STARVING + 50)
if(!forceFed(food, user, fullness))
return FALSE
consume(food, bitesize_override)
SSticker.score.score_food_eaten++
return TRUE
/mob/living/carbon/proc/selfFeed(obj/item/reagent_containers/food/to_eat, fullness)
if(ispill(to_eat))
to_chat(src, "<span class='notify'>You swallow [to_eat].</span>")
else if(ispatch(to_eat))
to_chat(src, "<span class='notify'>You apply [to_eat].</span>")
else
if(to_eat.junkiness && satiety < -150 && nutrition > NUTRITION_LEVEL_STARVING + 50)
to_chat(src, "<span class='notice'>You don't feel like eating any more junk food at the moment.</span>")
return 0
return FALSE
if(fullness <= 50)
to_chat(src, "<span class='warning'>You hungrily chew out a piece of [toEat] and gobble it!</span>")
to_chat(src, "<span class='warning'>You hungrily chew out a piece of [to_eat] and gobble it!</span>")
else if(fullness > 50 && fullness < 150)
to_chat(src, "<span class='notice'>You hungrily begin to eat [toEat].</span>")
to_chat(src, "<span class='notice'>You hungrily begin to eat [to_eat].</span>")
else if(fullness > 150 && fullness < 500)
to_chat(src, "<span class='notice'>You take a bite of [toEat].</span>")
to_chat(src, "<span class='notice'>You take a bite of [to_eat].</span>")
else if(fullness > 500 && fullness < 600)
to_chat(src, "<span class='notice'>You unwillingly chew a bit of [toEat].</span>")
to_chat(src, "<span class='notice'>You unwillingly chew a bit of [to_eat].</span>")
else if(fullness > (600 * (1 + overeatduration / 2000))) // The more you eat - the more you can eat
to_chat(src, "<span class='warning'>You cannot force any more of [toEat] to go down your throat.</span>")
return 0
return 1
to_chat(src, "<span class='warning'>You cannot force any more of [to_eat] to go down your throat.</span>")
return FALSE
return TRUE
/mob/living/carbon/proc/selfDrink(obj/item/reagent_containers/food/drinks/toDrink, mob/user)
return 1
return TRUE
/mob/living/carbon/proc/forceFed(obj/item/reagent_containers/food/toEat, mob/user, fullness)
if(ispill(toEat) || fullness <= (600 * (1 + overeatduration / 1000)))
if(!toEat.instant_application)
visible_message("<span class='warning'>[user] attempts to force [src] to [toEat.apply_method] [toEat].</span>")
else
visible_message("<span class='warning'>[user] cannot force anymore of [toEat] down [src]'s throat.</span>")
return 0
if(!toEat.instant_application)
if(!do_mob(user, src))
return 0
forceFedAttackLog(toEat, user)
visible_message("<span class='warning'>[user] forces [src] to [toEat.apply_method] [toEat].</span>")
return 1
/mob/living/carbon/proc/forceFed(obj/item/reagent_containers/to_eat, mob/user, fullness)
if(fullness > (600 * (1 + overeatduration / 1000)))
visible_message("<span class='warning'>[user] cannot force anymore of [to_eat] down [src]'s throat.</span>")
return FALSE
/mob/living/carbon/proc/forceFedAttackLog(obj/item/reagent_containers/food/toEat, mob/user)
add_attack_logs(user, src, "Fed [toEat]. Reagents: [toEat.reagents.log_list(toEat)]", toEat.reagents.harmless_helper() ? ATKLOG_ALMOSTALL : null)
visible_message("<span class='warning'>[user] attempts to force [src] to swallow [to_eat].</span>")
if(!do_after(user, 3 SECONDS, TRUE, src))
return FALSE
forceFedAttackLog(to_eat, user)
visible_message("<span class='warning'>[user] forces [src] to swallow [to_eat].</span>")
return TRUE
/mob/living/carbon/proc/forceFedAttackLog(obj/item/reagent_containers/to_eat, mob/user)
add_attack_logs(user, src, "Fed [to_eat]. Reagents: [to_eat.reagents.log_list(to_eat)]", to_eat.reagents.harmless_helper() ? ATKLOG_ALMOSTALL : null)
/*TO DO - If/when stomach organs are introduced, override this at the human level sending the item to the stomach
so that different stomachs can handle things in different ways VB*/
/mob/living/carbon/proc/consume(obj/item/reagent_containers/food/toEat, bitesize_override, can_taste_container = TRUE)
var/this_bite = bitesize_override ? bitesize_override : toEat.bitesize
if(!toEat.reagents)
/mob/living/carbon/proc/consume(obj/item/reagent_containers/food/to_eat, bitesize_override)
var/this_bite = bitesize_override ? bitesize_override : to_eat.bitesize
if(!to_eat.reagents)
return
if(satiety > -200)
satiety -= toEat.junkiness
if(toEat.consume_sound)
playsound(loc, toEat.consume_sound, rand(10,50), 1)
if(toEat.reagents.total_volume)
if(can_taste_container)
taste(toEat.reagents)
var/fraction = min(this_bite/toEat.reagents.total_volume, 1)
satiety -= to_eat.junkiness
if(to_eat.consume_sound)
playsound(loc, to_eat.consume_sound, rand(10, 50), TRUE)
if(to_eat.reagents.total_volume)
taste(to_eat.reagents)
var/fraction = min(this_bite / to_eat.reagents.total_volume, 1)
if(fraction)
toEat.reagents.reaction(src, toEat.apply_type, fraction)
toEat.reagents.trans_to(src, this_bite*toEat.transfer_efficiency)
to_eat.reagents.reaction(src, REAGENT_INGEST, fraction)
to_eat.reagents.trans_to(src, this_bite)
/mob/living/carbon/proc/consume_patch_or_pill(obj/item/reagent_containers/medicine, user) // medicine = patch or pill
// The reason why this is bundled up is to avoid 2 procs that will be practically identical
if(!medicine.reagents.total_volume)
return TRUE // Doesn't have reagents, would be fine to use up
if(!dna.species.dietflags) // You will not feed the IPC
to_chat(user, "<span class='warning'>You cannot feed [src] [medicine]!</span>")
return FALSE
var/apply_method = "swallow"
var/reagent_application = REAGENT_INGEST
var/requires_mouth = TRUE
var/instant = FALSE
var/efficiency = 1
if(ispatch(medicine))
apply_method = "apply"
reagent_application = REAGENT_TOUCH
requires_mouth = FALSE
efficiency = 0.5 // Patches aren't that good at transporting reagents into the bloodstream
var/obj/item/reagent_containers/patch/patch = medicine
if(patch.instant_application)
instant = TRUE
if(user != src && !instant)
if(requires_mouth && !head)
to_chat(user, "<span class='warning'>You cannot feed [src] [medicine]!</span>")
return FALSE
visible_message("<span class='warning'>[user] attempts to force [src] to [apply_method] [medicine].</span>")
if(!do_after(user, 3 SECONDS, TRUE, src, TRUE))
return FALSE
forceFedAttackLog(medicine, user)
visible_message("<span class='warning'>[user] forces [src] to [apply_method] [medicine].</span>")
else
to_chat(user, "You [apply_method] [medicine].")
var/fraction = min(1 / medicine.reagents.total_volume, 1)
medicine.reagents.reaction(src, reagent_application, fraction)
medicine.reagents.trans_to(src, medicine.reagents.total_volume * efficiency)
return TRUE
/mob/living/carbon/get_access()
. = ..()
@@ -364,7 +364,7 @@
var/applied_amount = 0.35 * multiple_patch_multiplier
for(var/patch in processing_patches)
var/obj/item/reagent_containers/food/pill/patch/P = patch
var/obj/item/reagent_containers/patch/P = patch
if(P.reagents && P.reagents.total_volume)
var/fractional_applied_amount = applied_amount / P.reagents.total_volume
@@ -461,7 +461,7 @@
to_chat(usr, "<span class='notice'>Not enough reagents to create these pills!</span>")
return
var/obj/item/reagent_containers/food/pill/P = new(loc)
var/obj/item/reagent_containers/pill/P = new(loc)
P.name = "[answer] pill"
P.pixel_x = rand(-7, 7) // Random position
P.pixel_y = rand(-7, 7)
@@ -495,7 +495,7 @@
to_chat(usr, "<span class='notice'>Not enough reagents to create these patches!</span>")
return
var/obj/item/reagent_containers/food/pill/patch/P = new(loc)
var/obj/item/reagent_containers/patch/P = new(loc)
P.name = "[answer] patch"
P.pixel_x = rand(-7, 7) // random position
P.pixel_y = rand(-7, 7)
@@ -1,4 +1,4 @@
/obj/item/reagent_containers/food/pill/patch
/obj/item/reagent_containers/patch
name = "chemical patch"
desc = "A chemical patch for touch based applications."
icon = 'icons/obj/chemical.dmi'
@@ -6,17 +6,20 @@
item_state = "bandaid"
possible_transfer_amounts = null
volume = 30
apply_type = REAGENT_TOUCH
apply_method = "apply"
transfer_efficiency = 0.5 //patches aren't as effective at getting chemicals into the bloodstream.
temperature_min = 270
temperature_max = 350
var/instant_application = FALSE
var/needs_to_apply_reagents = TRUE
/obj/item/reagent_containers/food/pill/patch/attack(mob/living/carbon/M, mob/user, def_zone)
/obj/item/reagent_containers/patch/attack(mob/living/carbon/M, mob/user, def_zone)
return apply(M, user)
/obj/item/reagent_containers/patch/attack_self(mob/user)
return apply(user, user)
/obj/item/reagent_containers/patch/proc/apply(mob/living/carbon/M, mob/user)
if(!istype(M))
return FALSE
bitesize = 0
if(M.eat(src, user))
if(user.get_active_hand() == src)
user.drop_item() // Only drop if they're holding the patch directly
@@ -25,50 +28,47 @@
return TRUE
return FALSE
/obj/item/reagent_containers/food/pill/patch/afterattack(obj/target, mob/user , proximity)
return // thanks inheritance again
/obj/item/reagent_containers/food/pill/patch/styptic
/obj/item/reagent_containers/patch/styptic
name = "brute patch"
desc = "Helps with brute injuries."
icon_state = "bandaid_brute"
instant_application = 1
instant_application = TRUE
list_reagents = list("styptic_powder" = 30)
/obj/item/reagent_containers/food/pill/patch/styptic/small
/obj/item/reagent_containers/patch/styptic/small
name = "brute mini-patch"
list_reagents = list("styptic_powder" = 15)
/obj/item/reagent_containers/food/pill/patch/silver_sulf
/obj/item/reagent_containers/patch/silver_sulf
name = "burn patch"
desc = "Helps with burn injuries."
icon_state = "bandaid_burn"
instant_application = 1
instant_application = TRUE
list_reagents = list("silver_sulfadiazine" = 30)
/obj/item/reagent_containers/food/pill/patch/silver_sulf/small
/obj/item/reagent_containers/patch/silver_sulf/small
name = "burn mini-patch"
list_reagents = list("silver_sulfadiazine" = 15)
/obj/item/reagent_containers/food/pill/patch/synthflesh
/obj/item/reagent_containers/patch/synthflesh
name = "synthflesh patch"
desc = "Helps with brute and burn injuries."
icon_state = "bandaid_med"
instant_application = 1
instant_application = TRUE
list_reagents = list("synthflesh" = 10)
/obj/item/reagent_containers/food/pill/patch/nicotine
/obj/item/reagent_containers/patch/nicotine
name = "nicotine patch"
desc = "Helps temporarily curb the cravings of nicotine dependency."
list_reagents = list("nicotine" = 10)
/obj/item/reagent_containers/food/pill/patch/jestosterone
/obj/item/reagent_containers/patch/jestosterone
name = "jestosterone patch"
desc = "Helps with brute injuries if the affected person is a clown, otherwise inflicts various annoying effects."
icon_state = "bandaid_clown"
list_reagents = list("jestosterone" = 20)
/obj/item/reagent_containers/food/pill/patch/perfluorodecalin
/obj/item/reagent_containers/patch/perfluorodecalin
name = "perfluorodecalin patch"
desc = "Incredibly potent respiratory aid drug, may cause shortness of breath if used in large amounts."
icon_state = "bandaid_med"
@@ -3,7 +3,7 @@
*
* A swallowable pill. Can be dissolved in reagent containers.
*/
/obj/item/reagent_containers/food/pill
/obj/item/reagent_containers/pill
name = "pill"
desc = "A pill."
icon = 'icons/obj/chemical.dmi'
@@ -13,31 +13,27 @@
possible_transfer_amounts = null
volume = 100
has_lid = FALSE
consume_sound = null
can_taste = FALSE
antable = FALSE
/obj/item/reagent_containers/food/pill/Initialize(mapload)
/obj/item/reagent_containers/pill/Initialize(mapload)
. = ..()
if(!icon_state)
icon_state = "pill[rand(1, 20)]"
/obj/item/reagent_containers/food/pill/proc/apply(mob/living/carbon/M, mob/user, def_zone)
/obj/item/reagent_containers/pill/proc/apply(mob/living/carbon/M, mob/user, def_zone)
if(!istype(M))
return FALSE
bitesize = reagents.total_volume
if(M.eat(src, user))
qdel(src)
return TRUE
return FALSE
/obj/item/reagent_containers/food/pill/attack(mob/living/carbon/M, mob/user, def_zone)
/obj/item/reagent_containers/pill/attack(mob/living/carbon/M, mob/user, def_zone)
return apply(M, user)
/obj/item/reagent_containers/food/pill/attack_self(mob/user)
/obj/item/reagent_containers/pill/attack_self(mob/user)
return apply(user, user)
/obj/item/reagent_containers/food/pill/afterattack(obj/target, mob/user, proximity)
/obj/item/reagent_containers/pill/afterattack(obj/target, mob/user, proximity)
if(!proximity || !target.is_refillable())
return
if(target.reagents.holder_full())
@@ -51,138 +47,138 @@
qdel(src)
// Basic set of pills below
/obj/item/reagent_containers/food/pill/tox
/obj/item/reagent_containers/pill/tox
name = "\improper Toxin pill"
desc = "Highly toxic."
icon_state = "pill21"
list_reagents = list("toxin" = 50)
/obj/item/reagent_containers/food/pill/initropidril
/obj/item/reagent_containers/pill/initropidril
name = "\improper Initropidril pill"
desc = "Don't swallow this."
icon_state = "pill21"
list_reagents = list("initropidril" = 50)
/obj/item/reagent_containers/food/pill/fakedeath
/obj/item/reagent_containers/pill/fakedeath
name = "fake death pill"
desc = "Swallow then rest to appear dead, stand up to wake up. Also mutes the user's voice."
icon_state = "pill4"
list_reagents = list("capulettium_plus" = 50)
/obj/item/reagent_containers/food/pill/adminordrazine
/obj/item/reagent_containers/pill/adminordrazine
name = "\improper Adminordrazine pill"
desc = "It's magic. We don't have to explain it."
icon_state = "pill16"
list_reagents = list("adminordrazine" = 50)
/obj/item/reagent_containers/food/pill/morphine
/obj/item/reagent_containers/pill/morphine
name = "\improper Morphine pill"
desc = "Commonly used to treat insomnia."
icon_state = "pill8"
list_reagents = list("morphine" = 30)
/obj/item/reagent_containers/food/pill/methamphetamine
/obj/item/reagent_containers/pill/methamphetamine
name = "\improper Methamphetamine pill"
desc = "Helps improve the ability to concentrate."
icon_state = "pill8"
list_reagents = list("methamphetamine" = 5)
/obj/item/reagent_containers/food/pill/haloperidol
/obj/item/reagent_containers/pill/haloperidol
name = "\improper Haloperidol pill"
desc = "Haloperidol is an anti-psychotic used to treat psychiatric problems."
icon_state = "pill8"
list_reagents = list("haloperidol" = 15)
/obj/item/reagent_containers/food/pill/happy_psych
/obj/item/reagent_containers/pill/happy_psych
name = "mood stabilizer pill"
desc = "Used to temporarily alleviate anxiety and depression. Take only as prescribed."
icon_state = "pill_happy"
list_reagents = list("happiness" = 15, "mannitol" = 5)
/obj/item/reagent_containers/food/pill/happy
/obj/item/reagent_containers/pill/happy
name = "happy pill"
desc = "They have little happy faces on them and smell like marker pens."
icon_state = "pill_happy"
list_reagents = list("space_drugs" = 15, "sugar" = 15)
/obj/item/reagent_containers/food/pill/happy/happiness
/obj/item/reagent_containers/pill/happy/happiness
name = "fun pill"
desc = "Makes you feel real good!"
list_reagents = list("happiness" = 15)
/obj/item/reagent_containers/food/pill/zoom
/obj/item/reagent_containers/pill/zoom
name = "zoom pill"
desc = "Zoooom!"
icon_state = "pill18"
list_reagents = list("synaptizine" = 5, "methamphetamine" = 5)
/obj/item/reagent_containers/food/pill/charcoal
/obj/item/reagent_containers/pill/charcoal
name = "\improper Charcoal pill"
desc = "Neutralizes many common toxins."
icon_state = "pill17"
list_reagents = list("charcoal" = 50)
/obj/item/reagent_containers/food/pill/epinephrine
/obj/item/reagent_containers/pill/epinephrine
name = "\improper Epinephrine pill"
desc = "Used to provide shots of adrenaline."
icon_state = "pill6"
list_reagents = list("epinephrine" = 50)
/obj/item/reagent_containers/food/pill/salicylic
/obj/item/reagent_containers/pill/salicylic
name = "\improper Salicylic Acid pill"
desc = "Commonly used to treat moderate pain and fevers."
icon_state = "pill4"
list_reagents = list("sal_acid" = 20)
/obj/item/reagent_containers/food/pill/salbutamol
/obj/item/reagent_containers/pill/salbutamol
name = "\improper Salbutamol pill"
desc = "Used to treat respiratory distress."
icon_state = "pill8"
list_reagents = list("salbutamol" = 20)
/obj/item/reagent_containers/food/pill/hydrocodone
/obj/item/reagent_containers/pill/hydrocodone
name = "\improper Hydrocodone pill"
desc = "Used to treat extreme pain."
icon_state = "pill6"
list_reagents = list("hydrocodone" = 15)
/obj/item/reagent_containers/food/pill/calomel
/obj/item/reagent_containers/pill/calomel
name = "\improper Calomel pill"
desc = "Can be used to purge impurities, but is highly toxic itself."
icon_state = "pill3"
list_reagents = list("calomel" = 15)
/obj/item/reagent_containers/food/pill/mutadone
/obj/item/reagent_containers/pill/mutadone
name = "\improper Mutadone pill"
desc = "Used to cure genetic abnormalities."
icon_state = "pill13"
list_reagents = list("mutadone" = 1)
/obj/item/reagent_containers/food/pill/mannitol
/obj/item/reagent_containers/pill/mannitol
name = "\improper Mannitol pill"
desc = "Used to treat cranial swelling."
icon_state = "pill19"
list_reagents = list("mannitol" = 10)
/obj/item/reagent_containers/food/pill/pentetic
/obj/item/reagent_containers/pill/pentetic
name ="\improper Pentetic pill"
desc = "Used to purge substances and radiation."
icon_state = "pill7"
list_reagents = list("pen_acid" = 5)
/obj/item/reagent_containers/food/pill/ironsaline
/obj/item/reagent_containers/pill/ironsaline
name = "\improper Iron saline pill"
desc = "Used to help with blood loss."
icon_state = "pill2"
list_reagents = list("iron" = 10, "salglu_solution" = 10)
/obj/item/reagent_containers/food/pill/lazarus_reagent
/obj/item/reagent_containers/pill/lazarus_reagent
name = "\improper Lazarus Reagent pill"
desc = "Miraculous drug used for revival. Use with caution. Improper use may cause bodies to violently blow apart."
icon_state = "pill9"
list_reagents = list("lazarus_reagent" = 1)
/obj/item/reagent_containers/food/pill/rezadone
/obj/item/reagent_containers/pill/rezadone
name = "\improper Rezadone pill"
desc = "Used to rapidly repair cellular defects within a subject's cell structure."
icon_state = "pill10"
+3 -3
View File
@@ -12,7 +12,7 @@
/datum/surgery_step/insert_pill
name = "insert pill"
allowed_tools = list(/obj/item/reagent_containers/food/pill = 100)
allowed_tools = list(/obj/item/reagent_containers/pill = 100)
time = 1.6 SECONDS
/datum/surgery_step/insert_pill/begin_step(mob/living/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
@@ -22,12 +22,12 @@
)
return ..()
/datum/surgery_step/insert_pill/end_step(mob/living/user, mob/living/carbon/target, target_zone, obj/item/reagent_containers/food/pill/tool, datum/surgery/surgery)
/datum/surgery_step/insert_pill/end_step(mob/living/user, mob/living/carbon/target, target_zone, obj/item/reagent_containers/pill/tool, datum/surgery/surgery)
if(!istype(tool))
return SURGERY_STEP_INCOMPLETE
var/dental_implants = 0
for(var/obj/item/reagent_containers/food/pill in target.contents) // Can't give them more than 4 dental implants.
for(var/obj/item/reagent_containers/pill in target.contents) // Can't give them more than 4 dental implants.
dental_implants++
if(dental_implants >= 4)
user.visible_message("[user] pulls \the [tool] back out of [target]'s [parse_zone(target_zone)]!", "<span class='notice'>You pull \the [tool] back out of [target]'s [parse_zone(target_zone)], there wans't enough room...</span>")