From 97e11a779b0e204169951cb856598c79e4bbbe7b Mon Sep 17 00:00:00 2001 From: Heroman Date: Sat, 15 Jul 2023 06:51:18 +1000 Subject: [PATCH] Post-testing fixes and adjustments --- code/modules/mob/say_vr.dm | 25 ++++++++++++++----------- code/modules/tables/tables.dm | 2 ++ 2 files changed, 16 insertions(+), 11 deletions(-) diff --git a/code/modules/mob/say_vr.dm b/code/modules/mob/say_vr.dm index a12106922c1..d334660e9b3 100644 --- a/code/modules/mob/say_vr.dm +++ b/code/modules/mob/say_vr.dm @@ -69,9 +69,6 @@ else subtle_mode = "Adjacent Turfs (Default)" - if(subtle_mode == "Current Belly (Prey)" && !isbelly(src.loc)) - return - var/input if(!message) input = sanitize_or_reflect(tgui_input_text(src,"Choose an emote to display."), src) @@ -104,23 +101,29 @@ vis_mobs = vis["mobs"] vis_objs = vis["objs"] if("My Table") - vis = get_mobs_and_objs_in_view_fast(get_turf(src),1,2) + vis = get_mobs_and_objs_in_view_fast(get_turf(src),7,2) vis_mobs = vis["mobs"] vis_objs = vis["objs"] var/list/tablelist = list() + var/list/newmoblist = list() + var/list/newobjlist = list() for(var/obj/structure/table/T in range(src, 1)) if(istype(T) && !(T in tablelist) && !istype(T, /obj/structure/table/rack) && !istype(T, /obj/structure/table/bench)) tablelist |= T.get_all_connected_tables() + if(!(tablelist.len)) + to_chat(src, "No nearby tables detected. Your input has not been sent, but preserved: [input]") + return for(var/obj/structure/table/T in tablelist) for(var/mob/M in vis_mobs) - var/turf/tableturf = get_turf(T) - if(!(tableturf.AdjacentQuick(get_turf(M)))) - vis_mobs -= M - for(var/obj/structure/table/T in tablelist) + var/dist = get_dist(T, M) + if(dist >= 0 && dist <= 1) + newmoblist |= M for(var/obj/O in vis_objs) - var/turf/tableturf = get_turf(T) - if(!(tableturf.AdjacentQuick(get_turf(O)))) - vis_objs -= O + var/dist = get_dist(T, O) + if(dist >= 0 && dist <= 1) + newobjlist |= O + vis_mobs = newmoblist + vis_objs = newobjlist if("Current Belly (Prey)") var/obj/belly/B = get_belly(src) if(!istype(B)) diff --git a/code/modules/tables/tables.dm b/code/modules/tables/tables.dm index 2dfdedc5370..3e682a518d3 100644 --- a/code/modules/tables/tables.dm +++ b/code/modules/tables/tables.dm @@ -429,6 +429,8 @@ var/list/table_icon_cache = list() var/turf/T = get_step(src, direction) if(T) var/obj/structure/table/nextT = locate(/obj/structure/table) in T + if(!nextT || !istype(nextT)) + continue if(istype(nextT, /obj/structure/table/rack) || (istype(nextT, /obj/structure/table/bench) && !istype(src, /obj/structure/table/bench)) || (!istype(nextT, /obj/structure/table/bench) && istype(src, /obj/structure/table/bench))) continue if(!(nextT in connections))