Refactors janitorialcart/attackby and removes a very duplicated proc on mops, lightreplacers and more (#26255)

* Wohooo refactor

* Whoops

* Adds unequip

* Fixes

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

Co-authored-by: Adrer <erwin@lombok.demon.nl>
Signed-off-by: DGamerL <108773801+DGamerL@users.noreply.github.com>

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

Signed-off-by: DGamerL <108773801+DGamerL@users.noreply.github.com>

---------

Signed-off-by: DGamerL <108773801+DGamerL@users.noreply.github.com>
Co-authored-by: Adrer <erwin@lombok.demon.nl>
This commit is contained in:
DGamerL
2024-08-02 18:08:06 +00:00
committed by GitHub
co-authored by Adrer
parent 54b0c33144
commit 4787bf65e0
5 changed files with 62 additions and 86 deletions
@@ -240,7 +240,7 @@
var/turf/replace_turf = get_turf(target)
if(!istype(replace_turf))
return
if(get_dist(src, target) >= (U.client.maxview() + 2)) // To prevent people from using it over cameras
return
@@ -258,13 +258,6 @@
if(!used)
to_chat(U, "[src]'s refill light blinks red.")
/obj/item/lightreplacer/proc/janicart_insert(mob/user, obj/structure/janitorialcart/J)
J.myreplacer = src
J.put_in_cart(src, user)
/obj/item/lightreplacer/cyborg/janicart_insert(mob/user, obj/structure/janitorialcart/J)
return
/obj/item/lightreplacer/cyborg/cyborg_recharge(coeff, emagged)
for(var/I in 1 to coeff)
Charge()