Skip to content

Commit

Permalink
Adds macro for better ru_names init (#510)
Browse files Browse the repository at this point in the history
## About The Pull Request
Добавляет макрос `RU_NAMES_LIST_INIT` для упрощения
  • Loading branch information
larentoun authored Oct 6, 2024
1 parent 8694fad commit 55a75ac
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 3 additions & 0 deletions code/__DEFINES/bandastation/pronouns.dm
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,6 @@
#define INSTRUMENTAL 5
/// Предложный: Прохладная история о ком? О клоуне и об ассистухе.
#define PREPOSITIONAL 6

/// Макрос для упрощения создания листа падежей для объекта
#define RU_NAMES_LIST_INIT(nominative, genitive, dative, accusative, instrumental, prepositional) (list(NOMINATIVE = nominative, GENITIVE = genitive, DATIVE = dative, ACCUSATIVE = accusative, INSTRUMENTAL = instrumental, PREPOSITIONAL = prepositional))
5 changes: 3 additions & 2 deletions modular_bandastation/translations/code/pronouns.dm
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
/atom
/// ru_names = list(NOMINATIVE = "челюсти жизни", GENITIVE = "челюстей жизни", DATIVE = "челюстям жизни", ACCUSATIVE = "челюсти жизни", INSTRUMENTAL = "челюстями жизни", PREPOSITIONAL = "челюстях жизни")
// code\__DEFINES\bandastation\pronouns.dm for more info
/// ru_names = RU_NAMES_LIST_INIT("именительный", "родительный", "дательный", "винительный", "творительный", "предложный")
var/list/ru_names

/**
* Процедура выбора правильного падежа для любого предмета, если у него указан словарь «ru_names», примерно такой:
* ru_names = list(NOMINATIVE = "челюсти жизни", GENITIVE = "челюстей жизни", DATIVE = "челюстям жизни", ACCUSATIVE = "челюсти жизни", INSTRUMENTAL = "челюстями жизни", PREPOSITIONAL = "челюстях жизни")
* ru_names = RU_NAMES_LIST_INIT("челюсти жизни", "челюстей жизни", "челюстям жизни","челюсти жизни", "челюстями жизни", "челюстях жизни")
*/
/datum/proc/declent_ru(case_id, list/ru_names_override)
var/list/list_to_use = ru_names_override
Expand Down

0 comments on commit 55a75ac

Please sign in to comment.