forked from tgstation/tgstation
-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
## About The Pull Request Добавил в контекстное меню 2 штучки: 1. Спавн сразу в дебаг аутфите, вместо поиска в огромном списке минуя кучу ДМ аутфитов 2. Скачивание любой иконки ## Why It's Good For The Game Удобно --------- Co-authored-by: Gaxeer <[email protected]>
- Loading branch information
Showing
4 changed files
with
38 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
/datum/modpack/admin | ||
name = "Административные удобства" | ||
desc = "Всякие вещи для удобства администрации и дебага." | ||
author = "Aylong" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#include "_admin.dm" | ||
|
||
#include "code/admin_verbs.dm" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters