Orbit menu now shows assigned roles to antaghud users (#24578)

* lol

* FUCK YEAH

* the rest of the bundle

* Update code/modules/asset_cache/assets/asset_orbit_icons.dm

Co-authored-by: warriorstar-orion <orion@snowfrost.garden>

* little tgui thang

---------

Co-authored-by: warriorstar-orion <orion@snowfrost.garden>
Co-authored-by: paradisess13[bot] <165046124+paradisess13[bot]@users.noreply.github.com>
Co-authored-by: S34N <12197162+S34NW@users.noreply.github.com>
This commit is contained in:
Contrabang
2024-04-07 09:45:30 +00:00
committed by GitHub
co-authored by warriorstar-orion paradisess13[bot] <165046124+paradisess13[bot]@users.noreply.github.com> S34N
parent 34ba019704
commit a3c1fecf02
7 changed files with 136 additions and 54 deletions
@@ -0,0 +1,12 @@
/// Sprites for Orbit Role UI
/datum/asset/spritesheet/orbit_job
name = "orbit_job"
/datum/asset/spritesheet/orbit_job/create_spritesheets()
var/list/states = GLOB.joblist + "prisoner" + "centcom" + "solgov" + "soviet" + "unknown"
for(var/state in states)
Insert(ckey(state), 'icons/mob/hud/job_assets.dmi', ckey(state))
/datum/asset/spritesheet/orbit_job/ModifyInserted(icon/pre_asset)
pre_asset.Scale(16, 16)
return pre_asset
+12
View File
@@ -15,6 +15,11 @@
ui = new(user, src, "Orbit", "Orbit")
ui.open()
/datum/orbit_menu/ui_assets(mob/user)
return list(
get_asset_datum(/datum/asset/spritesheet/orbit_job)
)
/datum/orbit_menu/ui_act(action, list/params, datum/tgui/ui)
. = ..()
if(.)
@@ -123,6 +128,13 @@
antag_serialized["antag"] = antag_name
antagonists += list(antag_serialized)
// Antaghud? Let them see everyone's role
if(isliving(M))
var/mob/living/L = M
if(L.mind?.has_normal_assigned_role())
serialized["assigned_role"] = L.mind.assigned_role
serialized["assigned_role_sprite"] = ckey(L.mind.get_assigned_role_asset())
// Player terror spiders (and other hostile player-controlled event mobs) have their own category to help see how much there are.
// Not in the above block because terrors can be known whether AHUD is on or not.
if(isterrorspider(M))