Skip to content

Commit

Permalink
Feat: Ghost offering (#315)
Browse files Browse the repository at this point in the history
<!-- Пишите **НИЖЕ** заголовков и **ВЫШЕ** комментариев, иначе что то
может пойти не так. -->
<!-- Вы можете прочитать Contributing.MD, если хотите узнать больше. -->

## Что этот PR делает
Closes #300
- Добавляет гост оффер в контекстное меню для администраторов

## Почему это хорошо для игры
Удобство админам

## Изображения изменений

![image](https://github.com/ss220club/Paradise-SS220/assets/20109643/51c59b8d-1b21-4b65-81f7-3603cb2b02be)

## Тестирование
Проверял в игре

## Changelog

:cl:
add: Ghost Offer для администрации в контекстное меню
/:cl:

<!-- Оба :cl:'а должны быть на месте, что-бы чейнджлог работал! Вы
можете написать свой ник справа от первого :cl:, если хотите. Иначе
будет использован ваш ник на ГитХабе. -->
<!-- Вы можете использовать несколько записей с одинаковым префиксом
(Они используются только для иконки в игре) и удалить ненужные. Помните,
что чейнджлог должен быть понятен обычным игроком. -->
<!-- Если чейнджлог не влияет на игроков(например, это рефактор), вы
можете исключить всю секцию. -->
  • Loading branch information
dj-34 committed Oct 5, 2023
1 parent d83c94f commit 8899f74
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 0 deletions.
2 changes: 2 additions & 0 deletions modular_ss220/_modpacks.dm
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ SUBSYSTEM_DEF(modpacks)
if(fail_msg)
stack_trace("Modpack [(istype(package) && package.name) || "Unknown"] failed to post-initialize: [fail_msg]")

load_admins() // To make admins always have modular added verbs

/client/verb/modpacks_list()
set name = "Modpacks List"
set category = "OOC"
Expand Down
9 changes: 9 additions & 0 deletions modular_ss220/administration/_administration.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/datum/modpack/administration
name = "Улучшение администрирования"
desc = "Разные админские улучшения."
author = "dj-34"

/datum/modpack/administration/initialize()
GLOB.admin_verbs_admin += list(
/client/proc/cmd_admin_offer_control,
)
3 changes: 3 additions & 0 deletions modular_ss220/administration/_administration.dme
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#include "_administration.dm"

#include "code/randomverbs.dm"
13 changes: 13 additions & 0 deletions modular_ss220/administration/code/randomverbs.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/client/proc/cmd_admin_offer_control(mob/M as mob in GLOB.mob_list)
set name = "\[Admin\] Offer Control To Ghosts"
set category = null

if(!check_rights(R_ADMIN))
return

if(!mob)
return
if(!istype(M))
alert("This can only be used on instances of type /mob")
return
offer_control(M)
1 change: 1 addition & 0 deletions modular_ss220/modular_ss220.dme
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
#include "wire_splicing/wiresplicing.dme"

// --- MISC --- //
#include "administration/_administration.dme"
#include "aesthetics_sounds/_aesthetics_sounds.dme"
#include "balance/_balance.dme"
#include "bureaucracy/_bureaucracy.dme"
Expand Down

0 comments on commit 8899f74

Please sign in to comment.