Fixes interaction, properly fixes through window interaction too (#65998)

Fixes interaction (partially)
This commit is contained in:
LemonInTheDark
2022-04-06 10:13:46 +02:00
committed by GitHub
parent 90acf6ddb3
commit 41d4d2a809
3 changed files with 3 additions and 8 deletions
-5
View File
@@ -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
+2 -2
View File
@@ -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)
+1 -1
View File
@@ -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