mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-23 05:00:55 +01:00
[READY]New Quirk: Extreme Medicine Allergy (#51870)
* e * meds e * e * e * e * E * E * Update code/datums/traits/negative.dm Co-authored-by: ラッピ from PSO2 <11748095+ExcessiveUseOfCobblestone@users.noreply.github.com> * c * c2 * more blacklistings * dogtag * Update code/modules/reagents/chemistry/reagents.dm Co-authored-by: ラッピ from PSO2 <11748095+ExcessiveUseOfCobblestone@users.noreply.github.com> * E * E * Update code/modules/clothing/under/accessories.dm Co-authored-by: ラッピ from PSO2 <11748095+ExcessiveUseOfCobblestone@users.noreply.github.com> * E Co-authored-by: ラッピ from PSO2 <11748095+ExcessiveUseOfCobblestone@users.noreply.github.com>
This commit is contained in:
co-authored by
ラッピ from PSO2
parent
eaf80e80e8
commit
d1669cea72
@@ -614,6 +614,64 @@
|
||||
medical_record_text = "Patient's mind is in a vulnerable state, and cannot recover from traumatic events."
|
||||
hardcore_value = 9
|
||||
|
||||
/datum/quirk/allergic
|
||||
name = "Extreme Medicine Allergy"
|
||||
desc = "Ever since you were a kid, you've been allergic to certain chemicals..."
|
||||
value = -2
|
||||
gain_text = "<span class='danger'>You feel your immune system shift.</span>"
|
||||
lose_text = "<span class='notice'>You feel your immune system phase back into perfect shape.</span>"
|
||||
medical_record_text = "Patient's immune system responds violently to certain chemicals."
|
||||
hardcore_value = 3
|
||||
var/list/allergies = list()
|
||||
var/list/blacklist = list(/datum/reagent/medicine/c2,/datum/reagent/medicine/epinephrine,/datum/reagent/medicine/adminordrazine,/datum/reagent/medicine/omnizine/godblood,/datum/reagent/medicine/cordiolis_hepatico,/datum/reagent/medicine/synaphydramine,/datum/reagent/medicine/diphenhydramine)
|
||||
|
||||
/datum/quirk/allergic/on_spawn()
|
||||
var/list/chem_list = subtypesof(/datum/reagent/medicine) - blacklist
|
||||
for(var/i in 0 to 5)
|
||||
var/chem = pick(chem_list)
|
||||
chem_list -= chem
|
||||
allergies += chem
|
||||
|
||||
/datum/quirk/allergic/post_add()
|
||||
var/display = ""
|
||||
for(var/C in allergies)
|
||||
var/datum/reagent/chemical = C
|
||||
display += initial(chemical.name) + ", "
|
||||
name = "Extreme " + display +"Allergies"
|
||||
medical_record_text = "Patient's immune system responds violently to [display]"
|
||||
quirk_holder?.mind.store_memory("You are allergic to [display]")
|
||||
to_chat(quirk_holder, "<span class='boldnotice'>You are allergic to [display]make sure not to consume any of it!</span>")
|
||||
if(!ishuman(quirk_holder))
|
||||
return
|
||||
var/mob/living/carbon/human/human_holder = quirk_holder
|
||||
var/obj/item/clothing/accessory/allergy_dogtag/dogtag = new(get_turf(human_holder))
|
||||
var/list/slots = list (
|
||||
"backpack" = ITEM_SLOT_BACKPACK,
|
||||
"hands" = ITEM_SLOT_HANDS
|
||||
)
|
||||
dogtag.display = display
|
||||
human_holder.equip_in_one_of_slots(dogtag, slots , qdel_on_fail = TRUE)
|
||||
|
||||
/datum/quirk/allergic/on_process()
|
||||
. = ..()
|
||||
if(!iscarbon(quirk_holder))
|
||||
return
|
||||
var/mob/living/carbon/carbon_quirk_holder = quirk_holder
|
||||
for(var/M in allergies)
|
||||
var/datum/reagent/instantiated_med = carbon_quirk_holder.reagents.has_reagent(M)
|
||||
if(!instantiated_med)
|
||||
continue
|
||||
//Just halts the progression, I'd suggest you run to medbay asap to get it fixed
|
||||
if(carbon_quirk_holder.reagents.has_reagent(/datum/reagent/medicine/epinephrine))
|
||||
instantiated_med.reagent_removal_skip_list |= ALLERGIC_REMOVAL_SKIP
|
||||
return //intentionally stops the entire proc so we avoid the organ damage after the loop
|
||||
instantiated_med.reagent_removal_skip_list -= ALLERGIC_REMOVAL_SKIP
|
||||
carbon_quirk_holder.adjustToxLoss(3)
|
||||
carbon_quirk_holder.reagents.add_reagent(/datum/reagent/toxin/histamine,3)
|
||||
if(prob(10))
|
||||
carbon_quirk_holder.vomit()
|
||||
carbon_quirk_holder.adjustOrganLoss(pick(ORGAN_SLOT_BRAIN,ORGAN_SLOT_APPENDIX,ORGAN_SLOT_LUNGS,ORGAN_SLOT_HEART,ORGAN_SLOT_LIVER,ORGAN_SLOT_STOMACH),10)
|
||||
|
||||
#undef LOCATION_LPOCKET
|
||||
#undef LOCATION_RPOCKET
|
||||
#undef LOCATION_BACKPACK
|
||||
|
||||
Reference in New Issue
Block a user