-
Notifications
You must be signed in to change notification settings - Fork 446
add: [bounty] death book #6770
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master220
Are you sure you want to change the base?
add: [bounty] death book #6770
Conversation
Co-authored-by: Den109G <[email protected]>
Co-authored-by: Den109G <[email protected]>
Co-authored-by: Den109G <[email protected]>
Курва апдейт
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ыфвфывыф
…nto bounty-knigga
@dageavtobusnick я так и не понял где этот ранний ретурн ставить и зачем |
Я тебе уже 100 раз сказал. Для читаемости. Когда весь смысловой код на одинаковых отступах его проще читать. |
да я не знаю где его впихнутьь для читаемости нужно |
Плохой мистер Пельмень, что насчёт остального ревью? |
Co-authored-by: littleboobs <[email protected]>
баллуны видно нормально |
Co-authored-by: littleboobs <[email protected]>
Co-authored-by: littleboobs <[email protected]>
Co-authored-by: littleboobs <[email protected]>
Co-authored-by: littleboobs <[email protected]>
Co-authored-by: littleboobs <[email protected]>
Co-authored-by: littleboobs <[email protected]>
Co-authored-by: littleboobs <[email protected]>
Co-authored-by: littleboobs <[email protected]>
Co-authored-by: littleboobs <[email protected]>
Co-authored-by: littleboobs <[email protected]>
Co-authored-by: littleboobs <[email protected]>
…es.dm Co-authored-by: littleboobs <[email protected]>
Co-authored-by: littleboobs <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Вложенность кода ухудшает его читаемость. И не надо закрывать conversation, если ты не исправил то, что написано в нем.
prom.mind.objectives += new /datum/objective/xeno_genocide | ||
var/list/messages = prom.mind.prepare_announce_objectives() | ||
to_chat(prom, chat_box_red(messages.Join("<br>"))) | ||
return prom |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Тут нужно сделать ранний ретурн.
var/datum/outfit/radial_outfit/death_book/prom_obj = new prom_outfit() | ||
if(prom_obj.can_choise(user)) | ||
desc_to_outfit[prom_obj.descr] = prom_obj | ||
radial_look[prom_obj.descr] = prom_obj.get_image() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Тут ранний continue. Вложенность кода ухудшает его читаемость.
if(H.dna.species.name == SPECIES_VOX) | ||
var/obj/item/tank/internals/oxygen/red/prom = H.s_store | ||
prom.air_contents.oxygen = 0 | ||
prom.air_contents.nitrogen = (6 * ONE_ATMOSPHERE) * prom.volume / (R_IDEAL_GAS_EQUATION * T20C) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Тут ранний ретурн, если условие не выполняется. Можно вообще стелать if(H.dna.species.name != SPECIES_VOX) return, а дальше то, что делается в случае выполнения без отступа.
if(!length(possible_spiders)) | ||
explanation_text = "Вы остались без стаи и единой цели. Но вы знаете что вы созданы убивать и сеять хаос." | ||
else | ||
explanation_text = "Помогите вашему гнезду отложить яйцо Императрицы Ужаса. Это могут сделать: [possible_spiders.Join(", ")]. Защищайте их и помогите им набрать силу, чтобы они смогли это сделать." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Тут без if Можно. используй:
(length(possible_spiders))? Помогите вашему гнезду отложить яйцо Императрицы Ужаса. Это могут сделать: [possible_spiders.Join(", ")]. Защищайте их и помогите им набрать силу, чтобы они смогли это сделать." : "Вы остались без стаи и единой цели. Но вы знаете что вы созданы убивать и сеять хаос."
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
тринарные операторы еще хуже воспринимаются
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Хмм. Вообще да. Перенеси текст в дефайны, тогда будет нормально восприниматься.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Тот, что с possible_spiders, через макрос.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ооо май гад это что подготовка к двум языкам???!?!
if(volume >= 1) | ||
var/datum/disease/virus/transformation/xeno/phantom/D = new | ||
D.Contract(M) | ||
return ..() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Тут ранний ретурн.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
какой ранний ретурн, там же всеравно в ..() упрется
return COMPONENT_INCOMPATIBLE | ||
if(deep) | ||
var/atom/prom = parent | ||
phantomification(prom.contents) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ранний ретурн
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
куда?
var/list/desc_to_outfit = list() | ||
for(var/prom_outfit in subtypesof(/datum/outfit/radial_outfit)) | ||
var/datum/outfit/radial_outfit/death_book/prom_obj = new prom_outfit() | ||
if(prom_obj.can_choise(user)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Не нужно каждый раз искать subtypesof и создавать новые датумы. По идее достаточно будет единожды сделать это при инициализации и закешировать в статику для всех /obj/item/death_book.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
сделал кеширование при инициализации
metabolization_rate = 1 | ||
|
||
/datum/reagent/terror_eggs/on_mob_life(mob/living/carbon/M) | ||
if(volume >= 5 && !M.get_int_organ(/obj/item/organ/internal/body_egg/terror_eggs/phantom)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Для сравнения с volume числа перенеси в дефайны. Магические числа - плохо.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
И тут и в /datum/reagent/xenomicrobes/phantom
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
так тут же volume количество, количество реагента
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
сделано
Описание
Добавляет предмет death_book. Добавляет компонент phantom_component, он нужен чтобы выпиливать из жизни любой предмет по сигналу. dynamic_outfit, точно такой же outfit только хранит уже готовые объекты и обладает спец функционалом. Наследник от outfit - radial_outfit будет полезен для радиальных менюшек.
Причина создания ПР / Почему это хорошо для игры
https://discord.com/channels/617003227182792704/755125334097133628/1350044689989894175
Демонстрация изменений
Прикольный предмет для антага, не оставляет улик.
Тесты
Работает хорошо, плохо не работает