From 41d4d2a8098967fa0f2219fcda5f5b32520b05e2 Mon Sep 17 00:00:00 2001 From: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com> Date: Wed, 6 Apr 2022 01:13:46 -0700 Subject: [PATCH] Fixes interaction, properly fixes through window interaction too (#65998) Fixes interaction (partially) --- code/game/machinery/_machinery.dm | 5 ----- code/modules/mob/mob.dm | 4 ++-- code/modules/mob/mob_defines.dm | 2 +- 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/code/game/machinery/_machinery.dm b/code/game/machinery/_machinery.dm index 4f5a5125183..41d7d23870b 100644 --- a/code/game/machinery/_machinery.dm +++ b/code/game/machinery/_machinery.dm @@ -536,11 +536,6 @@ if(!.) return FALSE - var/turf/user_turf = get_turf(user) - var/turf/machine_turf = get_turf(src) - if(!(user_turf in machine_turf.atmos_adjacent_turfs)) - return FALSE - if((interaction_flags_machine & INTERACT_MACHINE_REQUIRES_SIGHT) && user.is_blind()) to_chat(user, span_warning("This machine requires sight to use.")) return FALSE diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 3339b397d33..cbf2e0bc567 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -904,8 +904,8 @@ return TRUE //range check - if(!interaction_range) - return TRUE + if(!interaction_range) // If you don't have extra length, GO AWAY + return FALSE var/turf/our_turf = get_turf(src) var/turf/their_turf = get_turf(A) if (!our_turf || !their_turf) diff --git a/code/modules/mob/mob_defines.dm b/code/modules/mob/mob_defines.dm index 286a27fbd00..4f171e7cdd9 100644 --- a/code/modules/mob/mob_defines.dm +++ b/code/modules/mob/mob_defines.dm @@ -239,4 +239,4 @@ /// A mock client, provided by tests and friends var/datum/client_interface/mock_client - var/interaction_range = 1 //how far a mob has to be to interact with something, defaulted to 1 tile + var/interaction_range = 0 //how far a mob has to be to interact with something without caring about obsctruction, defaulted to 0 tiles