mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-21 19:17:50 +01:00
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:
co-authored by
Henri215
Burzah
parent
ba44b18102
commit
307120e7d3
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user