mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-01-01 12:31:32 +00:00
[MIRROR] Mass-PDA perms is configured on Wirecarp [MDB IGNORE] (#13663)
* Mass-PDA perms is configured on Wirecarp (#66889) Lawyers and Captains spawn by-default with the ability to send mass PDA messages, but the Wirecarp app (so Research Director and Captain) can grant/revoke permission to send PDAs to everyone * Mass-PDA perms is configured on Wirecarp Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com>
This commit is contained in:
@@ -26,6 +26,11 @@
|
||||
/obj/item/modular_computer/tablet/pda/heads/captain/Initialize(mapload)
|
||||
. = ..()
|
||||
RegisterSignal(src, COMSIG_TABLET_CHECK_DETONATE, .proc/tab_no_detonate)
|
||||
var/obj/item/computer_hardware/hard_drive/drive = all_components[MC_HDD]
|
||||
if(!drive)
|
||||
return
|
||||
for(var/datum/computer_file/program/messenger/messenger_app in drive.stored_files)
|
||||
messenger_app.spam_mode = TRUE
|
||||
|
||||
/obj/item/modular_computer/tablet/pda/heads/hop
|
||||
name = "head of personnel PDA"
|
||||
@@ -274,6 +279,14 @@
|
||||
/datum/computer_file/program/records/security,
|
||||
)
|
||||
|
||||
/obj/item/modular_computer/tablet/pda/lawyer/Initialize(mapload)
|
||||
. = ..()
|
||||
var/obj/item/computer_hardware/hard_drive/drive = all_components[MC_HDD]
|
||||
if(!drive)
|
||||
return
|
||||
for(var/datum/computer_file/program/messenger/messenger_app in drive.stored_files)
|
||||
messenger_app.spam_mode = TRUE
|
||||
|
||||
/obj/item/modular_computer/tablet/pda/botanist
|
||||
name = "botanist PDA"
|
||||
greyscale_config = /datum/greyscale_config/tablet/stripe_thick
|
||||
|
||||
@@ -45,6 +45,8 @@
|
||||
var/is_silicon = FALSE
|
||||
/// Whether or not we're in a mime PDA.
|
||||
var/mime_mode = FALSE
|
||||
/// Whether this app can send messages to all.
|
||||
var/spam_mode = FALSE
|
||||
|
||||
/datum/computer_file/program/messenger/proc/ScrubMessengerList()
|
||||
var/list/dictionary = list()
|
||||
@@ -185,11 +187,7 @@
|
||||
data["sortByJob"] = sort_by_job
|
||||
data["isSilicon"] = is_silicon
|
||||
data["photo"] = photo_path
|
||||
|
||||
var/obj/item/computer_hardware/card_slot/card_slot = computer.all_components[MC_CARD]
|
||||
if(card_slot)
|
||||
var/obj/item/card/id/id_card = card_slot ? card_slot.stored_card : ""
|
||||
data["canSpam"] = (ACCESS_LAWYER in id_card?.access)
|
||||
data["canSpam"] = spam_mode
|
||||
|
||||
var/obj/item/computer_hardware/hard_drive/portable/virus/disk = computer.all_components[MC_SDD]
|
||||
if(disk)
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
tgui_id = "NtosNetMonitor"
|
||||
program_icon = "network-wired"
|
||||
|
||||
/datum/computer_file/program/ntnetmonitor/ui_act(action, params)
|
||||
/datum/computer_file/program/ntnetmonitor/ui_act(action, list/params, datum/tgui/ui)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
@@ -49,6 +49,20 @@
|
||||
return
|
||||
SSnetworks.station_network.toggle_function(text2num(params["id"]))
|
||||
return TRUE
|
||||
if("toggle_mass_pda")
|
||||
if(!SSnetworks.station_network)
|
||||
return
|
||||
var/mob/user = ui.user
|
||||
|
||||
var/obj/item/modular_computer/target_tablet = locate(params["ref"]) in GLOB.TabletMessengers
|
||||
if(!istype(target_tablet))
|
||||
return
|
||||
var/obj/item/computer_hardware/hard_drive/drive = target_tablet.all_components[MC_HDD]
|
||||
if(!drive)
|
||||
to_chat(user, span_boldnotice("Target tablet somehow is lacking a hard drive."))
|
||||
return
|
||||
for(var/datum/computer_file/program/messenger/messenger_app in drive.stored_files)
|
||||
messenger_app.spam_mode = !messenger_app.spam_mode
|
||||
|
||||
/datum/computer_file/program/ntnetmonitor/ui_data(mob/user)
|
||||
if(!SSnetworks.station_network)
|
||||
@@ -73,4 +87,19 @@
|
||||
data["ntnetlogs"] += list(list("entry" = i))
|
||||
data["ntnetmaxlogs"] = SSnetworks.setting_maxlogcount
|
||||
|
||||
data["tablets"] = list()
|
||||
for(var/obj/item/modular_computer/messenger in GetViewableDevices())
|
||||
var/list/tablet_data = list()
|
||||
if(messenger.saved_identification)
|
||||
var/obj/item/computer_hardware/hard_drive/drive = messenger.all_components[MC_HDD]
|
||||
if(!drive)
|
||||
continue
|
||||
for(var/datum/computer_file/program/messenger/messenger_app in drive.stored_files)
|
||||
tablet_data["enabled_spam"] += messenger_app.spam_mode
|
||||
|
||||
tablet_data["name"] += messenger.saved_identification
|
||||
tablet_data["ref"] += REF(messenger)
|
||||
|
||||
data["tablets"] += list(tablet_data)
|
||||
|
||||
return data
|
||||
Reference in New Issue
Block a user