From d04f115ea9b4a6ed31c5a89131081bd083a5d95d Mon Sep 17 00:00:00 2001 From: Runa Dacino Date: Sat, 5 Aug 2023 13:31:06 +0200 Subject: [PATCH] chore: Deletes examine_vr, moves mob_examine() to main file Per the directives in Development needs, we are removing _vr files where possible. This is a simple, clean merge so I went ahead and did it. --- code/modules/examine/examine.dm | 76 ++++++++++++++++++++++++++++++ code/modules/examine/examine_vr.dm | 74 ----------------------------- vorestation.dme | 1 - 3 files changed, 76 insertions(+), 75 deletions(-) delete mode 100644 code/modules/examine/examine_vr.dm diff --git a/code/modules/examine/examine.dm b/code/modules/examine/examine.dm index c38b746d5e0..6643e677d64 100644 --- a/code/modules/examine/examine.dm +++ b/code/modules/examine/examine.dm @@ -119,3 +119,79 @@ if(client) var/is_antag = ((mind && mind.special_role) || isobserver(src)) //ghosts don't have minds client.update_description_holders(A, is_antag) + + +/mob/verb/mob_examine() + set name = "Mob Examine" + set desc = "Allows one to examine mobs they can see, even from inside of bellies and objects." + set category = "IC" + set popup_menu = FALSE + + if((is_blind(src) || src.stat) && !isobserver(src)) + to_chat(src, "Something is there but you can't see it.") + return 1 + var/list/E = list() + if(isAI(src)) + var/mob/living/silicon/ai/my_ai = src + for(var/e in my_ai.all_eyes) + var/turf/my_turf = get_turf(e) + var/foundcam = FALSE + for(var/obj/cam in view(world.view, my_turf)) + if(istype(cam, /obj/machinery/camera)) + var/obj/machinery/camera/mycam = cam + if(!mycam.stat) + foundcam = TRUE + if(!foundcam) + continue + for(var/atom/M in view(world.view, my_turf)) + if(M == src || istype(M, /mob/observer)) + continue + if(ismob(M) && !M.invisibility) + if(src && src == M) + var/list/results = src.examine(src) + if(!results || !results.len) + results = list("You were unable to examine that. Tell a developer!") + to_chat(src, jointext(results, "
")) + update_examine_panel(src) + return + else + E |= M + if(E.len == 0) + return + else + var/my_turf = get_turf(src) + for(var/atom/M in view(world.view, my_turf)) + if(ismob(M) && M != src && !istype(M, /mob/observer) && !M.invisibility) + E |= M + for(var/turf/T in view(world.view, my_turf)) + if(!isopenspace(T)) + continue + var/turf/checked = T + var/keepgoing = TRUE + while(keepgoing) + var/checking = GetBelow(checked) + for(var/atom/m in checking) + if(ismob(m) && !istype(m, /mob/observer) && !m.invisibility) + E |= m + checked = checking + if(!isopenspace(checked)) + keepgoing = FALSE + + if(E.len == 0) + to_chat(src, SPAN_NOTICE("There are no mobs to examine.")) + return + var/atom/B = null + if(E.len == 1) + B = pick(E) + else + B = tgui_input_list(src, "What would you like to examine?", "Examine", E) + if(!B) + return + if(!isbelly(loc) && !istype(loc, /obj/item/weapon/holder) && !isAI(src)) + if(B.z == src.z) + face_atom(B) + var/list/results = B.examine(src) + if(!results || !results.len) + results = list("You were unable to examine that. Tell a developer!") + to_chat(src, jointext(results, "
")) + update_examine_panel(B) diff --git a/code/modules/examine/examine_vr.dm b/code/modules/examine/examine_vr.dm deleted file mode 100644 index f198da0edb5..00000000000 --- a/code/modules/examine/examine_vr.dm +++ /dev/null @@ -1,74 +0,0 @@ -/mob/verb/mob_examine() - set name = "Mob Examine" - set desc = "Allows one to examine mobs they can see, even from inside of bellies and objects." - set category = "IC" - set popup_menu = FALSE - - if((is_blind(src) || src.stat) && !isobserver(src)) - to_chat(src, "Something is there but you can't see it.") - return 1 - var/list/E = list() - if(isAI(src)) - var/mob/living/silicon/ai/my_ai = src - for(var/e in my_ai.all_eyes) - var/turf/my_turf = get_turf(e) - var/foundcam = FALSE - for(var/obj/cam in view(world.view, my_turf)) - if(istype(cam, /obj/machinery/camera)) - var/obj/machinery/camera/mycam = cam - if(!mycam.stat) - foundcam = TRUE - if(!foundcam) - continue - for(var/atom/M in view(world.view, my_turf)) - if(M == src || istype(M, /mob/observer)) - continue - if(ismob(M) && !M.invisibility) - if(src && src == M) - var/list/results = src.examine(src) - if(!results || !results.len) - results = list("You were unable to examine that. Tell a developer!") - to_chat(src, jointext(results, "
")) - update_examine_panel(src) - return - else - E |= M - if(E.len == 0) - return - else - var/my_turf = get_turf(src) - for(var/atom/M in view(world.view, my_turf)) - if(ismob(M) && M != src && !istype(M, /mob/observer) && !M.invisibility) - E |= M - for(var/turf/T in view(world.view, my_turf)) - if(!isopenspace(T)) - continue - var/turf/checked = T - var/keepgoing = TRUE - while(keepgoing) - var/checking = GetBelow(checked) - for(var/atom/m in checking) - if(ismob(m) && !istype(m, /mob/observer) && !m.invisibility) - E |= m - checked = checking - if(!isopenspace(checked)) - keepgoing = FALSE - - if(E.len == 0) - to_chat(src, SPAN_NOTICE("There are no mobs to examine.")) - return - var/atom/B = null - if(E.len == 1) - B = pick(E) - else - B = tgui_input_list(src, "What would you like to examine?", "Examine", E) - if(!B) - return - if(!isbelly(loc) && !istype(loc, /obj/item/weapon/holder) && !isAI(src)) - if(B.z == src.z) - face_atom(B) - var/list/results = B.examine(src) - if(!results || !results.len) - results = list("You were unable to examine that. Tell a developer!") - to_chat(src, jointext(results, "
")) - update_examine_panel(B) \ No newline at end of file diff --git a/vorestation.dme b/vorestation.dme index d0e6ec2a787..c44874891f8 100644 --- a/vorestation.dme +++ b/vorestation.dme @@ -2290,7 +2290,6 @@ #include "code\modules\events\supply_demand_vr.dm" #include "code\modules\events\wallrot.dm" #include "code\modules\examine\examine.dm" -#include "code\modules\examine\examine_vr.dm" #include "code\modules\examine\stat_icons.dm" #include "code\modules\examine\descriptions\armor.dm" #include "code\modules\examine\descriptions\atmospherics.dm"