Revert "12/21 modernizations from TG live"

This commit is contained in:
LetterJay
2016-12-22 22:35:44 -06:00
committed by GitHub
parent cf59ac1c3d
commit ae40d4134e
2215 changed files with 86928 additions and 707332 deletions
+14 -40
View File
@@ -1,3 +1,5 @@
#define is_cleanable(A) (istype(A, /obj/effect/decal/cleanable) || istype(A, /obj/effect/rune))
/obj/item/weapon/mop
desc = "The world of janitalia wouldn't be complete without a mop."
name = "mop"
@@ -7,9 +9,9 @@
throwforce = 5
throw_speed = 3
throw_range = 7
w_class = WEIGHT_CLASS_NORMAL
w_class = 3
attack_verb = list("mopped", "bashed", "bludgeoned", "whacked")
resistance_flags = FLAMMABLE
burn_state = FLAMMABLE
var/mopping = 0
var/mopcount = 0
var/mopcap = 5
@@ -20,13 +22,13 @@
create_reagents(mopcap)
/obj/item/weapon/mop/proc/clean(turf/A)
obj/item/weapon/mop/proc/clean(turf/A)
if(reagents.has_reagent("water", 1) || reagents.has_reagent("holywater", 1) || reagents.has_reagent("vodka", 1) || reagents.has_reagent("cleaner", 1))
A.clean_blood()
for(var/obj/effect/O in A)
if(is_cleanable(O))
qdel(O)
if(isclosedturf(A))
if(istype(A, /turf/closed))
var/turf/closed/C = A
C.thermite = 0
reagents.reaction(A, TOUCH, 10) //Needed for proper floor wetting.
@@ -40,14 +42,16 @@
user << "<span class='warning'>Your mop is dry!</span>"
return
var/turf/T = get_turf(A)
var/turf/turf = A
if(is_cleanable(A))
turf = A.loc
if(T)
user.visible_message("[user] begins to clean \the [T] with [src].", "<span class='notice'>You begin to clean \the [T] with [src]...</span>")
if(istype(turf))
user.visible_message("[user] begins to clean \the [turf] with [src].", "<span class='notice'>You begin to clean \the [turf] with [src]...</span>")
if(do_after(user, src.mopspeed, target = T))
if(do_after(user, src.mopspeed, target = turf))
user << "<span class='notice'>You finish mopping.</span>"
clean(T)
clean(turf)
/obj/effect/attackby(obj/item/I, mob/user, params)
@@ -68,7 +72,7 @@
return
/obj/item/weapon/mop/advanced
desc = "The most advanced tool in a custodian's arsenal, complete with a condenser for self-wetting! Just think of all the viscera you will clean up with this!"
desc = "The most advanced tool in a custodian's arsenal. Just think of all the viscera you will clean up with this!"
name = "advanced mop"
mopcap = 10
icon_state = "advmop"
@@ -78,33 +82,3 @@
throwforce = 8
throw_range = 4
mopspeed = 20
var/refill_enabled = TRUE //Self-refill toggle for when a janitor decides to mop with something other than water.
var/refill_rate = 1 //Rate per process() tick mop refills itself
var/refill_reagent = "water" //Determins what reagent to use for refilling, just in case someone wanted to make a HOLY MOP OF PURGING
/obj/item/weapon/mop/advanced/New()
..()
START_PROCESSING(SSobj, src)
/obj/item/weapon/mop/advanced/attack_self(mob/user)
refill_enabled = !refill_enabled
if(refill_enabled)
START_PROCESSING(SSobj, src)
else
STOP_PROCESSING(SSobj,src)
user << "<span class='notice'>You set the condenser switch to the '[refill_enabled ? "ON" : "OFF"]' position.</span>"
playsound(user, 'sound/machines/click.ogg', 30, 1)
/obj/item/weapon/mop/advanced/process()
if(reagents.total_volume < mopcap)
reagents.add_reagent(refill_reagent, refill_rate)
/obj/item/weapon/mop/advanced/examine(mob/user)
..()
user << "<span class='notice'>The condenser switch is set to <b>[refill_enabled ? "ON" : "OFF"]</b>.</span>"
/obj/item/weapon/mop/advanced/Destroy()
if(refill_enabled)
STOP_PROCESSING(SSobj, src)
return ..()