forked from tgstation/tgstation
-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Component Refactor from Sierra fixes #37 --------- Co-authored-by: Furior <furiorg@gmail.com>
Showing
52 changed files
with
2,977 additions
and
1,257 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 |
---|---|---|
@@ -1,4 +1,5 @@ | ||
## Text-to-speech | ||
#TTS_TOKEN_SILERO mytoken | ||
#TTS_ENABLED | ||
#TTS_CACHE | ||
#TTS_CACHE_ENABLED | ||
#TTS_API_URL_SILERO |
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,180 @@ | ||
{ | ||
"tts_acronym_replacements": { | ||
"нт": "Эн Тэ", | ||
"смо": "Эс Мэ О", | ||
"гп": "Гэ Пэ", | ||
"рд": "Эр Дэ", | ||
"гсб": "Гэ Эс Бэ", | ||
"срп": "Эс Эр Пэ", | ||
"цк": "Цэ Каа", | ||
"рнд": "Эр Эн Дэ", | ||
"сб": "Эс Бэ", | ||
"рцд": "Эр Цэ Дэ", | ||
"брпд": "Бэ Эр Пэ Дэ", | ||
"рпд": "Эр Пэ Дэ", | ||
"рпед": "Эр Пед", | ||
"тсф": "Тэ Эс Эф", | ||
"срт": "Эс Эр Тэ", | ||
"обр": "О Бэ Эр", | ||
"кпк": "Кэ Пэ Каа", | ||
"пда": "Пэ Дэ А", | ||
"id": "Ай Ди", | ||
"мщ": "Эм Ще", | ||
"вт": "Вэ Тэ", | ||
"ерп": "Йе Эр Пэ", | ||
"се": "Эс Йе", | ||
"апц": "А Пэ Цэ", | ||
"лкп": "Эл Ка Пэ", | ||
"см": "Эс Эм", | ||
"ека": "Йе Ка", | ||
"ка": "Кэ А", | ||
"бса": "Бэ Эс Аа", | ||
"днк": "Дэ Эн Ка", | ||
"тк": "Тэ Ка", | ||
"бфл": "Бэ Эф Эл", | ||
"бщ": "Бэ Щэ", | ||
"кк": "Кэ Ка", | ||
"ск": "Эс Ка", | ||
"зк": "Зэ Ка", | ||
"ерт": "Йе Эр Тэ", | ||
"вкд": "Вэ Ка Дэ", | ||
"нтр": "Эн Тэ Эр", | ||
"пнт": "Пэ Эн Тэ", | ||
"авд": "А Вэ Дэ", | ||
"пнв": "Пэ Эн Вэ", | ||
"ссд": "Эс Эс Дэ", | ||
"кпб": "Кэ Пэ Бэ", | ||
"сссп": "Эс Эс Эс Пэ", | ||
"крб": "Ка Эр Бэ", | ||
"бд": "Бэ Дэ", | ||
"сст": "Эс Эс Тэ", | ||
"скс": "Эс Ка Эс", | ||
"икн": "И Ка Эн", | ||
"нсс": "Эн Эс Эс", | ||
"емп": "Йе Эм Пэ", | ||
"бс": "Бэ Эс", | ||
"цкс": "Цэ Ка Эс", | ||
"срд": "Эс Эр Дэ", | ||
"жпс": "Джи Пи Эс", | ||
"gps": "Джи Пи Эс", | ||
"ннксс": "Эн Эн Ка Эс Эс", | ||
"ss": "Эс Эс", | ||
"сс": "Эс Эс", | ||
"тесла": "тэсла", | ||
"трейзен": "трэйзэн", | ||
"нанотрейзен": "нанотрэйзэн", | ||
"мед": "м ед", | ||
"меде": "м еде", | ||
"кз": "Кэ Зэ", | ||
"гбс": "Гэ Бэ Эс", | ||
"цпсс": "Цэ Пэ Эс Эс", | ||
"гкк": "Гэ Кэ Ка" | ||
}, | ||
"tts_job_replacements": { | ||
"nanotrasen navy field officer": "Полевой офицер флота Нанотрэйзен", | ||
"nanotrasen navy officer": "Офицер флота nanotrasen", | ||
"supreme commander": "Верховный главнокомандующий", | ||
"solar federation general": "Генерал Солнечной Федерации", | ||
"special operations officer": "Офицер специальных операций", | ||
"civilian": "Гражданский", | ||
"tourist": "Турист", | ||
"businessman": "Бизнэсмэн", | ||
"trader": "Торговец", | ||
"assistant": "Ассистент", | ||
"chief engineer": "Главный Инженер", | ||
"station engineer": "Станционный инженер", | ||
"trainee engineer": "Инженер-стажер", | ||
"Engineer Assistant": "Инженерный Ассистент", | ||
"Technical Assistant": "Технический Ассистент", | ||
"Engineer Student": "Инженер-практикант", | ||
"Technical Student": "Техник-практикант", | ||
"Technical Trainee": "Техник-стажер", | ||
"maintenance technician": "Техник по обслуживанию", | ||
"engine technician": "Техник по двигателям", | ||
"electrician": "Электрик", | ||
"life support specialist": "Специалист по жизнеобеспечению", | ||
"atmospheric technician": "Атмосферный техник", | ||
"mechanic": "Механик", | ||
"chief medical officer": "Главный врач", | ||
"medical doctor": "Врач", | ||
"Intern": "Интерн", | ||
"Student Medical Doctor": "Врач-практикант", | ||
"Medical Assistant": "Ассистирующий врач", | ||
"surgeon": "Хирург", | ||
"nurse": "Медсестра", | ||
"coroner": "К+оронэр", | ||
"chemist": "Химик", | ||
"pharmacist": "Фармацевт", | ||
"pharmacologist": "Фармаколог", | ||
"geneticist": "Генетик", | ||
"virologist": "Вирусолог", | ||
"pathologist": "Патологоанатом", | ||
"microbiologist": "Микробиолог", | ||
"psychiatrist": "Психиатр", | ||
"psychologist": "Психолог", | ||
"therapist": "Терапевт", | ||
"paramedic": "Парамедик", | ||
"research director": "Директор исследований", | ||
"scientist": "Учёный", | ||
"student scientist": "Учёный-практикант", | ||
"Scientist Assistant": "Научный Ассистент", | ||
"Scientist Pregraduate": "Учёный-бакалавр", | ||
"Scientist Graduate": "Научный выпускник", | ||
"Scientist Postgraduate": "Учёный-аспирант", | ||
"anomalist": "Аномалист", | ||
"plasma researcher": "Исследователь плазмы", | ||
"xenobiologist": "Ксенобиолог", | ||
"chemical researcher": "Химик-исследователь", | ||
"roboticist": "Робототехник", | ||
"student robotist": "Студент-робототехник", | ||
"biomechanical engineer": "Биомеханический инженер", | ||
"mechatronic engineer": "Инженер мехатроники", | ||
"head of security": "Глава службы безопасности", | ||
"warden": "Смотритель", | ||
"detective": "Детектив", | ||
"forensic technician": "Криминалист", | ||
"junior security officer": "Младший офицер службы безопасности", | ||
"security officer": "Офицер службы безопасности", | ||
"security trainer": "Тренер службы безопасности", | ||
"security cadet": "Кадет службы безопасности", | ||
"Security Assistant": "Ассистент службы безопасности", | ||
"Security Graduate": "Выпускник кадетской академии", | ||
"brig physician": "Врач брига", | ||
"security pod pilot": "Пилот пода службы безопасности", | ||
"captain": "Капитан", | ||
"ai": "И И", | ||
"cyborg": "Киборг", | ||
"robot": "Робот", | ||
"head of personnel": "Глава персонала", | ||
"nanotrasen representative": "Представитель Нанотрэйзен", | ||
"blueshield": "Блюшилд", | ||
"magistrate": "Магистрат", | ||
"internal affairs agent": "Агент внутренних дел", | ||
"human resources agent": "Агент по персоналу", | ||
"bartender": "Бармэн", | ||
"chef": "Повар", | ||
"cook": "Кук", | ||
"culinary artist": "Кулинар", | ||
"butcher": "Мясник", | ||
"botanist": "Ботаник", | ||
"hydroponicist": "Гидропонист", | ||
"botanical researcher": "Ботаник-исследователь", | ||
"quartermaster": "Квартирмейстер", | ||
"cargo technician": "Карго техник", | ||
"shaft miner": "Шахтёр", | ||
"spelunker": "Спелеолог", | ||
"clown": "Клоун", | ||
"mime": "Мим", | ||
"janitor": "Уборщик", | ||
"custodial technician": "Техник по уходу за помещениями", | ||
"librarian": "Библиотекарь", | ||
"journalist": "Журналист", | ||
"barber": "Парикмахер", | ||
"hair stylist": "Стилист", | ||
"beautician": "Косметолог", | ||
"explorer": "Исследователь", | ||
"chaplain": "Священник", | ||
"syndicate officer": "Офицер синдиката", | ||
"visitor": "посетитель" | ||
} | ||
} |
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
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
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,6 @@ | ||
///Do (almost) nothing - indev placeholder for switch case implementations etc | ||
#define NOOP (.=.) | ||
/// Copies the L from element START to elememt END if L is initialized, otherwise returns an empty list. | ||
#define LAZYCOPY_RANGE(L, START, END) ( L ? L.Copy(START, END) : list() ) | ||
/// Cuts the L from element START to elememt END if L is initialized, otherwise returns an empty list. | ||
#define LAZYCUT(L, START, END) ( L ? L.Cut(START, END) : NOOP ) |
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
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,8 @@ | ||
///from base of atom/change_tts_seed(): (mob/chooser, override, new_traits) | ||
#define COMSIG_ATOM_TTS_SEED_CHANGE "atom_tts_seed_change" | ||
///from base of atom/cast_tts: (mob/listener, message, atom/location, is_local, effect, traits, preSFX, postSFX) | ||
#define COMSIG_ATOM_TTS_CAST "atom_tts_cast" | ||
///from base of atom/tts_trait_add(): (trait) | ||
#define COMSIG_ATOM_TTS_TRAIT_ADD "atom_tts_trait_add" | ||
///from base of atom/tts_trait_remove(): (trait) | ||
#define COMSIG_ATOM_TTS_TRAIT_REMOVE "atom_tts_trait_remove" |
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 |
---|---|---|
@@ -1,32 +0,0 @@ | ||
/** Get all hearers in range, ignores walls and such. Code stolen from `/proc/get_hearers_in_view()` | ||
* Much faster and less expensive than range() | ||
*/ | ||
/proc/get_hearers_in_range(range_radius, atom/source) | ||
var/turf/center_turf = get_turf(source) | ||
if(!center_turf) | ||
return | ||
|
||
. = list() | ||
var/old_luminosity = center_turf.luminosity | ||
if(range_radius <= 0) //special case for if only source cares | ||
for(var/atom/movable/target as anything in center_turf) | ||
var/list/recursive_contents = target.important_recursive_contents?[RECURSIVE_CONTENTS_HEARING_SENSITIVE] | ||
if(recursive_contents) | ||
. += recursive_contents | ||
return . | ||
|
||
var/list/hearables_from_grid = SSspatial_grid.orthogonal_range_search(source, RECURSIVE_CONTENTS_HEARING_SENSITIVE, range_radius) | ||
|
||
if(!length(hearables_from_grid))//we know that something is returned by the grid, but we dont know if we need to actually filter down the output | ||
return . | ||
|
||
var/list/assigned_oranges_ears = SSspatial_grid.assign_oranges_ears(hearables_from_grid) | ||
|
||
for(var/mob/oranges_ear/ear in range(range_radius, center_turf)) | ||
. += ear.references | ||
|
||
for(var/mob/oranges_ear/remaining_ear as anything in assigned_oranges_ears) //we need to clean up our mess | ||
remaining_ear.unassign() | ||
|
||
center_turf.luminosity = old_luminosity | ||
return . | ||
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
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/singletons | ||
name = "Singletons" | ||
desc = "Ports Singletons from Sierra" | ||
author = "larentoun" |
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,5 @@ | ||
#include "_singletons.dm" | ||
|
||
#include "code/_defines.dm" | ||
#include "code/repository.dm" | ||
#include "code/singletons.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,23 @@ | ||
/* | ||
* Performance behaviors for avoiding calling procs unecessarily on the Singletons global. | ||
*/ | ||
|
||
/// Get a singleton instance according to path P. Creates it if necessary. Null if abstract or not a singleton. | ||
#define GET_SINGLETON(P)\ | ||
(ispath(P, /datum/singleton) ? (GLOB.Singletons.resolved_instances[P] ? GLOB.Singletons.instances[P] : GLOB.Singletons.GetInstance(P)) : null) | ||
|
||
/// Get a (path = instance) map of valid singletons according to typesof(P). | ||
#define GET_SINGLETON_TYPE_MAP(P)\ | ||
(ispath(P, /datum/singleton) ? (GLOB.Singletons.resolved_type_maps[P] ? GLOB.Singletons.type_maps[P] : GLOB.Singletons.GetTypeMap(P)) : list()) | ||
|
||
/// Get a (path = instance) map of valid singletons according to subtypesof(P). | ||
#define GET_SINGLETON_SUBTYPE_MAP(P)\ | ||
(ispath(P, /datum/singleton) ? (GLOB.Singletons.resolved_subtype_maps[P] ? GLOB.Singletons.subtype_maps[P] : GLOB.Singletons.GetSubtypeMap(P)) : list()) | ||
|
||
/// Get a list of valid singletons according to typesof(path). | ||
#define GET_SINGLETON_TYPE_LIST(P)\ | ||
(ispath(P, /datum/singleton) ? (GLOB.Singletons.resolved_type_lists[P] ? GLOB.Singletons.type_lists[P] : GLOB.Singletons.GetTypeList(P)) : list()) | ||
|
||
/// Get a list of valid singletons according to subtypesof(path). | ||
#define GET_SINGLETON_SUBTYPE_LIST(P)\ | ||
(ispath(P, /datum/singleton) ? (GLOB.Singletons.resolved_subtype_lists[P] ? GLOB.Singletons.subtype_lists[P] : GLOB.Singletons.GetSubtypeList(P)) : list()) |
Oops, something went wrong.