Изменения

Перейти к навигации Перейти к поиску
м
Замена текста — «tt>» на «samp>»
Строка 1: Строка 1:  
← [[Модификации:Индекс|Индекс]]
 
← [[Модификации:Индекс|Индекс]]
{{Переведите}}
  −
This page explains how the game stores and parses Furniture data. This is an advanced guide for mod developers.
     −
==Raw data==
+
На этой странице объясняется, как игра хранит и анализирует данные о мебели. Это расширенное руководство для разработчиков модов.
Furniture is stored in <tt>Content\Data\Furniture.xnb</tt>, which can be [[Modding:Editing XNB files#unpacking|unpacked for editing]]. Here's the raw data as of {{version|1.5.1}} for reference:
     −
{{collapse|Data|content=<syntaxhighlight lang="json">
+
==Источник==
 +
Мебель хранится в <samp>Content\Data\Furniture.xnb</samp>, может быть [[Модификации:Редактирование_XNB_файлов#Редактирование распакованных данных|извлечена для редактирования]]. Вот исходные данные по состоянию на {{version|1.5.1}} для примера:
 +
 
 +
{{collapse|Данные|content=<syntaxhighlight lang="json">
 
{
 
{
 
   "0": "Oak Chair/chair/-1/-1/4/350",
 
   "0": "Oak Chair/chair/-1/-1/4/350",
Строка 359: Строка 359:  
</syntaxhighlight>}}
 
</syntaxhighlight>}}
   −
==Format==
+
==Формат==
{| class="wikitable"
+
{|class="wikitable"
 
|-
 
|-
! Index
+
! Индекс
! Field
+
! Поле
! Example Value
+
! Пример значения
 
|-
 
|-
 
|0
 
|0
|Name
+
|Name <br /><small>Наименование</small>
 
|''S. Pine''
 
|''S. Pine''
 
|-
 
|-
 
|1
 
|1
|Type
+
|Type <br /><small>Тип</small>
 
|''decor''
 
|''decor''
 
|-
 
|-
 
|2
 
|2
|source rectangle (width &times; height)
+
|source rectangle (width &times; height) <br /><small>исходный прямоугольник (ширина; высота)</small>
 
|''1 2''
 
|''1 2''
 
|-
 
|-
 
|3
 
|3
|Bounding Box (width &times; height)
+
|Bounding Box (width &times; height) <br /><small>Ограничивающая рамка (ширина; высота)</small>
 
|''1 1''
 
|''1 1''
 
|-
 
|-
 
|4
 
|4
|Rotations
+
|Rotations <br /><small>Поворот</small>
 
|''1''
 
|''1''
 
|-
 
|-
 
|5
 
|5
|Price
+
|Price <br /><small>Цена</small>
 
|''500''
 
|''500''
 
|-
 
|-
 
|6
 
|6
|Name (in language files other than English)
+
|Name (in language files other than English) <br /><small>Наименование (в языковых файлах, отличных от английского)</small>
|''Minipino''
+
|''[[Маленькая сосна]]''
 
|}
 
|}
   −
Values of "-1" in the <tt>Source Rectangle</tt> and <tt>Bounding Box</tt> fields correspond to the default values for the furniture type, calculated in <tt>Furniture.cs::getDefaultSourceRectForType()</tt> and <tt>Furniture.cs::getDefaultBoundingBoxForType()</tt>.  These functions use numbers that correspond to furniture type, also defined in <tt>Furniture.cs</tt>:
+
Значение "-1" в полях <samp>Source Rectangle</samp> и <samp>Bounding Box</samp> соответствуют значениям по умолчанию для типа мебели, рассчитано в <samp>Furniture.cs::getDefaultSourceRectForType()</samp> и <samp>Furniture.cs::getDefaultBoundingBoxForType()</samp>.  Эти функции используют номера, соответствующие типу мебели, также определяемому в <samp>Furniture.cs</samp>:
*chair = 0
+
*Стул = 0
*bench = 1
+
*Скамейка = 1
*couch = 2
+
*Диван = 2
*armchair = 3
+
*Кресло = 3
*dresser = 4
+
*Комод = 4
*long table = 5
+
*Длинный стол = 5
*painting = 6
+
*Картина = 6
*lamp = 7
+
*Фонарь = 7
*decor = 8
+
*Декор = 8
*other = 9
+
*Другое = 9
*bookcase = 10
+
*Книжный шкаф = 10
*table = 11
+
*Стол = 11
*rug = 12
+
*Коврик = 12
*window = 13
+
*Окно = 13
*fireplace = 14
+
*Камин = 14
*bed = 15
+
*Кровать = 15
*torch = 16
+
*Факел = 16
*sconce = 17
+
*Подсвечник = 17
 +
 
 +
[[Category:Модификации]]
   −
[[Category:Modding]]
+
[[en:Modding:Furniture data]]

Навигация