Fixes sleeping smoke never disappearing. Also switching processing.Add(src) to processing |= src.

Makes the empty space on the chem bottles sprites clickable.
Fixes a runtime with reagent_containers/throw_impact()
This commit is contained in:
phil235
2015-07-31 15:01:35 +02:00
parent 168e0a457b
commit 6a0be8b9a3
4 changed files with 9 additions and 9 deletions
@@ -29,7 +29,7 @@
/obj/effect/effect/foam/New(loc)
..(loc)
create_reagents(1000) //limited by the size of the reagent holder anyway.
SSobj.processing.Add(src)
SSobj.processing |= src
playsound(src, 'sound/effects/bubbles2.ogg', 80, 1, -3)
/obj/effect/effect/foam/Destroy()
@@ -31,7 +31,7 @@
/obj/effect/effect/smoke/New()
..()
create_reagents(500)
SSobj.processing.Add(src)
SSobj.processing |= src
lifetime += rand(-1,1)
/obj/effect/effect/smoke/Destroy()
@@ -276,8 +276,9 @@
lifetime = 10
/obj/effect/effect/smoke/sleeping/process()
for(var/mob/living/carbon/M in range(1,src))
smoke_mob(M)
if(..())
for(var/mob/living/carbon/M in range(1,src))
smoke_mob(M)
/obj/effect/effect/smoke/sleeping/smoke_mob(mob/living/carbon/M)
if(..())
+4 -5
View File
@@ -82,7 +82,7 @@
/obj/item/weapon/reagent_containers/throw_impact(atom/target)
. = ..()
if(!reagents.total_volume || !spillable)
if(!reagents || !reagents.total_volume || !spillable)
return
if(ismob(target) && target.reagents)
@@ -91,10 +91,9 @@
var/R
target.visible_message("<span class='danger'>[M] has been splashed with something!</span>", \
"<span class='userdanger'>[M] has been splashed with something!</span>")
if(reagents)
for(var/datum/reagent/A in reagents.reagent_list)
R += A.id + " ("
R += num2text(A.volume) + "),"
for(var/datum/reagent/A in reagents.reagent_list)
R += A.id + " ("
R += num2text(A.volume) + "),"
if(thrownby)
add_logs(thrownby, M, "splashed", R)
Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

After

Width:  |  Height:  |  Size: 34 KiB