mirror of
https://github.com/yogstation13/Yogstation.git
synced 2025-02-26 09:04:50 +00:00
* Please let this work Good luck to myself, Xoxeyos * This shit is fucking abhorrent Admin.dm, rust_g, game.dm, mobs.dm, pai.dm, dynamic folder, holy_weapons.dm, admin_verbs.dm, topic.dm, ghost_pool_protection, antag_datum.dm, CTF.dm, corpse.dm, _event.dm, living/brain/posibrain.dm, giant_spider.dm, dynamic.json * Why is this here? * Update dynamic_rulesets_roundstart.dm * Merges Dynamic 2021 final fixes * Will this work? * Maybe this might work. * This was suggested as a change. * Fixes bad bugs * Easy enough. * Update ghost_pool_protection.dm * Update ghost_pool_protection.dm * Update dynamic.dm * Update dynamic.dm * Update dynamic_rulesets_latejoin.dm * Update dynamic_rulesets_latejoin.dm * Update dynamic.dm * Update dynamic_rulesets_roundstart.dm * I can put in sound_enviroment when I figure out what it is * Update mob_defines.dm * Update mob_defines.dm * Update mob_defines.dm * Security and Command personnel rolled infiltrator again * Update dynamic.dm * Ports over https://github.com/tgstation/tgstation/pull/58644 - No more mass infiltrations? This is an attempt to keep infiltrators from spawning in nonstop. * Update ruleset_picking.dm * Update dynamic_rulesets_latejoin.dm * Update dynamic_rulesets_roundstart.dm * Update dynamic_rulesets_roundstart.dm * weight configurement * weight configurement * Update dynamic_rulesets_roundstart.dm * Update dynamic_rulesets_latejoin.dm * Update dynamic_rulesets_roundstart.dm * Update dynamic_rulesets.dm * Update dynamic.dm * Update dynamic_rulesets_latejoin.dm * Update dynamic_rulesets_roundstart.dm * Update dynamic_rulesets_roundstart.dm * Update dynamic_rulesets.dm * Update new_player.dm * Update dynamic_rulesets_roundstart.dm * Update dynamic_rulesets_midround.dm * Update dynamic_rulesets_latejoin.dm * Update dynamic_rulesets_midround.dm * Update dynamic_rulesets_roundstart.dm * Update dynamic_rulesets_roundstart.dm * Update dynamic_rulesets_latejoin.dm * Update dynamic_rulesets_roundstart.dm * Adds from logging from https://github.com/tgstation/tgstation/pull/58451/ * Finishes up adding https://github.com/tgstation/tgstation/pull/58451/ * Update dynamic_rulesets_midround.dm * Update dynamic_rulesets_midround.dm Co-authored-by: Redmoogle <dakotamew@gmail.com> Co-authored-by: Jamie D <993128+JamieD1@users.noreply.github.com>
87 lines
3.1 KiB
Plaintext
87 lines
3.1 KiB
Plaintext
//very similar to centcom_podlauncher in terms of how this is coded, so i kept a lot of comments from it
|
|
|
|
/client/proc/ghost_pool_protection() //Creates a verb for admins to open up the ui
|
|
set name = "Ghost Pool Protection"
|
|
set desc = "Choose which ways people can get into the round, or just clear it out completely for admin events."
|
|
set category = "Admin"
|
|
var/datum/ghost_pool_menu/tgui = new(usr)//create the datum
|
|
tgui.ui_interact(usr)//datum has a tgui component, here we open the window
|
|
|
|
/datum/ghost_pool_menu
|
|
var/client/holder //client of whoever is using this datum
|
|
|
|
//when submitted, what the pool flags will be set to
|
|
var/new_role_flags = ALL
|
|
|
|
//EVERY TYPE OF WAY SOMEONE IS GETTING BACK INTO THE ROUND!
|
|
//these are the same comments as the ones in admin.dm defines, please update those if you change them here
|
|
/*
|
|
var/events_or_midrounds = TRUE //ie fugitives, space dragon, etc. also includes dynamic midrounds as it's the same deal
|
|
var/spawners = TRUE //ie ashwalkers, free golems, beach bums
|
|
var/station_sentience = TRUE //ie posibrains, mind monkeys, sentience potion, etc.
|
|
var/minigames = TRUE //ie mafia, ctf
|
|
var/misc = TRUE //oddities like split personality and any animal ones like spiders, xenos
|
|
*/
|
|
|
|
/datum/ghost_pool_menu/New(user)//user can either be a client or a mob due to byondcode(tm)
|
|
if (istype(user, /client))
|
|
var/client/user_client = user
|
|
holder = user_client //if its a client, assign it to holder
|
|
else
|
|
var/mob/user_mob = user
|
|
holder = user_mob.client //if its a mob, assign the mob's client to holder
|
|
new_role_flags = GLOB.ghost_role_flags
|
|
|
|
/datum/ghost_pool_menu/ui_state(mob/user)
|
|
return GLOB.admin_state
|
|
|
|
/datum/ghost_pool_menu/ui_close()
|
|
qdel(src)
|
|
|
|
/datum/ghost_pool_menu/ui_interact(mob/user, datum/tgui/ui)
|
|
ui = SStgui.try_update_ui(user, src, ui)
|
|
if(!ui)
|
|
ui = new(user, src, "GhostPoolProtection")
|
|
ui.open()
|
|
|
|
/datum/ghost_pool_menu/ui_data(mob/user)
|
|
var/list/data = list()
|
|
data["events_or_midrounds"] = (new_role_flags & GHOSTROLE_MIDROUND_EVENT)
|
|
data["spawners"] = (new_role_flags & GHOSTROLE_SPAWNER)
|
|
data["station_sentience"] = (new_role_flags & GHOSTROLE_STATION_SENTIENCE)
|
|
data["silicons"] = (new_role_flags & GHOSTROLE_SILICONS)
|
|
data["minigames"] = (new_role_flags & GHOSTROLE_MINIGAME)
|
|
return data
|
|
|
|
/datum/ghost_pool_menu/ui_act(action, params)
|
|
. = ..()
|
|
if(.)
|
|
return
|
|
switch(action)
|
|
if("toggle_events_or_midrounds")
|
|
new_role_flags ^= GHOSTROLE_MIDROUND_EVENT
|
|
if("toggle_spawners")
|
|
new_role_flags ^= GHOSTROLE_SPAWNER
|
|
if("toggle_station_sentience")
|
|
new_role_flags ^= GHOSTROLE_STATION_SENTIENCE
|
|
if("toggle_silicons")
|
|
new_role_flags ^= GHOSTROLE_SILICONS
|
|
if("toggle_minigames")
|
|
new_role_flags ^= GHOSTROLE_MINIGAME
|
|
if("all_roles")
|
|
new_role_flags = ALL
|
|
if("no_roles")
|
|
new_role_flags = NONE
|
|
if("apply_settings")
|
|
to_chat(usr, "Settings Applied!")
|
|
var/msg
|
|
switch(new_role_flags)
|
|
if(ALL)
|
|
msg = "enabled all of"
|
|
if(NONE)
|
|
msg = "disabled all of"
|
|
else
|
|
msg = "modified"
|
|
message_admins("[key_name_admin(holder)] has [msg] this round's allowed ghost roles.")
|
|
GLOB.ghost_role_flags = new_role_flags
|