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.
This commit is contained in:
Mercenaryblue
2016-05-08 15:39:23 -04:00
committed by AnturK
parent 53773c3bbf
commit cf39b78cc2
9 changed files with 27 additions and 0 deletions
+2
View File
@@ -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
@@ -80,6 +80,7 @@
var/obj/effect/decal/cleanable/C = locate() in target
qdel(C)
target.clean_blood()
target.wash_cream()
return
@@ -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
@@ -47,4 +47,5 @@
if(do_after(user,30, target = A))
user.visible_message("[user] finishes wiping off the [A]!", "<span class='notice'>You finish wiping off the [A].</span>")
A.clean_blood()
A.wash_cream()
return
@@ -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("<span class='userdanger'>[H] was creamed by the [src]!!</span>")
H.overlays += creamoverlay
qdel(src)
@@ -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!
@@ -956,6 +956,7 @@
cleaned_human.shoes.clean_blood()
cleaned_human.update_inv_shoes()
cleaned_human.clean_blood()
cleaned_human.wash_cream()
cleaned_human << "<span class='danger'>[src] cleans your face!</span>"
return
@@ -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"
Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB