mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-18 02:24:11 +01:00
Generalizes the chemical blacklist, refactors some other chemical lists and cleans up some related code (#21810)
* almost done * HELP, SCOPE KEEPS INCREASING * if this isn't the last thing, blame my sleepy me * fucking foam all my homies hate foam * remove the extra whitespace * ghhh this needs testing + revert old shit * first sleeper steps * okay now to revert some changes * oops forgot this * more fixes * iv bags can't dupe shit anymore too * removes coniine from the list because why not * removes life and histamine * this should pass Cl * stop runtiming me for unexisting chemicals * adds ???? instead + god I hope this passes Cl * attempt #2 to fix Cl * Cl still fails but no solution now - static lists * One fucking day Cl will not fail + complete remove * I am going insane * I am praying to several gods * I'm getting desparate * whoops that's my bad * whoopsie number 2 * oops space indentation * one rubber ducky later * attempt number I am in a psych ward * CODING CHAT MY BELOVED * last things * foam is also not a chemical * now it shouldn't remake the list every time * Henri review * Adds saturated activated charcoal * Charlie review
This commit is contained in:
@@ -290,30 +290,31 @@
|
||||
|
||||
|
||||
/obj/item/queen_bee/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/reagent_containers/syringe))
|
||||
var/obj/item/reagent_containers/syringe/S = I
|
||||
if(S.reagents.has_reagent("royal_bee_jelly")) //checked twice, because I really don't want royal bee jelly to be duped
|
||||
if(S.reagents.has_reagent("royal_bee_jelly", 5))
|
||||
S.reagents.remove_reagent("royal_bee_jelly", 5)
|
||||
var/obj/item/queen_bee/qb = new(user.drop_location())
|
||||
qb.queen = new(qb)
|
||||
if(queen && queen.beegent)
|
||||
qb.queen.assign_reagent(queen.beegent) //Bees use the global singleton instances of reagents, so we don't need to worry about one bee being deleted and her copies losing their reagents.
|
||||
user.put_in_active_hand(qb)
|
||||
user.visible_message("<span class='notice'>[user] injects [src] with royal bee jelly, causing it to split into two bees, MORE BEES!</span>","<span class ='warning'>You inject [src] with royal bee jelly, causing it to split into two bees, MORE BEES!</span>")
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You don't have enough royal bee jelly to split a bee in two!</span>")
|
||||
else
|
||||
var/datum/reagent/R = GLOB.chemical_reagents_list[S.reagents.get_master_reagent_id()]
|
||||
if(R && S.reagents.has_reagent(R.id, 5))
|
||||
S.reagents.remove_reagent(R.id, 5)
|
||||
queen.assign_reagent(R)
|
||||
user.visible_message("<span class='warning'>[user] injects [src]'s genome with [R.name], mutating its DNA!</span>", "<span class='warning'>You inject [src]'s genome with [R.name], mutating its DNA!</span>")
|
||||
name = queen.name
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You don't have enough units of that chemical to modify the bee's DNA!</span>")
|
||||
else
|
||||
if(!istype(I, /obj/item/reagent_containers/syringe))
|
||||
return ..()
|
||||
var/obj/item/reagent_containers/syringe/S = I
|
||||
if(S.reagents.has_reagent("royal_bee_jelly", 5))
|
||||
S.reagents.remove_reagent("royal_bee_jelly", 5)
|
||||
var/obj/item/queen_bee/qb = new(user.drop_location())
|
||||
qb.queen = new(qb)
|
||||
if(queen?.beegent)
|
||||
qb.queen.assign_reagent(queen.beegent) //Bees use the global singleton instances of reagents, so we don't need to worry about one bee being deleted and her copies losing their reagents.
|
||||
user.put_in_active_hand(qb)
|
||||
user.visible_message("<span class='notice'>[user] injects [src] with royal bee jelly, causing it to split into two bees, MORE BEES!</span>", "<span class='warning'>You inject [src] with royal bee jelly, causing it to split into two bees, MORE BEES!</span>")
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You don't have enough royal bee jelly to split a bee in two!</span>")
|
||||
return
|
||||
var/datum/reagent/R = GLOB.chemical_reagents_list[S.reagents.get_master_reagent_id()]
|
||||
if(R && S.reagents.has_reagent(R.id, 5))
|
||||
S.reagents.remove_reagent(R.id, 5) // Whether or not the chemical is blocked, we want it gone just because you tried to
|
||||
if(R.id in GLOB.blocked_chems)
|
||||
to_chat(user, "<span class='warning'>The [src]'s immune system rejects [R.name]!</span>")
|
||||
return
|
||||
queen.assign_reagent(R)
|
||||
user.visible_message("<span class='warning'>[user] injects [src]'s genome with [R.name], mutating its DNA!</span>", "<span class='warning'>You inject [src]'s genome with [R.name], mutating its DNA!</span>")
|
||||
name = queen.name
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You don't have enough units of that chemical to modify the bee's DNA!</span>")
|
||||
|
||||
/obj/item/queen_bee/bought/Initialize(mapload)
|
||||
. = ..()
|
||||
|
||||
Reference in New Issue
Block a user