From 30c06339e856760f15643d4579d529df3a61abf9 Mon Sep 17 00:00:00 2001 From: Builder-13 <52353663+Builder-13@users.noreply.github.com> Date: Sun, 20 Oct 2024 16:48:04 +0300 Subject: [PATCH] =?UTF-8?q?=D0=92=D0=BE=D0=B7=D0=B2=D1=80=D0=B0=D1=82=20OO?= =?UTF-8?q?C=20=D0=B7=D0=B0=D0=BC=D0=B5=D1=82=D0=BE=D0=BA=20=D0=BF=D0=B5?= =?UTF-8?q?=D1=80=D1=81=D0=BE=D0=BD=D0=B0=D0=B6=D0=B0=20(#2712)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Builder13 Co-authored-by: UEDCommander <52104104+UEDCommander@users.noreply.github.com> --- .../mob/living/carbon/human/examine.dm | 5 ++ maps/sierra/structures/closets/misc.dm | 1 + mods/global_modpacks.dm | 1 + mods/ooc_notes/README.md | 77 +++++++++++++++++++ mods/ooc_notes/_ooc_notes.dm | 4 + mods/ooc_notes/_ooc_notes.dme | 7 ++ mods/ooc_notes/code/ooc_notes.dm | 38 +++++++++ 7 files changed, 133 insertions(+) create mode 100644 mods/ooc_notes/README.md create mode 100644 mods/ooc_notes/_ooc_notes.dm create mode 100644 mods/ooc_notes/_ooc_notes.dme create mode 100644 mods/ooc_notes/code/ooc_notes.dm diff --git a/code/modules/mob/living/carbon/human/examine.dm b/code/modules/mob/living/carbon/human/examine.dm index bb2405ae269c7..dfb72a5639484 100644 --- a/code/modules/mob/living/carbon/human/examine.dm +++ b/code/modules/mob/living/carbon/human/examine.dm @@ -334,6 +334,11 @@ if(print_flavor_text()) msg += "[print_flavor_text()]\n" + //[SIERRA-ADD] - OOC_NOTES + if(ooc_notes && !skipface) + msg += "OOC Notes: \[View\]\n" + //[/SIERRA-ADD] + msg += "*---------*
" msg += applying_pressure diff --git a/maps/sierra/structures/closets/misc.dm b/maps/sierra/structures/closets/misc.dm index 94699e32c2cd1..368b8a8c6abcd 100644 --- a/maps/sierra/structures/closets/misc.dm +++ b/maps/sierra/structures/closets/misc.dm @@ -19,6 +19,7 @@ /obj/item/gun/energy/gun/small/secure, /obj/item/storage/secure/briefcase, /obj/item/clothing/shoes/laceup, + /obj/item/folder/envelope/rep, /obj/item/storage/belt/holster/general, /obj/item/clothing/under/rank/internalaffairs, /obj/item/clothing/suit/storage/toggle/suit/black, diff --git a/mods/global_modpacks.dm b/mods/global_modpacks.dm index 231ef614fb76a..10f72937063ed 100644 --- a/mods/global_modpacks.dm +++ b/mods/global_modpacks.dm @@ -38,5 +38,6 @@ #include "integrated_circuits/_integrated_circuits.dme" #include "playable_away_yacht/_yacht.dme" #include "overmap/_overmap.dme" +#include "ooc_notes/_ooc_notes.dme" #include "../packs/sierra-tweaks/_pack.dm" diff --git a/mods/ooc_notes/README.md b/mods/ooc_notes/README.md new file mode 100644 index 0000000000000..e2b2ea69f5ae7 --- /dev/null +++ b/mods/ooc_notes/README.md @@ -0,0 +1,77 @@ + +#### Список PRов: + +- https://github.com/SierraBay/SierraBay12/pull/2712 + + + +## OOC notes + +ID мода: OOC_NOTES + + +### Описание мода + +Микромод, вносящий возможность заполнения OOC записей для персонажа. Сделано модом больше для удобства отслеживания изменения кор кода. + + +### Изменения *кор кода* + +- `code\modules\mob\living\carbon\human\examine.dm` : `/datum/species/proc/hug(mob/living/carbon/human/H,mob/living/target)` + + +### Оверрайды + +- Отсутствуют + + +### Дефайны + +- Отсутствуют + + +### Используемые файлы, не содержащиеся в модпаке + +- Отсутствуют + + +### Авторы: + +Builder13 (портировал), https://github.com/ss220-space/Baystation12/commit/1aee68f2c5cd5856731e127732f920fc41c0b7b4 (bear1ake) + diff --git a/mods/ooc_notes/_ooc_notes.dm b/mods/ooc_notes/_ooc_notes.dm new file mode 100644 index 0000000000000..ec36b8d616e05 --- /dev/null +++ b/mods/ooc_notes/_ooc_notes.dm @@ -0,0 +1,4 @@ +/singleton/modpack/ooc_notes + name = "OOC Notes" + desc = "Возможность заполнять OOC заметки для персонажа." + author = "Builder13 (портировал), bear1ake" \ No newline at end of file diff --git a/mods/ooc_notes/_ooc_notes.dme b/mods/ooc_notes/_ooc_notes.dme new file mode 100644 index 0000000000000..56580f85b886c --- /dev/null +++ b/mods/ooc_notes/_ooc_notes.dme @@ -0,0 +1,7 @@ +#ifndef MODPACK_OOCNOTES +#define MODPACK_OOCNOTES + +#include "_ooc_notes.dm" +#include "code/ooc_notes.dm" + +#endif diff --git a/mods/ooc_notes/code/ooc_notes.dm b/mods/ooc_notes/code/ooc_notes.dm new file mode 100644 index 0000000000000..e5a0e81b578b5 --- /dev/null +++ b/mods/ooc_notes/code/ooc_notes.dm @@ -0,0 +1,38 @@ +/mob/living/proc/Examine_OOC() + set name = "Examine Meta-Info (OOC)" + set category = "OOC" + set src in view() + + if(ooc_notes) + to_chat(usr, "[src]'s Metainfo:
[ooc_notes]") + else if(client) + to_chat(usr, "[src]'s Metainfo:
[client.prefs.metadata]") + else + to_chat(usr, "[src] does not have any stored infomation!") + + return + +/mob/living + var/ooc_notes = null + +/datum/preferences/copy_to(mob/living/carbon/human/character, is_preview_copy = FALSE) + ..() + character.ooc_notes = metadata + +/mob/living/carbon/human/OnTopic(mob/user, href_list) + if(href_list["ooc_notes"]) + src.Examine_OOC() + return TOPIC_HANDLED + ..() + +/datum/category_item/player_setup_item/physical/flavor/content(mob/user) + . = ..() + . += "Set OOC notes
" + +/datum/category_item/player_setup_item/physical/flavor/OnTopic(href,list/href_list, mob/user) + if(href_list["metadata"]) + var/new_metadata = sanitize(input(user, "Введите информация о себе, которую смогут увидеть другие игроки в описании персонажа. Например, Вы можете написать пожелания относительно того, хотите ли оказаться жертвой антагониста или ролевые предпочтения.", "Игровые предпочтения" , pref.metadata) as message|null) + if(new_metadata && CanUseTopic(user)) + pref.metadata = new_metadata + return TOPIC_HANDLED + ..()