Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

feeding/eating a pill of NW will now stop you and alert admins if you are not a doctor/nurse #6182

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
13 changes: 10 additions & 3 deletions code/game/objects/items/reagent_containers/pill.dm
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,16 @@
. += ..()

/obj/item/reagent_container/pill/attack(mob/M, mob/user)
var/list/reagents_in_pill = list()
for(var/datum/reagent/R in reagents.reagent_list)
reagents_in_pill += R.name

if(("Nitrogen" in reagents_in_pill) && ("Water" in reagents_in_pill))
if(!skillcheck(user, SKILL_MEDICAL, SKILL_MEDICAL_DOCTOR))
to_chat(user, SPAN_WARNING("You aren't certified to use this chemical mix!"))
message_admins("[user.ckey] is dirty metagamer metaknowledge abuser, ban them immediately!", user.x, user.y, user.z)
return

if(M == user)
if(istype(M, /mob/living/carbon/human))
var/mob/living/carbon/human/H = M
Expand All @@ -69,9 +79,6 @@

M.visible_message(SPAN_NOTICE("[user] swallows [src]."),
SPAN_HELPFUL("You swallow [src]."))
var/list/reagents_in_pill = list()
for(var/datum/reagent/R in reagents.reagent_list)
reagents_in_pill += R.name
var/contained = english_list(reagents_in_pill)
msg_admin_niche("[key_name(user)] swallowed [src] (REAGENTS: [contained]) in [get_area(user)] ([user.loc.x],[user.loc.y],[user.loc.z]).", user.loc.x, user.loc.y, user.loc.z)
M.drop_inv_item_on_ground(src) //icon update
Expand Down