From b1b9c26e426f38bffa5fe600d81cec4398ced24e Mon Sep 17 00:00:00 2001
From: Doxxmedearly <38594443+Doxxmedearly@users.noreply.github.com>
Date: Sun, 17 Nov 2019 15:15:12 -0600
Subject: [PATCH] IPC Crayon Fix (#7443)
---
code/game/objects/items/crayons.dm | 20 +++++-----
html/changelogs/doxxmedearly - crayonfix.yml | 41 ++++++++++++++++++++
2 files changed, 52 insertions(+), 9 deletions(-)
create mode 100644 html/changelogs/doxxmedearly - crayonfix.yml
diff --git a/code/game/objects/items/crayons.dm b/code/game/objects/items/crayons.dm
index 3454aa1efe0..dd5a0145cb9 100644
--- a/code/game/objects/items/crayons.dm
+++ b/code/game/objects/items/crayons.dm
@@ -104,16 +104,18 @@
qdel(src)
return
-/obj/item/pen/crayon/attack(mob/M as mob, mob/user as mob, var/target_zone)
- if(M == user)
- to_chat(user, "You take a bite of the crayon and swallow it.")
- user.adjustNutritionLoss(-1)
- reagents.trans_to_mob(user, 2, CHEM_INGEST)
- if(reagents.total_volume <= 0)
- to_chat(user, "You ate your crayon!")
- qdel(src)
+/obj/item/pen/crayon/attack(mob/user, var/target_zone)
+ if(ishuman(user))
+ var/mob/living/carbon/human/H = user
+ if(H.check_has_mouth())
+ user.visible_message("[user] takes a bite of their crayon and swallows it.", "You take a bite of your crayon and swallow it.")
+ user.adjustNutritionLoss(-1)
+ reagents.trans_to_mob(user, 2, CHEM_INGEST)
+ if(reagents.total_volume <= 0)
+ user.visible_message("[user] finished their crayon!", "You ate your crayon!")
+ qdel(src)
else
- ..(M, user, target_zone)
+ ..(user, target_zone)
/obj/item/pen/crayon/attack_self(var/mob/user)
return
\ No newline at end of file
diff --git a/html/changelogs/doxxmedearly - crayonfix.yml b/html/changelogs/doxxmedearly - crayonfix.yml
new file mode 100644
index 00000000000..107b41e6f00
--- /dev/null
+++ b/html/changelogs/doxxmedearly - crayonfix.yml
@@ -0,0 +1,41 @@
+################################
+# Example Changelog File
+#
+# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb.
+#
+# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.)
+# When it is, any changes listed below will disappear.
+#
+# Valid Prefixes:
+# bugfix
+# wip (For works in progress)
+# tweak
+# soundadd
+# sounddel
+# rscadd (general adding of nice things)
+# rscdel (general deleting of nice things)
+# imageadd
+# imagedel
+# maptweak
+# spellcheck (typo fixes)
+# experiment
+# balance
+# admin
+# backend
+# security
+# refactor
+#################################
+
+# Your name.
+author: Doxxmedearly
+
+# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again.
+delete-after: True
+
+# Any changes you've made. See valid prefix list above.
+# INDENT WITH TWO SPACES. NOT TABS. SPACES.
+# SCREW THIS UP AND IT WON'T WORK.
+# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries.
+# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog.
+changes:
+ - bugfix: "IPCs can no longer eat crayons."