Merge pull request #11533 from VOREStation/upstream-merge-8236

[MIRROR] Allows wiping food off cutlery
This commit is contained in:
Aronai Sieyes
2021-10-22 13:52:23 -04:00
committed by Chompstation Bot
parent 24d867c15f
commit 0f6e69f344
4 changed files with 19 additions and 10 deletions

View File

@@ -477,7 +477,11 @@
src.germ_level = 0 src.germ_level = 0
if(istype(blood_DNA, /list)) if(istype(blood_DNA, /list))
blood_DNA = null blood_DNA = null
return 1 return TRUE
/atom/proc/on_rag_wipe(var/obj/item/weapon/reagent_containers/glass/rag/R)
clean_blood()
R.reagents.splash(src, 1)
/atom/proc/get_global_map_pos() /atom/proc/get_global_map_pos()
if(!islist(global_map) || isemptylist(global_map)) return if(!islist(global_map) || isemptylist(global_map)) return

View File

@@ -84,6 +84,13 @@
to_chat(user, SPAN_WARNING("You don't have anything on \the [src].")) //if we have help intent and no food scooped up DON'T STAB OURSELVES WITH THE FORK to_chat(user, SPAN_WARNING("You don't have anything on \the [src].")) //if we have help intent and no food scooped up DON'T STAB OURSELVES WITH THE FORK
return return
/obj/item/weapon/material/kitchen/utensil/on_rag_wipe()
. = ..()
if(reagents.total_volume > 0)
reagents.clear_reagents()
cut_overlays()
return
/obj/item/weapon/material/kitchen/utensil/fork /obj/item/weapon/material/kitchen/utensil/fork
name = "fork" name = "fork"
desc = "It's a fork. Sure is pointy." desc = "It's a fork. Sure is pointy."

View File

@@ -98,16 +98,11 @@
if(!reagents.total_volume) if(!reagents.total_volume)
to_chat(user, "<span class='warning'>The [initial(name)] is dry!</span>") to_chat(user, "<span class='warning'>The [initial(name)] is dry!</span>")
else else
user.visible_message("\The [user] starts to wipe down [A] with [src]!") user.visible_message("[user] starts to wipe [A] with [src].")
//reagents.splash(A, 1) //get a small amount of liquid on the thing we're wiping.
update_name() update_name()
if(do_after(user,30)) if(do_after(user,30))
user.visible_message("\The [user] finishes wiping off the [A]!") user.visible_message("[user] finishes wiping [A]!")
A.clean_blood() A.on_rag_wipe(src)
if(istype(A, /turf) || istype(A, /obj/effect/decal/cleanable) || istype(A, /obj/effect/overlay) || istype(A, /obj/effect/rune)) //VOREStation Edit - "Allows rags to clean dirt from turfs"
var/turf/T = get_turf(A)
if(T)
T.clean(src, user) //VOREStation Edit End
/obj/item/weapon/reagent_containers/glass/rag/attack(atom/target as obj|turf|area, mob/user as mob , flag) /obj/item/weapon/reagent_containers/glass/rag/attack(atom/target as obj|turf|area, mob/user as mob , flag)
if(isliving(target)) //Leaving this as isliving. if(isliving(target)) //Leaving this as isliving.
@@ -121,7 +116,7 @@
var/mob/living/carbon/human/H = target var/mob/living/carbon/human/H = target
if(H.head && (H.head.body_parts_covered & FACE)) //Check human head coverage. if(H.head && (H.head.body_parts_covered & FACE)) //Check human head coverage.
to_chat(user, "<span class='warning'>Remove their [H.head] first.</span>") to_chat(user, "<span class='warning'>Remove their [H.head] first.</span>")
return return
else if(reagents.total_volume) //Final check. If the rag is not on fire and their face is uncovered, smother target. else if(reagents.total_volume) //Final check. If the rag is not on fire and their face is uncovered, smother target.
user.do_attack_animation(src) user.do_attack_animation(src)
user.visible_message( user.visible_message(

View File

@@ -38,6 +38,9 @@
qdel(src) qdel(src)
return return
/obj/item/weapon/reagent_containers/food/drinks/on_rag_wipe(var/obj/item/weapon/reagent_containers/glass/rag/R)
clean_blood()
/obj/item/weapon/reagent_containers/food/drinks/attack_self(mob/user as mob) /obj/item/weapon/reagent_containers/food/drinks/attack_self(mob/user as mob)
if(!is_open_container()) if(!is_open_container())
open(user) open(user)