Moves walls to item_interaction (#86661)

## About The Pull Request

Closes #86658

## Changelog
🆑
fix: Dismantling walls with plasma cutters works once more
/🆑
This commit is contained in:
SmArtKar
2024-09-16 09:17:43 -04:00
committed by GitHub
parent 0c67418730
commit c6293bcca7
+5 -10
View File
@@ -237,23 +237,18 @@
playsound(src, 'sound/weapons/genhit.ogg', 25, TRUE)
add_fingerprint(user)
/turf/closed/wall/attackby(obj/item/W, mob/user, params)
user.changeNext_move(CLICK_CD_MELEE)
/turf/closed/wall/item_interaction(mob/living/user, obj/item/tool, list/modifiers)
if (!ISADVANCEDTOOLUSER(user))
to_chat(user, span_warning("You don't have the dexterity to do this!"))
return
//get the user's location
if(!isturf(user.loc))
return //can't do this stuff whilst inside objects and such
return ITEM_INTERACT_BLOCKING
add_fingerprint(user)
//the istype cascade has been spread among various procs for easy overriding
if(try_clean(W, user) || try_wallmount(W, user) || try_decon(W, user))
return
if(try_clean(tool, user) || try_wallmount(tool, user) || try_decon(tool, user))
return ITEM_INTERACT_SUCCESS
return ..()
return NONE
/turf/closed/wall/proc/try_clean(obj/item/W, mob/living/user)
if((user.combat_mode) || !LAZYLEN(dent_decals))