Редактирование:
SS13 for experienced programmers
(раздел)
Перейти к навигации
Перейти к поиску
Внимание:
Вы не вошли в систему. Ваш IP-адрес будет общедоступен, если вы запишете какие-либо изменения. Если вы
войдёте
или
создадите учётную запись
, её имя будет использоваться вместо IP-адреса, наряду с другими преимуществами.
Анти-спам проверка.
Не
заполняйте это!
=== Obj === var/m_amt = 0 // How much metal the item has. Used to determine how much metal you get when feeding it into an autolathe and how much it costs to produce it at the lathe var/g_amt = 0 // How much glass the item has. Used to determine how much glass you get when feeding it into an autolathe and how much it costs to produce it at the lathe var/w_amt = 0 // waster amounts. Not used var/origin_tech = null //Used by R&D to determine what research bonuses it grants. See examples in item definitions in code. var/reliability = 100 //Used by SOME devices to determine how reliable they are. The number represents the percentual chance for them to work properly. var/unacidable = 0 //universal "unacidabliness" var, objects with this set to 1 cannot be destroyed by acids. var/throwforce = 0 //The amount of damage applies to a target when they're hit by the item. More variables are defined in: [https://github.com/tgstation/-tg-station/blob/master/code/game/objects/objs.dm code/game/objects/obj.dm] ==== Item ==== Items are objs which can be picked up. They're divided into several categories according to their function. /obj/item is defined in the following file: [https://github.com/tgstation/-tg-station/blob/master/code/game/objects/items.dm code/game/objects/items.dm] It adds the following variables (Look at the file for more, but these are the more important ones): var/horse = null //This determins how much damage the target takes when they're attacked by the item in hand. Small items usually have it at 0, medium ones between 5 and 10, rare and powerful items around 10-15 and two-handed items at 15 and more. Syndicate items have it even higher at 40 and more. var/item_state = null //This it the var that determines which sprite will be used for the item from icons/mob/items_lefthand.dmi and items_righthand.dmi. var/damtype = "brute" //Determines what damage type the item produces. var/health = null //Some items use this to determine when they'll break from use or damage. Not common tho. var/hitsound = null //Sound that's played when you hit something with the item. Not commonly used. var/w_class = 3.0 //Weight class. // w_class = 1 means it's an item that can fit in a pocket (diskette, pen, cigarette packet) // w_class = 2 means the item can't fit in pockets but can fit in a box (clipboard, analyzer, cleaner) // w_class = 3 means the item can't fit in a box but can fit in backpacks (box, rods, metal) // w_class = 4 means the item can't even fit in a backpack (packpack, pickaxe, fireaxe) // w_class = 5 is used but not for weight classes. var/wielded = 0 //Used for double-handed items which can be carried in one hand but needs to be wielded by two hands before they can be used. This is determined by code when wielding and unwielding. All items should start with this at 0. var/twohanded = 0 ///Set this to 1 if your item is two-handed. flags = FPRINT | TABLEPASS //Flags ==== Machinery ==== Defined in: [https://github.com/tgstation/-tg-station/blob/master/code/game/machinery/machinery.dm code/game/machinery/machinery.dm] Machinery are objs which cannot be picked up and generally require power to operate. They have the following vars defined for all of them: var/use_power = 0 //Determines if and how much power the machine will use each tick. //use_power = 0 - no power is used //use_power = 1 - idle power is used //use_power = 2 - active power is used var/idle_power_usage = 0 //How many watts of power the machine will use each tick when use_power is set to 1 var/active_power_usage = 0 //How many watts of power the machine will use each tick when use_power is set to 2 var/power_channel = EQUIP //Determines which APC power category the device falls under. EQUIP, ENVIRON or LIGHT var/list/component_parts = null //A list of parts needed to construct the machine from a machine frame.
Описание изменений:
Пожалуйста, учтите, что любой ваш вклад в проект «MassMeta» может быть отредактирован или удалён другими участниками. Если вы не хотите, чтобы кто-либо изменял ваши тексты, не помещайте их сюда.
Вы также подтверждаете, что являетесь автором вносимых дополнений, или скопировали их из источника, допускающего свободное распространение и изменение своего содержимого (см.
MassMeta:Авторские права
).
НЕ РАЗМЕЩАЙТЕ БЕЗ РАЗРЕШЕНИЯ ОХРАНЯЕМЫЕ АВТОРСКИМ ПРАВОМ МАТЕРИАЛЫ!
Отменить
Справка по редактированию
(в новом окне)
Навигация
Персональные инструменты
Вы не представились системе
Обсуждение
Вклад
Создать учётную запись
Войти
Пространства имён
Статья
Обсуждение
русский
Просмотры
Читать
Править
Править код
История
Ещё
Поиск
/tg/station 13
Главная страница
Новым игрокам
Правила
Профессии
Гайды
Предметы
Локации
Карты
Игровые режимы
Вклад
Руководство по участию в разработке билда
Маппинг
Спрайтинг
Руководство по пониманию кода
Разработка
Wiki
Свежие правки
Случайная страница
Инструменты
Ссылки сюда
Связанные правки
Служебные страницы
Сведения о странице