Upstream fix mirror spree (#7362)
* tgstation/tgstation#39025 - Fixes nukeop eshield not being buyable * tgstation/tgstation#39011 - [s] Adds missing logging to the staff of storms * tgstation/tgstation#38980 - Corrects a stat error in the Nuke Ops uplink * tgstation/tgstation#38988 - Fixes blob victory. * tgstation/tgstation#38990 - Allow players to un-ignore previously ignored popups for ghostroles, and ignore notifications with no ignore button needs tgui recompile * tgstation/tgstation#38994 - Fix timer bug * TGUI recompile * tgstation/tgstation#39035 - Fixes navigation computers. * tgstation/tgstation#39043 - Fixes minor genetics scanner runtime * tgstation/tgstation#39044 - Fixes burgers icons * tgstation/tgstation#39055 - Fixes porta_turret and decal shuttle rotations * tgstation/tgstation#39063 - Stops extinguishers from cooling turfs to absolute zero * tgstation/tgstation#38967 - Fixes smuggler's satchel init typo * tgstation/tgstation#38931 - Fixes pulse rifles exploding structures in nullspace and that sort of thing
This commit is contained in:
@@ -0,0 +1,49 @@
|
||||
/mob/dead/observer/verb/show_notificationprefs()
|
||||
set category = "Ghost"
|
||||
set name = "Notification preferences"
|
||||
set desc = "Notification preferences"
|
||||
|
||||
var/datum/notificationpanel/panel = new(usr)
|
||||
|
||||
panel.ui_interact(usr)
|
||||
|
||||
|
||||
|
||||
/datum/notificationpanel
|
||||
var/client/user
|
||||
|
||||
/datum/notificationpanel/New(user)
|
||||
if (ismob(user))
|
||||
var/mob/M = user
|
||||
if (!M.client)
|
||||
CRASH("Ghost role notification panel attempted to open to a mob without a client")
|
||||
src.user = M.client
|
||||
else
|
||||
src.user = user
|
||||
|
||||
/datum/notificationpanel/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, datum/tgui/master_ui = null, datum/ui_state/state = GLOB.observer_state)
|
||||
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "notificationpanel", "Notification Preferences", 700, 700, master_ui, state)
|
||||
ui.open()
|
||||
|
||||
/datum/notificationpanel/ui_data(mob/user)
|
||||
. = list()
|
||||
.["ignore"] = list()
|
||||
for(var/key in GLOB.poll_ignore_desc)
|
||||
.["ignore"] += list(list(
|
||||
"key" = key,
|
||||
"enabled" = (user.ckey in GLOB.poll_ignore[key]),
|
||||
"desc" = GLOB.poll_ignore_desc[key]
|
||||
))
|
||||
|
||||
|
||||
/datum/notificationpanel/ui_act(action, params)
|
||||
if(..())
|
||||
return
|
||||
switch (action)
|
||||
if ("toggle_ignore")
|
||||
var/key = params["key"]
|
||||
if (key && islist(GLOB.poll_ignore[key]))
|
||||
GLOB.poll_ignore[key] ^= list(user.ckey)
|
||||
. = TRUE
|
||||
Reference in New Issue
Block a user