diff --git a/modular_bandastation/admin/_admin.dm b/modular_bandastation/admin/_admin.dm new file mode 100644 index 0000000000000..f9230d0005fbe --- /dev/null +++ b/modular_bandastation/admin/_admin.dm @@ -0,0 +1,4 @@ +/datum/modpack/admin + name = "Административные удобства" + desc = "Всякие вещи для удобства администрации и дебага." + author = "Aylong" diff --git a/modular_bandastation/admin/_admin.dme b/modular_bandastation/admin/_admin.dme new file mode 100644 index 0000000000000..a72aec54b1a55 --- /dev/null +++ b/modular_bandastation/admin/_admin.dme @@ -0,0 +1,3 @@ +#include "_admin.dm" + +#include "code/admin_verbs.dm" diff --git a/modular_bandastation/admin/code/admin_verbs.dm b/modular_bandastation/admin/code/admin_verbs.dm new file mode 100644 index 0000000000000..bf72a51ed3825 --- /dev/null +++ b/modular_bandastation/admin/code/admin_verbs.dm @@ -0,0 +1,30 @@ +ADMIN_VERB_ONLY_CONTEXT_MENU(spawn_debug_outfit, R_SPAWN, "Debug Outfit", mob/admin in world) + if(tgui_alert(admin,"Это заспавнит вас в специальном Debug прикиде, удаляя при этом ваше старое тело если оно было. Вы уверены?", "Debug Outfit", list("Да", "Нет")) != "Да") + return + var/mob/living/carbon/human/admin_body = admin.change_mob_type(/mob/living/carbon/human, delete_old_mob = TRUE) + admin_body.equipOutfit(/datum/outfit/debug) + +ADMIN_VERB_ONLY_CONTEXT_MENU(download_flaticon, R_ADMIN, "Download Icon", atom/thing in world) + var/icon/image = getFlatIcon(thing, no_anim = TRUE) + var/image_width = max(image.Width(), 32) + var/image_height = max(image.Height(), 32) + + var/resize_answer = tgui_alert(usr, "Хотите ли вы изменить размер иконки? Оригинальный размер: [image_width]x[image_height]", "Download Icon", list("Да", "Нет", "Удвоить")) + if(resize_answer != "Нет" && !isnull(resize_answer)) + switch(resize_answer) + if("Да") + var/new_width = tgui_input_number(usr, "Оригинальная ширина: [image_width]px", "Изменение ширины", image_width, 1024, 16) + if(!isnull(new_width)) + image_width = new_width + + var/new_height = tgui_input_number(usr, "Оригинальная высота: [image_height]px", "Изменение высоты", image_height, 1024, 16) + if(!isnull(new_height)) + image_height = new_height + + if("Удвоить") + image_width *= 2 + image_height *= 2 + + image.Scale(image_width, image_height) + + usr << ftp(image, "[thing.name]_[image_width]x[image_height].png") diff --git a/modular_bandastation/modular_bandastation.dme b/modular_bandastation/modular_bandastation.dme index bd2c8e2acee37..11b02fadf085f 100644 --- a/modular_bandastation/modular_bandastation.dme +++ b/modular_bandastation/modular_bandastation.dme @@ -5,6 +5,7 @@ #include "_helpers220/_helpers220.dme" #include "_signals220/_signals220.dme" #include "_singletons/_singletons.dme" +#include "admin/_admin.dme" #include "aesthetics/_aesthetics.dme" #include "automapper/_automapper.dme" #include "ai_laws/_ai_laws.dme"