Merge pull request #12968 from farie82/AI-turf-click-fix

Makes AI able to click on turfs (flooring)
This commit is contained in:
Crazy Lemon
2020-02-14 21:28:22 -07:00
committed by GitHub
2 changed files with 4 additions and 3 deletions
+2 -2
View File
@@ -42,8 +42,8 @@
if(control_disabled || stat)
return
var/turf/pixel_turf = get_turf_pixel(A)
var/turf/pixel_turf = isturf(A) ? A : get_turf_pixel(A)
if(isnull(pixel_turf))
return
if(!can_see(A))
+2 -1
View File
@@ -1200,7 +1200,8 @@ var/list/ai_verbs_default = list(
if(isturf(loc)) //AI in core, check if on cameras
//get_turf_pixel() is because APCs in maint aren't actually in view of the inner camera
//apc_override is needed here because AIs use their own APC when depowered
return (cameranet && cameranet.checkTurfVis(get_turf_pixel(A))) || apc_override
var/turf/T = isturf(A) ? A : get_turf_pixel(A)
return (cameranet && cameranet.checkTurfVis(T)) || apc_override
//AI is carded/shunted
//view(src) returns nothing for carded/shunted AIs and they have x-ray vision so just use get_dist
var/list/viewscale = getviewsize(client.view)