From dac24404f45f37a0e62d3d7cd93de9fd39433e61 Mon Sep 17 00:00:00 2001 From: Builder13 Date: Mon, 7 Oct 2024 23:50:16 +0300 Subject: [PATCH] ooc-notes --- .../mob/living/carbon/human/examine.dm | 5 ++ 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 | 37 +++++++++ 6 files changed, 131 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/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..7ca09be957478 --- /dev/null +++ b/mods/ooc_notes/code/ooc_notes.dm @@ -0,0 +1,37 @@ +/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 + ..()