mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-29 07:59:01 +01:00
Fix rags & ashtrays (#11610)
This commit is contained in:
@@ -18,15 +18,17 @@
|
||||
return
|
||||
|
||||
/obj/item/material/ashtray/shatter()
|
||||
..()
|
||||
if(emptyout(get_turf(src)))
|
||||
visible_message(SPAN_DANGER("The contents of [src] spill everywhere!"))
|
||||
|
||||
/obj/item/material/ashtray/proc/emptyout(atom/dest)
|
||||
var/count = 0
|
||||
for (var/obj/item/clothing/mask/smokable/cigarette/O in contents)
|
||||
count++
|
||||
if(!contents.len)
|
||||
return FALSE
|
||||
for (var/obj/O in contents)
|
||||
O.forceMove(dest)
|
||||
return count > 0
|
||||
update_icon()
|
||||
return TRUE
|
||||
|
||||
/obj/item/material/ashtray/attack_self(mob/user)
|
||||
var/turf/dest = get_turf(src)
|
||||
@@ -68,7 +70,7 @@
|
||||
if (istype(W,/obj/item/clothing/mask/smokable/cigarette))
|
||||
var/obj/item/clothing/mask/smokable/cigarette/cig = W
|
||||
if (cig.lit == TRUE)
|
||||
user.visible_message("<b>[user]</b> crushes [cig] in \the [src], putting it out.", SPAN_NOTICE(""))
|
||||
user.visible_message("<b>[user]</b> crushes [cig] in [src], putting it out.", SPAN_NOTICE("You crush [cig] in [src], putting it out."))
|
||||
playsound(src.loc, 'sound/items/cigs_lighters/cig_snuff.ogg', 50, 1)
|
||||
STOP_PROCESSING(SSprocessing, cig)
|
||||
var/obj/item/butt = new cig.type_butt(src)
|
||||
@@ -82,8 +84,9 @@
|
||||
"<b>[user]</b> places [cig] in [src] without even smoking it.",
|
||||
SPAN_NOTICE("You place [cig] in [src] without even smoking it. Why would you do that?")
|
||||
)
|
||||
else
|
||||
user.visible_message("<b>[user]</b> places [W] in [src].", SPAN_NOTICE("You place [W] in [src]."))
|
||||
|
||||
src.visible_message("[user] places [W] in [src].")
|
||||
user.update_inv_l_hand()
|
||||
user.update_inv_r_hand()
|
||||
add_fingerprint(user)
|
||||
|
||||
@@ -459,8 +459,6 @@
|
||||
|
||||
// Filling/emptying open reagent containers
|
||||
var/obj/item/reagent_containers/RG = O
|
||||
if (istype(RG, /obj/item/reagent_containers/glass/rag))
|
||||
return
|
||||
|
||||
if (istype(RG) && RG.is_open_container())
|
||||
var/atype = alert(usr, "Do you want to fill or empty \the [RG] at \the [src]?", "Fill or Empty", "Fill", "Empty", "Cancel")
|
||||
@@ -534,7 +532,7 @@
|
||||
// Short of a rewrite, this is necessary to stop monkeycubes being washed.
|
||||
else if(istype(O, /obj/item/reagent_containers/food/snacks/monkeycube))
|
||||
return
|
||||
else if(istype(O, /obj/item/mop) || istype(O, /obj/item/reagent_containers/glass/rag))
|
||||
else if(istype(O, /obj/item/mop))
|
||||
O.reagents.add_reagent(/decl/reagent/water, 5)
|
||||
to_chat(user, SPAN_NOTICE("You wet \the [O] in \the [src]."))
|
||||
playsound(loc, 'sound/effects/slosh.ogg', 25, 1)
|
||||
|
||||
Reference in New Issue
Block a user