update orbiting (#7469)

<!-- Write **BELOW** The Headers and **ABOVE** The comments else it may
not be viewable. -->
<!-- You can view Contributing.MD for a detailed description of the pull
request process. -->

## About The Pull Request

<!-- Describe The Pull Request. Please be sure every change is
documented or this can delay review and even discourage maintainers from
merging your PR! -->

## Why It's Good For The Game

<!-- Argue for the merits of your changes and how they benefit the game,
especially if they are controversial and/or far reaching. If you can't
actually explain WHY what you are doing will improve the game, then it
probably isn't good for the game in the first place. -->

## Changelog

<!-- If your PR modifies aspects of the game that can be concretely
observed by players or admins you should add a changelog. If your change
does NOT meet this description, remove this section. Please note that
maintainers freely reserve the right to remove and add tags should they
deem it appropriate. You can attempt to finagle the system all you want,
but it's best to shoot for clear communication right off the bat. -->

🆑
code: updated WrapAdminProcCall so it doesnt sleep (remove the waiting
feature)
tweak: you can now see how many people are orbiting something
/🆑

<!-- Both 🆑's are required for the changelog to work! You can put
your name to the right of the first 🆑 if you want to overwrite your
GitHub username as author ingame. -->
<!-- You can use multiple of the same prefix (they're only used for the
icon ingame) and delete the unneeded ones. Despite some of the tags,
changelogs should generally represent how a player might be affected by
the changes rather than a summary of the PR's contents. -->
This commit is contained in:
Letter N
2026-01-12 11:18:13 -05:00
committed by GitHub
parent f08f02e4c3
commit 05dc930edd
21 changed files with 432 additions and 135 deletions
+27 -14
View File
@@ -70,7 +70,7 @@ GLOBAL_DATUM_INIT(orbit_menu, /datum/orbit_menu, new)
for(var/mobthing in sortmobs())
var/list/serialized = list()
var/mob/mob_poi = mobthing
// var/number_of_orbiters = length(mob_poi.get_all_orbiters())
var/number_of_orbiters = length(mob_poi.get_all_orbiters())
// ignore magical objects
if (isEye(mob_poi) || isvoice(mob_poi))
@@ -85,12 +85,15 @@ GLOBAL_DATUM_INIT(orbit_menu, /datum/orbit_menu, new)
serialized["ref"] = REF(mob_poi)
serialized["full_name"] = name
// if(number_of_orbiters)
// serialized["orbiters"] = number_of_orbiters
if(number_of_orbiters)
serialized["orbiters"] = number_of_orbiters
if (is_admin)
serialized["ckey"] = mob_poi.ckey
if(isobserver(mob_poi))
// TODO what does this mean? invismin???
if(mob_poi.invisibility >= INVISIBILITY_MAXIMUM)
// TODO remove this, go use TRAIT_ORBITING_FORBIDDEN
if(mob_poi.invisibility >= INVISIBILITY_MAXIMUM) // invismin
continue
ghosts += list(serialized)
continue
@@ -110,9 +113,6 @@ GLOBAL_DATUM_INIT(orbit_menu, /datum/orbit_menu, new)
serialized["client"] = !!mob_poi.client
serialized["name"] = mob_poi.real_name
if (is_admin)
serialized["ckey"] = mob_poi.ckey
if(isliving(mob_poi))
serialized += get_living_data(mob_poi)
@@ -139,11 +139,6 @@ GLOBAL_DATUM_INIT(orbit_menu, /datum/orbit_menu, new)
"can_observe" = FALSE, // autoobserve
)
// do we need it immediately? nah
// /datum/orbit_menu/ui_asset_injection(datum/tgui/ui, list/immediate, list/deferred)
// immediate += /datum/asset_pack/simple/orbit
// return ..()
/// Shows the UI to the specified user.
/datum/orbit_menu/proc/show(mob/user)
ui_interact(user)
@@ -198,7 +193,7 @@ GLOBAL_DATUM_INIT(orbit_menu, /datum/orbit_menu, new)
var/obj/item/card/id/id_card = player.GetIdCard()
serialized["job"] = id_card?.assignment || id_card?.rank
serialized["icon"] = "hudunknown" //id_card?
serialized["icon"] = ckey(id_card?.GetJobName() || "unknown") // ckey for formatting
var/job = player.mind?.assigned_role
if (isnull(job))
@@ -233,6 +228,24 @@ GLOBAL_DATUM_INIT(orbit_menu, /datum/orbit_menu, new)
return list(misc, critical)
// Display the holder if its a nuke disk
if(istype(atom_poi, /obj/item/disk/nuclear))
var/obj/item/disk/nuclear/disk = atom_poi
var/mob/holder = disk.pulledby || get(disk, /mob)
misc["extra"] = "Location: [holder?.real_name || "Unsecured"]"
return list(misc, critical)
// Display singuloths if they exist
if(istype(atom_poi, /obj/singularity))
var/obj/singularity/singulo = atom_poi
misc["extra"] = "Energy: [round(singulo.energy)]"
if(singulo.current_size > 2)
critical = TRUE
return list(misc, critical)
// Display the shuttle
if (istype(atom_poi, /obj/overmap/entity/visitable/ship))
var/obj/overmap/entity/visitable/ship/shuttle = atom_poi