Fixes issue 950. (tele-mopping of floors)

Cleans up mop code a fair bit, and adds a notice to the changelog about computer issues.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4738 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
petethegoat@gmail.com
2012-09-23 14:14:22 +00:00
parent 73aebb51a7
commit cec16a796f
2 changed files with 23 additions and 29 deletions
+14 -29
View File
@@ -3,8 +3,6 @@
name = "mop"
icon = 'icons/obj/janitor.dmi'
icon_state = "mop"
var/mopping = 0
var/mopcount = 0
force = 3.0
throwforce = 10.0
throw_speed = 5
@@ -12,6 +10,8 @@
w_class = 3.0
flags = FPRINT | TABLEPASS
attack_verb = list("mopped", "bashed", "bludgeoned", "whacked")
var/mopping = 0
var/mopcount = 0
/obj/item/weapon/mop/New()
@@ -21,7 +21,7 @@
obj/item/weapon/mop/proc/clean(turf/simulated/A as turf)
src.reagents.reaction(A,1,10)
reagents.reaction(A,1,10)
A.clean_blood()
for(var/obj/effect/O in A)
if( istype(O,/obj/effect/rune) || istype(O,/obj/effect/decal/cleanable) || istype(O,/obj/effect/overlay) )
@@ -35,35 +35,20 @@ obj/item/weapon/mop/proc/clean(turf/simulated/A as turf)
/obj/item/weapon/mop/afterattack(atom/A, mob/user as mob)
if (src.reagents.total_volume < 1 || mopcount >= 5)
user << "\blue Your mop is dry!"
if(reagents.total_volume < 1 || mopcount >= 5)
user << "<span class='notice'>Your mop is dry!</span>"
return
if (istype(A, /turf/simulated))
for(var/mob/O in viewers(user, null))
O.show_message("\red <B>[user] begins to clean \the [A]</B>", 1)
sleep(40)
if(A)
clean(A)
user << "\blue You have finished mopping!"
mopcount++
else if (istype(A, /obj/effect/decal/cleanable) || istype(A, /obj/effect/overlay) || istype(A, /obj/effect/rune))
for(var/mob/O in viewers(user, null))
O.show_message("\red <B>[user] begins to clean \the [get_turf(A)]</B>", 1)
sleep(40)
if(A)
clean(get_turf(A))
user << "\blue You have finished mopping!"
mopcount++
if(istype(A, /turf/simulated) || istype(A, /obj/effect/decal/cleanable) || istype(A, /obj/effect/overlay) || istype(A, /obj/effect/rune))
user.visible_message("<span class='warning'>[user] begins to clean \the [get_turf(A)].</span>")
if(do_after(user, 40))
if(A)
clean(get_turf(A))
user << "<span class='notice'>You have finished mopping!</span>"
mopcount++
if(mopcount >= 5) //Okay this stuff is an ugly hack and i feel bad about it.
spawn(5)
src.reagents.clear_reagents()
reagents.clear_reagents()
mopcount = 0
return
return