Files
VOREStation/code/game/objects/items/weapons/mop_deploy.dm
Cameron Lennox d5849910e5 Begin clickcode attack_self fix (#18797)
* Begin clickcode attack_self fix

Begins the work to make everything call back to parent for attack_self so that signals are sacred.

* Makes MORE things call the attack_self() parent

Yes, I could make special_handling a var on obj/item HOWEVER i want it to be specific so it can be tracked down later and ONLY the objects that use it can be refactored instead of sitting there literally forever and it just becoming 'a thing'.

* Finishes making the rest of attack_self call parent.

As mentioned, things such as 'specialty_goggles' 'special_handling' and the such are only there to help with attack_self until the attack_self is recoded for those items.

* begone foul demon

* some more cleanup

* These

* GOD this was annoying

* yeh

* Fix this

* fLARES

* Thesee too

* toys!

* Even more!

* More fixes

* Even more

* rest of em

* these too

* Update syndie.dm

* hardref clear

* Update code/game/gamemodes/nuclear/pinpointer.dm

* Update code/game/objects/effects/mines.dm

* Update code/game/objects/items/blueprints_vr.dm

* Update code/game/objects/items/blueprints_vr.dm

* Update code/game/objects/items/contraband_vr.dm

* Update code/game/objects/items/crayons.dm

* Update code/game/objects/items/crayons.dm

* Update code/game/objects/items/gunbox.dm

* Update code/game/objects/items/gunbox.dm

* Update code/game/objects/items/gunbox_vr.dm

* Update code/game/objects/items/gunbox_vr.dm

* Update code/game/objects/items/weapons/gift_wrappaper.dm

* Update code/game/objects/items/crayons.dm

* Update code/game/objects/items/crayons.dm

* Update code/game/objects/items/gunbox.dm

* these too

* Update maintpanel_stack.dm

* angry warning

* Fixes packaged snacks.

Fixes improper var default.

* Special handling for these

* proper poly types

* Fixes magclaws

Makes the 'features' it had just part  of base magboots that can be adjusted via varswap.

* Fixes jackets

Fixes https://github.com/VOREStation/VOREStation/issues/18941

* Small bugfix

Makes p_Theyre properly capitialize
Makes examine show proper wording

* Update gift_wrappaper.dm
2025-12-29 13:21:10 -05:00

78 lines
2.5 KiB
Plaintext

/obj/item/mop_deploy
name = "mop"
desc = "Deployable mop."
icon = 'icons/obj/janitor.dmi'
icon_state = "mop"
item_flags = DROPDEL | NOSTRIP
force = 3
anchored = TRUE // Never spawned outside of inventory, should be fine.
throwforce = 1 //Throwing or dropping the item deletes it.
throw_speed = 1
throw_range = 1
w_class = ITEMSIZE_LARGE//So you can't hide it in your pocket or some such.
attack_verb = list("mopped", "bashed", "bludgeoned", "whacked")
var/mob/living/creator
var/mopping = 0
var/mopcount = 0
/obj/item/mop_deploy/Initialize(mapload)
. = ..()
create_reagents(5)
START_PROCESSING(SSobj, src)
/turf/proc/clean_deploy(atom/source)
if(source.reagents.has_reagent(REAGENT_ID_WATER, 1))
wash(CLEAN_SCRUB)
if(istype(src, /turf/simulated))
var/turf/simulated/T = src
T.dirt = 0
for(var/obj/effect/O in src)
if(istype(O,/obj/effect/rune) || istype(O,/obj/effect/decal/cleanable) || istype(O,/obj/effect/overlay))
qdel(O)
/* //Reagent code changed at some point and the below doesn't work. To be fixed later.
source.reagents.reaction(src, TOUCH, 10) //10 is the multiplier for the reaction effect. probably needed to wet the floor properly.
source.reagents.remove_any(1) //reaction() doesn't use up the reagents
*/
/obj/item/mop_deploy/afterattack(atom/A, mob/user, proximity)
if(!proximity) return
if(istype(A, /turf) || istype(A, /obj/effect/decal/cleanable) || istype(A, /obj/effect/overlay) || istype(A, /obj/effect/rune))
user.visible_message(span_warning("[user] begins to clean \the [get_turf(A)]."))
if(do_after(user, 4 SECONDS, target = src))
var/turf/T = get_turf(A)
if(T)
T.clean_deploy(src)
to_chat(user, span_notice("You have finished mopping!"))
/obj/effect/attackby(obj/item/I, mob/user)
if(istype(I, /obj/item/mop_deploy) || istype(I, /obj/item/soap))
return
..()
/obj/item/mop_deploy/Destroy()
STOP_PROCESSING(SSobj, src)
. = ..()
/obj/item/mop_deploy/attack_self(mob/user)
. = ..(user)
if(.)
return TRUE
user.drop_from_inventory(src)
spawn(1) if(!QDELETED(src)) qdel(src)
/obj/item/mop_deploy/process()
if(!creator || loc != creator || !creator.item_is_in_hands(src))
// Tidy up a bit.
if(isliving(loc))
var/mob/living/carbon/human/host = loc
if(istype(host))
for(var/obj/item/organ/external/organ in host.organs)
for(var/obj/item/O in organ.implants)
if(O == src)
organ.implants -= src
host.pinned -= src
host.embedded -= src
host.drop_from_inventory(src)
spawn(1) if(!QDELETED(src)) qdel(src)