mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-12 16:44:43 +01:00
[MIRROR] tgui Preferences Menu + total rewrite of the preferences backend (#8153)
* tgui Preferences Menu + total rewrite of the preferences backend * nah, we dont need to ping those people * trying to remove the funny stuff * unmodularizing this * prefs reset * this may need to be reverted, who knows * okay, this part * perhaps * EEEEEEEEE * unsanitary * E * Stage 1 + loadout system * more fixes * E * I mean, it launches? * More fixes and reorganisation * E * customisation code is spaget. * disable ERP prefs * Update erp_preferences.dm * Update erp_preferences.dm * E * Slowly getting there * It may be time for help :) * tri...colors... help * preferences now pass preferences * Update dna.dm * Fuck this man * missing savefile return, set_species works, removed dumb stuff from updateappearance * https://github.com/Skyrat-SS13/Skyrat-tg/pull/8199 * https://github.com/Skyrat-SS13/Skyrat-tg/pull/8224 * https://github.com/tgstation/tgstation/pull/61519 * https://github.com/Skyrat-SS13/Skyrat-tg/pull/8278 * e * le butonAZARAK HELLO * hhh * Proper recognition where it's due, MrMelbert! * EEEE * examine block * Better gen hit sounds from whitedream * final loadout touches, more bug fixes im sure to come * i said there would be bugfixes * Update LoadoutManager.js * Missing preferences in the html menu * LIVE TESTING PHASE BABY * Update LoadoutManager.js * EEE * LAUNCH TEST FIRE * Update job.dm * Update new_player.dm * 50gb DAY ONE PATCH * EEE * Update preferences.dm * buggle fixes * Update examine.dm * >LOOC starts on Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com> Co-authored-by: jjpark-kb <55967837+jjpark-kb@users.noreply.github.com> Co-authored-by: Gandalf <jzo123@hotmail.com> Co-authored-by: Azarak <azarak10@gmail.com>
This commit is contained in:
@@ -12,8 +12,6 @@ GLOBAL_PROTECT(admin_verbs_default)
|
||||
/client/proc/dsay, /*talk in deadchat using our ckey/fakekey*/
|
||||
/client/proc/investigate_show, /*various admintools for investigation. Such as a singulo grief-log*/
|
||||
/client/proc/secrets,
|
||||
/client/proc/toggle_hear_radio, /*allows admins to hide all radio output*/
|
||||
/client/proc/toggle_split_admin_tabs,
|
||||
/client/proc/reload_admins,
|
||||
/client/proc/reestablish_db_connection, /*reattempt a connection to the database*/
|
||||
/client/proc/cmd_admin_pm_context, /*right-click adminPM interface*/
|
||||
@@ -77,13 +75,6 @@ GLOBAL_PROTECT(admin_verbs_admin)
|
||||
/client/proc/toggle_combo_hud, // toggle display of the combination pizza antag and taco sci/med/eng hud
|
||||
/client/proc/toggle_AI_interact, /*toggle admin ability to interact with machines as an AI*/
|
||||
/datum/admins/proc/open_shuttlepanel, /* Opens shuttle manipulator UI */
|
||||
/client/proc/deadchat,
|
||||
/client/proc/toggleprayers,
|
||||
/client/proc/toggle_prayer_sound,
|
||||
/client/proc/toggle_admin_looc_global, //SKYRAT EDIT ADDITION - LOOC
|
||||
/client/proc/colorasay,
|
||||
/client/proc/resetasaycolor,
|
||||
/client/proc/toggleadminhelpsound,
|
||||
/client/proc/respawn_character,
|
||||
/client/proc/admin_open_event_spawners_menu, //SKYRAT EDIT ADDITION - EVENTS
|
||||
/datum/admins/proc/toggleaooc, //SKYRAT EDIT ADDITION - ADMIN
|
||||
|
||||
@@ -280,15 +280,15 @@ This is highly likely to cause massive amounts of lag as every object in the gam
|
||||
// SKYRAT EDIT BEGIN - Bringing back the GAGS coloring menu
|
||||
steps += list(
|
||||
list(
|
||||
"layer"=icon2html(layer, user, dir=sprite_dir, sourceonly=TRUE, override_skyrat = TRUE),
|
||||
"result"=icon2html(result, user, dir=sprite_dir, sourceonly=TRUE, override_skyrat = TRUE),
|
||||
"layer"=icon2html(layer, user, dir=sprite_dir, sourceonly=TRUE),
|
||||
"result"=icon2html(result, user, dir=sprite_dir, sourceonly=TRUE),
|
||||
"config_name"=step["config_name"]
|
||||
)
|
||||
)
|
||||
// SKYRAT EDIT END
|
||||
|
||||
sprite_data["time_spent"] = TICK_DELTA_TO_MS(time_spent)
|
||||
sprite_data["finished"] = icon2html(finished, user, dir=sprite_dir, sourceonly=TRUE, override_skyrat = TRUE)
|
||||
sprite_data["finished"] = icon2html(finished, user, dir=sprite_dir, sourceonly=TRUE)
|
||||
refreshing = FALSE
|
||||
|
||||
/datum/greyscale_modify_menu/proc/Unlock()
|
||||
|
||||
@@ -229,7 +229,7 @@
|
||||
output += "<hr style='background:#000000; border:0; height:3px'>"
|
||||
var/datum/browser/panel = new(usr, "pmpanel", "Poll Management Panel", 780, 640)
|
||||
panel.add_stylesheet("admin_panelscss", 'html/admin/admin_panels.css')
|
||||
if(usr.client.prefs.tgui_fancy) //some browsers (IE8) have trouble with unsupported css3 elements that break the panel's functionality, so we won't load those if a user is in no frills tgui mode since that's for similar compatability support
|
||||
if(usr.client.prefs.read_preference(/datum/preference/toggle/tgui_fancy)) //some browsers (IE8) have trouble with unsupported css3 elements that break the panel's functionality, so we won't load those if a user is in no frills tgui mode since that's for similar compatability support
|
||||
panel.add_stylesheet("admin_panelscss3", 'html/admin/admin_panels_css3.css')
|
||||
panel.set_content(jointext(output, ""))
|
||||
panel.open()
|
||||
@@ -527,7 +527,7 @@
|
||||
panel_height = 320
|
||||
var/datum/browser/panel = new(usr, "popanel", "Poll Option Panel", 370, panel_height)
|
||||
panel.add_stylesheet("admin_panelscss", 'html/admin/admin_panels.css')
|
||||
if(usr.client.prefs.tgui_fancy) //some browsers (IE8) have trouble with unsupported css3 elements that break the panel's functionality, so we won't load those if a user is in no frills tgui mode since that's for similar compatability support
|
||||
if(usr.client.prefs.read_preference(/datum/preference/toggle/tgui_fancy)) //some browsers (IE8) have trouble with unsupported css3 elements that break the panel's functionality, so we won't load those if a user is in no frills tgui mode since that's for similar compatability support
|
||||
panel.add_stylesheet("admin_panelscss3", 'html/admin/admin_panels_css3.css')
|
||||
panel.set_content(jointext(output, ""))
|
||||
panel.open()
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
return FALSE
|
||||
|
||||
if(friend_candidate_client.prefs)
|
||||
random_appearance = tgui_alert(user, "Do you want the imaginary friend to look like and be named after [friend_candidate_client]'s current preferences ([friend_candidate_client.prefs.real_name])?", "Imaginary Friend Appearance?", list("Look-a-like", "Random")) == "Random"
|
||||
random_appearance = tgui_alert(user, "Do you want the imaginary friend to look like and be named after [friend_candidate_client]'s current preferences ([friend_candidate_client.prefs.read_preference(/datum/preference/name/real_name)])?", "Imaginary Friend Appearance?", list("Look-a-like", "Random")) == "Random"
|
||||
else
|
||||
random_appearance = TRUE
|
||||
|
||||
|
||||
@@ -139,7 +139,7 @@
|
||||
var/datum/browser/panel = new(usr, "banpanel", "Banning Panel", 910, panel_height)
|
||||
panel.add_stylesheet("admin_panelscss", 'html/admin/admin_panels.css')
|
||||
panel.add_stylesheet("banpanelcss", 'html/admin/banpanel.css')
|
||||
var/tgui_fancy = usr.client.prefs.tgui_fancy
|
||||
var/tgui_fancy = usr.client.prefs.read_preference(/datum/preference/toggle/tgui_fancy)
|
||||
if(tgui_fancy) //some browsers (IE8) have trouble with unsupported css3 elements and DOM methods that break the panel's functionality, so we won't load those if a user is in no frills tgui mode since that's for similar compatability support
|
||||
panel.add_stylesheet("admin_panelscss3", 'html/admin/admin_panels_css3.css')
|
||||
panel.add_script("banpaneljs", 'html/admin/banpanel.js')
|
||||
@@ -348,6 +348,9 @@
|
||||
ROLE_REV,
|
||||
ROLE_REVENANT,
|
||||
ROLE_REV_HEAD,
|
||||
ROLE_SENTIENT_DISEASE,
|
||||
ROLE_SPIDER,
|
||||
ROLE_SWARMER,
|
||||
ROLE_SYNDICATE,
|
||||
ROLE_TRAITOR,
|
||||
ROLE_WIZARD,
|
||||
|
||||
@@ -386,7 +386,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
if(view_size.getView() == view_size.default)
|
||||
view_size.setTo(input("Select view range:", "FUCK YE", 7) in list(1,2,3,4,5,6,7,8,9,10,11,12,13,14,37) - 7)
|
||||
else
|
||||
view_size.resetToDefault(getScreenSize(prefs.widescreenpref))
|
||||
view_size.resetToDefault(getScreenSize(prefs.read_preference(/datum/preference/toggle/widescreen)))
|
||||
|
||||
log_admin("[key_name(usr)] changed their view range to [view].")
|
||||
//message_admins("\blue [key_name_admin(usr)] changed their view range to [view].") //why? removed by order of XSI
|
||||
|
||||
@@ -11,7 +11,8 @@
|
||||
|
||||
mob.log_talk(msg, LOG_ASAY)
|
||||
msg = keywords_lookup(msg)
|
||||
var/custom_asay_color = (CONFIG_GET(flag/allow_admin_asaycolor) && prefs.asaycolor) ? "<font color=[prefs.asaycolor]>" : "<font color='#FF4500'>"
|
||||
var/asay_color = prefs.read_preference(/datum/preference/color/asay_color)
|
||||
var/custom_asay_color = (CONFIG_GET(flag/allow_admin_asaycolor) && asay_color) ? "<font color=[asay_color]>" : "<font color='[DEFAULT_ASAY_COLOR]'>"
|
||||
msg = "[span_adminsay("[span_prefix("ADMIN:")] <EM>[key_name(usr, 1)]</EM> [ADMIN_FLW(mob)]: [custom_asay_color]<span class='message linkify'>[msg]")]</span>[custom_asay_color ? "</font>":null]"
|
||||
to_chat(GLOB.admins,
|
||||
type = MESSAGE_TYPE_ADMINCHAT,
|
||||
|
||||
@@ -113,9 +113,8 @@ GLOBAL_DATUM(current_anonymous_theme, /datum/anonymous_theme)
|
||||
continue
|
||||
var/old_name = player.real_name //before restoration
|
||||
if(issilicon(player))
|
||||
player.apply_pref_name("[isAI(player) ? "ai" : "cyborg"]", player.client)
|
||||
player.apply_pref_name("[isAI(player) ? /datum/preference/name/ai : /datum/preference/name/cyborg]", player.client)
|
||||
else
|
||||
player.client.prefs.sanitize_chosen_prefs() // Just in case they changed unlawfully.
|
||||
player.client.prefs.apply_prefs_to(player) // This is not sound logic, as the prefs may have changed since then.
|
||||
player.fully_replace_character_name(old_name, player.real_name) //this changes IDs and PDAs and whatnot
|
||||
|
||||
@@ -131,7 +130,9 @@ GLOBAL_DATUM(current_anonymous_theme, /datum/anonymous_theme)
|
||||
* * target - mob for preferences and gender
|
||||
*/
|
||||
/datum/anonymous_theme/proc/anonymous_name(mob/target)
|
||||
return target.client.prefs.pref_species.random_name(target.gender,1)
|
||||
var/species_type = target.client.prefs.read_preference(/datum/preference/choiced/species)
|
||||
var/datum/species/species = new species_type
|
||||
return species.random_name(target.gender,1)
|
||||
|
||||
/**
|
||||
* anonymous_ai_name: generates a random name, based off of whatever the round's anonymousnames is set to (but for sillycones).
|
||||
|
||||
@@ -121,7 +121,7 @@
|
||||
if(ertemplate.spawn_admin)
|
||||
if(isobserver(usr))
|
||||
var/mob/living/carbon/human/admin_officer = new (spawnpoints[1])
|
||||
var/chosen_outfit = usr.client?.prefs?.brief_outfit
|
||||
var/chosen_outfit = usr.client?.prefs?.read_preference(/datum/preference/choiced/brief_outfit)
|
||||
usr.client.prefs.safe_transfer_prefs_to(admin_officer, is_antag = TRUE)
|
||||
admin_officer.equipOutfit(chosen_outfit)
|
||||
admin_officer.key = usr.key
|
||||
|
||||
@@ -56,7 +56,7 @@ GLOBAL_DATUM(highlander_controller, /datum/highlander_controller)
|
||||
* * setup_list: list of all the datum setups (fancy list of roles) that would work for the game
|
||||
* * ready_players: list of filtered, sane players (so not playing or disconnected) for the game to put into roles
|
||||
*/
|
||||
/datum/highlander_controller/proc/new_highlander(mob/living/carbon/human/new_crewmember, rank)
|
||||
/datum/highlander_controller/proc/new_highlander(datum/source, mob/living/new_crewmember, rank)
|
||||
SIGNAL_HANDLER
|
||||
|
||||
to_chat(new_crewmember, span_userdanger("<i>THERE CAN BE ONLY ONE!!!</i>"))
|
||||
@@ -90,8 +90,11 @@ GLOBAL_DATUM(highlander_controller, /datum/highlander_controller)
|
||||
log_admin("[key_name(usr)] used delayed THERE CAN BE ONLY ONE.")
|
||||
addtimer(CALLBACK(src, .proc/only_one, TRUE), 42 SECONDS)
|
||||
|
||||
/mob/living/carbon/human/proc/make_scottish()
|
||||
/mob/living/proc/make_scottish()
|
||||
return
|
||||
|
||||
/mob/living/carbon/human/make_scottish()
|
||||
mind.add_antag_datum(/datum/antagonist/highlander)
|
||||
|
||||
/mob/living/silicon/robot/proc/make_scottish()
|
||||
/mob/living/silicon/robot/make_scottish()
|
||||
mind.add_antag_datum(/datum/antagonist/highlander/robot)
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
GLOBAL_DATUM(everyone_a_traitor, /datum/everyone_is_a_traitor_controller)
|
||||
|
||||
/client/proc/secrets() //Creates a verb for admins to open up the ui
|
||||
set name = "Secrets"
|
||||
set desc = "Abuse harder than you ever have before with this handy dandy semi-misc stuff menu"
|
||||
@@ -448,24 +450,16 @@
|
||||
if(!SSticker.HasRoundStarted())
|
||||
tgui_alert(usr,"The game hasn't started yet!")
|
||||
return
|
||||
if(GLOB.everyone_a_traitor)
|
||||
tgui_alert(usr, "The everyone is a traitor secret has already been triggered")
|
||||
return
|
||||
var/objective = stripped_input(holder, "Enter an objective")
|
||||
if(!objective)
|
||||
return
|
||||
GLOB.everyone_a_traitor = new /datum/everyone_is_a_traitor_controller(objective)
|
||||
SSblackbox.record_feedback("nested tally", "admin_secrets_fun_used", 1, list("Traitor All", "[objective]"))
|
||||
for(var/mob/living/player in GLOB.player_list)
|
||||
if(!(ishuman(player)||istype(player, /mob/living/silicon/)))
|
||||
continue
|
||||
if(player.stat == DEAD || !player.mind || ispAI(player))
|
||||
continue
|
||||
if(is_special_character(player))
|
||||
continue
|
||||
var/datum/antagonist/traitor/traitor_datum = new()
|
||||
traitor_datum.give_objectives = FALSE
|
||||
var/datum/objective/new_objective = new
|
||||
new_objective.owner = player
|
||||
new_objective.explanation_text = objective
|
||||
traitor_datum.objectives += new_objective
|
||||
player.mind.add_antag_datum(traitor_datum)
|
||||
GLOB.everyone_a_traitor.make_traitor(null, player)
|
||||
message_admins(span_adminnotice("[key_name_admin(holder)] used everyone is a traitor secret. Objective is [objective]"))
|
||||
log_admin("[key_name(holder)] used everyone is a traitor secret. Objective is [objective]")
|
||||
if("massbraindamage")
|
||||
@@ -612,3 +606,31 @@
|
||||
var/turf/T = get_step(loc, SOUTHWEST)
|
||||
flick_overlay_static(portal_appearance, T, 15)
|
||||
playsound(T, 'sound/magic/lightningbolt.ogg', rand(80, 100), TRUE)
|
||||
|
||||
///Makes sure latejoining crewmembers also become traitors.
|
||||
/datum/everyone_is_a_traitor_controller
|
||||
var/objective = ""
|
||||
|
||||
/datum/everyone_is_a_traitor_controller/New(objective)
|
||||
src.objective = objective
|
||||
RegisterSignal(SSdcs, COMSIG_GLOB_CREWMEMBER_JOINED, .proc/make_traitor)
|
||||
|
||||
/datum/everyone_is_a_traitor_controller/Destroy()
|
||||
UnregisterSignal(SSdcs, COMSIG_GLOB_CREWMEMBER_JOINED)
|
||||
return ..()
|
||||
|
||||
/datum/everyone_is_a_traitor_controller/proc/make_traitor(datum/source, mob/living/player)
|
||||
SIGNAL_HANDLER
|
||||
if(player.stat == DEAD || !player.mind)
|
||||
return
|
||||
if(!(ishuman(player) || issilicon(player)) || ispAI(player))
|
||||
return
|
||||
if(is_special_character(player))
|
||||
return
|
||||
var/datum/antagonist/traitor/traitor_datum = new()
|
||||
traitor_datum.give_objectives = FALSE
|
||||
var/datum/objective/new_objective = new
|
||||
new_objective.owner = player
|
||||
new_objective.explanation_text = objective
|
||||
traitor_datum.objectives += new_objective
|
||||
player.mind.add_antag_datum(traitor_datum)
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
if(!QDELETED(D))
|
||||
vv_update_display(D, "deleted", "")
|
||||
// Skyrat edit addition start -- optional bluespace sparks on delete
|
||||
if(T && prefs.skyrat_toggles & ADMINDEL_ZAP_PREF)
|
||||
if(T && prefs.read_preference(/datum/preference/toggle/admin/delete_sparks))
|
||||
playsound(T, 'sound/magic/Repulse.ogg', 100, 1)
|
||||
var/datum/effect_system/spark_spread/quantum/sparks = new
|
||||
sparks.set_up(10, 1, T)
|
||||
|
||||
Reference in New Issue
Block a user