diff --git a/code/modules/cm_marines/marines_consoles.dm b/code/modules/cm_marines/marines_consoles.dm index 36535a0b5141..4743034a68f4 100644 --- a/code/modules/cm_marines/marines_consoles.dm +++ b/code/modules/cm_marines/marines_consoles.dm @@ -679,11 +679,13 @@ idle_power_usage = 250 active_power_usage = 500 var/faction = FACTION_MARINE + /// What type of /datum/crewmonitor this will create + var/crewmonitor_type = /datum/crewmonitor /obj/structure/machinery/computer/crew/Initialize() . = ..() if(!GLOB.crewmonitor[faction]) - GLOB.crewmonitor[faction] = new /datum/crewmonitor(faction) + GLOB.crewmonitor[faction] = new crewmonitor_type(faction) /obj/structure/machinery/computer/crew/attack_remote(mob/living/user) attack_hand(user) @@ -714,6 +716,12 @@ icon_state = "cmonitor" density = FALSE +/obj/structure/machinery/computer/crew/alt/yautja + name = "\improper Yautja health monitor" + desc = "Used to monitor active health sensors of all Yautja in the system. You can see that the console highlights the human's ship areas with BLUE and the hunting locations with RED." + faction = FACTION_YAUTJA + crewmonitor_type = /datum/crewmonitor/yautja + /obj/structure/machinery/computer/crew/upp faction = FACTION_UPP @@ -790,7 +798,7 @@ GLOBAL_LIST_EMPTY_TYPED(crewmonitor, /datum/crewmonitor) /datum/crewmonitor/ui_data(mob/user) . = list( "sensors" = update_data(), - "link_allowed" = isAI(user) + "link_allowed" = isAI(user), ) /datum/crewmonitor/proc/update_data() @@ -1102,6 +1110,51 @@ GLOBAL_LIST_EMPTY_TYPED(crewmonitor, /datum/crewmonitor) else jobs = list() +/datum/crewmonitor/yautja + faction = FACTION_YAUTJA + +/datum/crewmonitor/yautja/update_data() + var/list/results = list() + for(var/mob/living/carbon/human/human_mob as anything in GLOB.human_mob_list) + + if(!isyautja(human_mob)) + continue + + if(faction != human_mob.faction) + continue + + // Check if z-level is correct + var/turf/pos = get_turf(human_mob) + if(!pos) + continue + + // The entry for this human + var/list/entry = list( + "ref" = REF(human_mob), + "name" = human_mob.real_name, + "ijob" = UNKNOWN_JOB_ID, + "assignment" = "Hunter", + "oxydam" = round(human_mob.getOxyLoss(), 1), + "toxdam" = round(human_mob.getToxLoss(), 1), + "burndam" = round(human_mob.getFireLoss(), 1), + "brutedam" = round(human_mob.getBruteLoss(), 1), + "can_track" = TRUE, + ) + + if(is_mainship_level(pos.z)) + entry["side"] = "Almayer" + + var/area/mob_area = get_area(human_mob) + entry["area"] = sanitize_area(mob_area.name) + + results[++results.len] = entry + + // Cache result + data = results + last_update = world.time + + return results + #undef SENSOR_LIVING #undef SENSOR_VITALS #undef SENSOR_COORDS diff --git a/maps/predship/huntership.dmm b/maps/predship/huntership.dmm index e6fb4adc1c74..d7dcb49427a0 100644 --- a/maps/predship/huntership.dmm +++ b/maps/predship/huntership.dmm @@ -486,8 +486,7 @@ /obj/structure/pipes/standard/simple/hidden{ dir = 4 }, -/obj/structure/machinery/computer/crew/alt{ - faction = "Yautja"; +/obj/structure/machinery/computer/crew/alt/yautja{ pixel_y = 24 }, /turf/open/floor/corsat{