Fixes overlay glitch in clipboards and allows mice to be butchered (#41322)

As the title suggests, papers no longer disappear once added to a clipboard, and dead mice, the reagent produced as a result of killing them, can now be butchered. The code for the latter did exist, but the functionality did not, as only living mobs can use the butchering proc.

cl Youbar
fix: clipboards now display held papers properly
fix: mice can be butchered
/cl
This commit is contained in:
Youbar
2018-11-12 20:56:14 +13:00
committed by oranges
parent cc4461ca13
commit 70bc84771a
3 changed files with 23 additions and 5 deletions
@@ -150,6 +150,11 @@
name = "monkey meat"
foodtype = RAW | MEAT
/obj/item/reagent_containers/food/snacks/meat/slab/mouse
name = "mouse meat"
desc = "A slab of mouse meat. Best not eat it raw."
foodtype = RAW | MEAT | GROSS
/obj/item/reagent_containers/food/snacks/meat/slab/corgi
name = "corgi meat"
desc = "Tastes like... well you know..."
@@ -13,7 +13,7 @@
see_in_dark = 6
maxHealth = 5
health = 5
butcher_results = list(/obj/item/reagent_containers/food/snacks/meat/slab = 1)
butcher_results = list(/obj/item/reagent_containers/food/snacks/meat/slab/mouse = 1)
response_help = "pets"
response_disarm = "gently pushes aside"
response_harm = "splats"
@@ -113,5 +113,16 @@
foodtype = GROSS | MEAT | RAW
grind_results = list("blood" = 20, "liquidgibs" = 5)
/obj/item/reagent_containers/food/snacks/deadmouse/attackby(obj/item/I, mob/user, params)
if(I.is_sharp() && user.a_intent == INTENT_HARM)
if(isturf(loc))
new /obj/item/reagent_containers/food/snacks/meat/slab/mouse(loc)
to_chat(user, "<span class='notice'>You butcher [src].</span>")
qdel(src)
else
to_chat(user, "<span class='warning'>You need to put [src] on a surface to butcher it!</span>")
else
return ..()
/obj/item/reagent_containers/food/snacks/deadmouse/on_grind()
reagents.clear_reagents()
+6 -4
View File
@@ -27,12 +27,14 @@
/obj/item/clipboard/update_icon()
cut_overlays()
var/list/dat = list()
if(toppaper)
add_overlay(toppaper.icon_state)
copy_overlays(toppaper)
dat += toppaper.icon_state
dat += toppaper.overlays.Copy()
if(haspen)
add_overlay("clipboard_pen")
add_overlay("clipboard_over")
dat += "clipboard_pen"
dat += "clipboard_over"
add_overlay(dat)
/obj/item/clipboard/attackby(obj/item/W, mob/user, params)