mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-01-27 17:33:05 +00:00
Fixed issue 767. The fix for issue 767 was to standardise spray bottle code (to some extent). If any issues come up with spray bottles, pepper spray, or chem sprayers, report them to me. Cyborgs now recharge their pacid and lube, as the size of their bottles was quartered. Changed the flash item_state to "flashbang", as it looks exactly like a flash. There's some more grammar and text clean up too, mostly with crates and closets. Finally, fixed some pipes in virology, and changed the librarian's den so the bookcases are at the top. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4394 316c924e-a436-60f5-8080-3fe189b3f50e
91 lines
2.3 KiB
Plaintext
91 lines
2.3 KiB
Plaintext
/obj/item/weapon/mop
|
|
desc = "The world of janitalia wouldn't be complete without a mop."
|
|
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
|
|
throw_range = 10
|
|
w_class = 3.0
|
|
flags = FPRINT | TABLEPASS
|
|
attack_verb = list("mopped", "bashed", "bludgeoned", "whacked")
|
|
|
|
|
|
/obj/item/weapon/mop/New()
|
|
var/datum/reagents/R = new/datum/reagents(5)
|
|
reagents = R
|
|
R.my_atom = src
|
|
|
|
|
|
obj/item/weapon/mop/proc/clean(turf/simulated/A as turf)
|
|
src.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) )
|
|
del(O)
|
|
|
|
|
|
/obj/effect/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
|
if(istype(W, /obj/item/weapon/mop))
|
|
return
|
|
..()
|
|
|
|
|
|
/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!"
|
|
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(mopcount >= 5) //Okay this stuff is an ugly hack and i feel bad about it.
|
|
spawn(5)
|
|
src.reagents.clear_reagents()
|
|
mopcount = 0
|
|
return
|
|
|
|
|
|
|
|
/*
|
|
* Hope it's okay to stick this shit here: it basically just turns a hexadecimal color into rgb
|
|
*/
|
|
|
|
/proc/GetColors(hex)
|
|
hex = uppertext(hex)
|
|
var/hi1 = text2ascii(hex, 2)
|
|
var/lo1 = text2ascii(hex, 3)
|
|
var/hi2 = text2ascii(hex, 4)
|
|
var/lo2 = text2ascii(hex, 5)
|
|
var/hi3 = text2ascii(hex, 6)
|
|
var/lo3 = text2ascii(hex, 7)
|
|
return list(((hi1>= 65 ? hi1-55 : hi1-48)<<4) | (lo1 >= 65 ? lo1-55 : lo1-48),
|
|
((hi2 >= 65 ? hi2-55 : hi2-48)<<4) | (lo2 >= 65 ? lo2-55 : lo2-48),
|
|
((hi3 >= 65 ? hi3-55 : hi3-48)<<4) | (lo3 >= 65 ? lo3-55 : lo3-48))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|