mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-10 22:54:32 +01:00
Adds an SSD Category to the Orbit Menu (#25563)
Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>
This commit is contained in:
@@ -40,7 +40,6 @@ GLOBAL_DATUM_INIT(ghost_crew_monitor, /datum/ui_module/crew_monitor/ghost, new)
|
||||
var/gas_scan = FALSE
|
||||
///toggle for ghost plant analyzer
|
||||
var/plant_analyzer = FALSE
|
||||
var/datum/orbit_menu/orbit_menu
|
||||
/// The "color" their runechat would have had
|
||||
var/alive_runechat_color = "#FFFFFF"
|
||||
/// UID of the mob which we are currently observing
|
||||
@@ -116,9 +115,6 @@ GLOBAL_DATUM_INIT(ghost_crew_monitor, /datum/ui_module/crew_monitor/ghost, new)
|
||||
GLOB.ghost_images -= ghostimage
|
||||
QDEL_NULL(ghostimage)
|
||||
updateallghostimages()
|
||||
if(orbit_menu)
|
||||
SStgui.close_uis(orbit_menu)
|
||||
QDEL_NULL(orbit_menu)
|
||||
if(seerads)
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
remove_observer_verbs()
|
||||
@@ -500,10 +496,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
set name = "Orbit" // "Haunt"
|
||||
set desc = "Follow and orbit a mob."
|
||||
|
||||
if(!orbit_menu)
|
||||
orbit_menu = new(src)
|
||||
|
||||
orbit_menu.ui_interact(src)
|
||||
GLOB.orbit_menu.ui_interact(src)
|
||||
|
||||
/mob/dead/observer/verb/crew_monitor()
|
||||
set category = "Ghost"
|
||||
|
||||
@@ -1,10 +1,6 @@
|
||||
/datum/orbit_menu
|
||||
var/mob/dead/observer/owner
|
||||
GLOBAL_DATUM_INIT(orbit_menu, /datum/orbit_menu, new)
|
||||
|
||||
/datum/orbit_menu/New(mob/dead/observer/new_owner)
|
||||
if(!istype(new_owner))
|
||||
qdel(src)
|
||||
owner = new_owner
|
||||
/datum/orbit_menu
|
||||
|
||||
/datum/orbit_menu/ui_state(mob/user)
|
||||
return GLOB.observer_state
|
||||
@@ -33,10 +29,11 @@
|
||||
if(poi == null)
|
||||
. = TRUE
|
||||
return
|
||||
owner.ManualFollow(poi)
|
||||
var/mob/dead/observer/ghost = ui.user
|
||||
ghost.ManualFollow(poi)
|
||||
. = TRUE
|
||||
if("refresh")
|
||||
update_static_data(owner, ui)
|
||||
update_static_data(ui.user, ui)
|
||||
. = TRUE
|
||||
|
||||
/datum/orbit_menu/ui_static_data(mob/user)
|
||||
@@ -47,6 +44,7 @@
|
||||
var/list/response_teams = list()
|
||||
var/list/antagonists = list()
|
||||
var/list/dead = list()
|
||||
var/list/ssd = list()
|
||||
var/list/ghosts = list()
|
||||
var/list/misc = list()
|
||||
var/list/npcs = list()
|
||||
@@ -82,9 +80,12 @@
|
||||
npcs += list(serialized)
|
||||
else if(M.stat == DEAD)
|
||||
dead += list(serialized)
|
||||
else if(!M.client) // this includes mobs which ghosted, but aren't `player_logged`, so that the Alive count is more accurate
|
||||
ssd += list(serialized)
|
||||
else
|
||||
if(length(orbiters) >= 0.2 * length_of_ghosts) // They're important if 20% of observers are watching them
|
||||
highlights += list(serialized)
|
||||
serialized["ssd"] = !M.client
|
||||
alive += list(serialized)
|
||||
|
||||
var/datum/mind/mind = M.mind
|
||||
@@ -166,6 +167,7 @@
|
||||
data["highlights"] = highlights
|
||||
data["response_teams"] = response_teams
|
||||
data["alive"] = alive
|
||||
data["ssd"] = ssd
|
||||
data["dead"] = dead
|
||||
data["ghosts"] = ghosts
|
||||
data["misc"] = misc
|
||||
|
||||
Reference in New Issue
Block a user