mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-01-28 10:01:58 +00:00
* Admin Verb Datums MkIII | Now with functional command bar (#82511) * Modular stuffs * Put some admin jump verbs back into the context menu | sorts area jump list again (#82647) ## About The Pull Request See title. ## Why It's Good For The Game Some admins wanted all the jump verbs back, aswell as making them not AGhost you. Also make the Jump To Area verb use a sorted list again * Hey what if admins were allowed to use the player panel (#82682) Re-adds the player panel verb to the verb panel. * Controller Overview UI (#82739) * Fixes a minor spelling mistake on the admin panel/verb list (#82747) ## About The Pull Request Corrects `inisimin` to `invisimin`. This addresses #82728, but only fixes one of the two issues mentioned ## Why It's Good For The Game -1 spelling mistake ## Changelog 🆑 spellcheck: 'inisimin' verb corrected to 'invisimin' /🆑 * Player Panel-age (#82757) * Admin Forced Mob Rename and Preference Update (#82715) --------- Co-authored-by: Zephyr <12817816+ZephyrTFA@users.noreply.github.com> Co-authored-by: Useroth <37159550+Useroth@users.noreply.github.com> Co-authored-by: chel <64568243+iliyaxox@users.noreply.github.com>
67 lines
1.9 KiB
Plaintext
67 lines
1.9 KiB
Plaintext
ADMIN_VERB(outfit_manager, R_DEBUG|R_ADMIN, "Outfit Manager", "View and edit outfits.", ADMIN_CATEGORY_DEBUG)
|
|
var/static/datum/outfit_manager/ui = new
|
|
ui.ui_interact(user.mob)
|
|
|
|
/datum/outfit_manager
|
|
|
|
/datum/outfit_manager/ui_state(mob/user)
|
|
return GLOB.admin_state
|
|
|
|
/datum/outfit_manager/ui_close(mob/user)
|
|
qdel(src)
|
|
|
|
/datum/outfit_manager/ui_interact(mob/user, datum/tgui/ui)
|
|
ui = SStgui.try_update_ui(user, src, ui)
|
|
if(!ui)
|
|
ui = new(user, src, "OutfitManager")
|
|
ui.open()
|
|
|
|
/datum/outfit_manager/proc/entry(datum/outfit/outfit)
|
|
var/vv = FALSE
|
|
var/datum/outfit/varedit/varoutfit = outfit
|
|
if(istype(varoutfit))
|
|
vv = length(varoutfit.vv_values)
|
|
return list(
|
|
"name" = "[outfit.name] [vv ? "(VV)" : ""]",
|
|
"ref" = REF(outfit),
|
|
)
|
|
|
|
/datum/outfit_manager/ui_data(mob/user)
|
|
var/list/data = list()
|
|
|
|
var/list/outfits = list()
|
|
for(var/datum/outfit/custom_outfit in GLOB.custom_outfits)
|
|
outfits += list(entry(custom_outfit))
|
|
data["outfits"] = outfits
|
|
|
|
return data
|
|
|
|
/datum/outfit_manager/ui_act(action, list/params, datum/tgui/ui, datum/ui_state/state)
|
|
if(..())
|
|
return
|
|
. = TRUE
|
|
|
|
switch(action)
|
|
if("new")
|
|
ui.user.client.open_outfit_editor(new /datum/outfit)
|
|
if("load")
|
|
ui.user.client.holder.load_outfit(ui.user)
|
|
if("copy")
|
|
var/datum/outfit/outfit = tgui_input_list(ui.user, "Pick an outfit to copy from", "Outfit Manager", subtypesof(/datum/outfit))
|
|
if(isnull(outfit))
|
|
return
|
|
if(!ispath(outfit))
|
|
return
|
|
ui.user.client.open_outfit_editor(new outfit)
|
|
|
|
var/datum/outfit/target_outfit = locate(params["outfit"])
|
|
if(!istype(target_outfit))
|
|
return
|
|
switch(action) //wow we're switching through action again this is horrible optimization smh
|
|
if("edit")
|
|
ui.user.client.open_outfit_editor(target_outfit)
|
|
if("save")
|
|
ui.user.client.holder.save_outfit(ui.user, target_outfit)
|
|
if("delete")
|
|
ui.user.client.holder.delete_outfit(ui.user, target_outfit)
|