From cf39b78cc2071a2ce9946c62bbf1797a1c24c3db Mon Sep 17 00:00:00 2001 From: Mercenaryblue Date: Sun, 8 May 2016 15:39:23 -0400 Subject: [PATCH] The Creampie Throw Update (#17392) * Items washing banana cream Allow common methods of cleaning to wash banana cream pie off your face. * Janiborg cream washing Janiborgs can now wash cream by running over people. * Added Creampie Overlay code When a banana cream pie hits a target mob, it applies a new overlay to the mob. This overlay can then be cleaned via soap, shower, cleaner spray, etc. * Cream Pie Throw Update When hit by a banana cream pie: Adds a creamy overlay to various mobs. Knock targets off for less than a second. Enable cleaning the overlay via soap, shower, and others means. * else fix replace unnecessary if w/ else * Revert "else fix" This reverts commit 5dc5707981f8bc312b8e3ac4ce9ab16e7f20c855. * else fix * Catch Fix Catching a thrown cream pie will no longer delete the item in your hands * Xeno State Creamy Fix Tossing a cream pie will now apply the appropriate overlay to a dead or sleeping xenomorph. Unfortunately, the xenomorph is still able to shake the cream off by switching state, and it keep pushing the wrong overlay on critical xenomorphs. * Human-only code Simplify code to affect only humanoids. * Revert "Human-only code" This reverts commit f74cb0e3af08fc0b793987ed9711dbbfd4d8561b. * Human Code Only Pls no Travis * Optimize code As requested * Bug Fix Overlay no longer unwashable when species get changed via badmin/magic/etc. --- code/game/atoms.dm | 2 ++ code/game/objects/items/weapons/clown_items.dm | 1 + code/game/objects/structures/watercloset.dm | 2 ++ code/modules/detectivework/footprints_and_rag.dm | 1 + code/modules/food&drinks/food/snacks_pie.dm | 13 +++++++++++++ code/modules/mob/living/carbon/human/human.dm | 5 +++++ code/modules/mob/living/silicon/robot/robot.dm | 1 + .../chemistry/reagents/other_reagents.dm | 2 ++ icons/effects/creampie.dmi | Bin 0 -> 2284 bytes 9 files changed, 27 insertions(+) create mode 100644 icons/effects/creampie.dmi diff --git a/code/game/atoms.dm b/code/game/atoms.dm index 038b52b7a91..61366698333 100644 --- a/code/game/atoms.dm +++ b/code/game/atoms.dm @@ -312,6 +312,8 @@ var/list/blood_splatter_icons = list() blood_DNA = null return 1 +/atom/proc/wash_cream() + return 1 /atom/proc/get_global_map_pos() if(!islist(global_map) || isemptylist(global_map)) return diff --git a/code/game/objects/items/weapons/clown_items.dm b/code/game/objects/items/weapons/clown_items.dm index 4912b1e5854..ccc8fc78ce6 100644 --- a/code/game/objects/items/weapons/clown_items.dm +++ b/code/game/objects/items/weapons/clown_items.dm @@ -80,6 +80,7 @@ var/obj/effect/decal/cleanable/C = locate() in target qdel(C) target.clean_blood() + target.wash_cream() return diff --git a/code/game/objects/structures/watercloset.dm b/code/game/objects/structures/watercloset.dm index 099f0da18fa..509263147b8 100644 --- a/code/game/objects/structures/watercloset.dm +++ b/code/game/objects/structures/watercloset.dm @@ -259,6 +259,7 @@ /obj/machinery/shower/proc/wash_mob(mob/living/L) + L.wash_cream() L.ExtinguishMob() L.adjust_fire_stacks(-20) //Douse ourselves with water to avoid fire more easily if(iscarbon(L)) @@ -407,6 +408,7 @@ var/mob/living/carbon/human/H = user H.lip_style = null //Washes off lipstick H.lip_color = initial(H.lip_color) + H.wash_cream() H.regenerate_icons() user.drowsyness = max(user.drowsyness - rand(2,3), 0) //Washing your face wakes you up if you're falling asleep else diff --git a/code/modules/detectivework/footprints_and_rag.dm b/code/modules/detectivework/footprints_and_rag.dm index 19345e4d476..17e5b467066 100644 --- a/code/modules/detectivework/footprints_and_rag.dm +++ b/code/modules/detectivework/footprints_and_rag.dm @@ -47,4 +47,5 @@ if(do_after(user,30, target = A)) user.visible_message("[user] finishes wiping off the [A]!", "You finish wiping off the [A].") A.clean_blood() + A.wash_cream() return diff --git a/code/modules/food&drinks/food/snacks_pie.dm b/code/modules/food&drinks/food/snacks_pie.dm index 17b7241b5b7..f3cd98cd458 100644 --- a/code/modules/food&drinks/food/snacks_pie.dm +++ b/code/modules/food&drinks/food/snacks_pie.dm @@ -27,6 +27,19 @@ var/turf/T = get_turf(hit_atom) new/obj/effect/decal/cleanable/pie_smudge(T) reagents.reaction(hit_atom, TOUCH) + + if(ishuman(hit_atom)) + var/mob/living/carbon/human/H = hit_atom + var/image/creamoverlay = image('icons/effects/creampie.dmi') + if(H.dna.species.id == "lizard") + creamoverlay.icon_state = "creampie_lizard" + else + creamoverlay.icon_state = "creampie_human" + H.Weaken(1) //splat! + H.adjust_blurriness(1) + visible_message("[H] was creamed by the [src]!!") + H.overlays += creamoverlay + qdel(src) diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index d3818e71d5a..9187f04b1ab 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -872,6 +872,11 @@ update_icons() //apply the now updated overlays to the mob +/mob/living/carbon/human/wash_cream() + //clean both to prevent a rare bug + overlays -=image('icons/effects/creampie.dmi', "creampie_lizard") + overlays -=image('icons/effects/creampie.dmi', "creampie_human") + //Turns a mob black, flashes a skeleton overlay //Just like a cartoon! diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index 2c3db69ef8e..3d1ebfaa7cd 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -956,6 +956,7 @@ cleaned_human.shoes.clean_blood() cleaned_human.update_inv_shoes() cleaned_human.clean_blood() + cleaned_human.wash_cream() cleaned_human << "[src] cleans your face!" return diff --git a/code/modules/reagents/chemistry/reagents/other_reagents.dm b/code/modules/reagents/chemistry/reagents/other_reagents.dm index d843c966b6a..92716ddc9d3 100644 --- a/code/modules/reagents/chemistry/reagents/other_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/other_reagents.dm @@ -751,8 +751,10 @@ if(H.shoes) if(H.shoes.clean_blood()) H.update_inv_shoes() + H.wash_cream() M.clean_blood() + /datum/reagent/cryptobiolin name = "Cryptobiolin" id = "cryptobiolin" diff --git a/icons/effects/creampie.dmi b/icons/effects/creampie.dmi new file mode 100644 index 0000000000000000000000000000000000000000..2a0365773b7f0b84757975d07c43668182527986 GIT binary patch literal 2284 zcmY*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