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
Даём возможность пощупать органы и вырывать их #12653
Conversation
Changelog status: ✔️ |
Они такие маленькие на других билдах, чтобы когда устраиваешь резню, весь коридор не был забит органами размером с весь тайл. А у нас есть ворлд иконки и норм |
Пластиковым выглядит сердце. Может всё-таки запрещенный-красный? |
поспрашивал игроков в етолксе - им понравилось, хз, уже на мнение спрайтдепа |
Ты в курсе, что спрайтов добавить мало? Там надо много кода рефакторить и заставить его работать. Сейчас органов даже в кукле физически нету, они в нуллспейсе лежат и через него работают |
в курсе, поэтому и WiP |
Как это улучшит РП? |
ты бы лучше не со спрайтов начинал, а с кода |
я не понимаю что я наделал |
@@ -6,6 +6,8 @@ | |||
|
|||
// Strings. | |||
var/organ_tag = null // Unique identifier. | |||
var/list/organ_races = list() // for species (human, tajaran, vox, etc.) |
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.
я попросту задал переменную в виде листа, ниже organ_races используется для органов
другой вопрос правильно ли я все сделал
Я что-то так посмотрел, и толи я не умею читать код, толи тут не прописан способ получения органов. Так где их брать? Карго, роботехника, авто/протолат, ксенобио, раундстарт? |
пока органы есть только у хуманов, этот пр лишь внедряет органы в жизнь игрочков позже уже будут добавлены способы получения извне, если потребуют мейнтейнеры то добавлю прям в этот пр |
теперь в операционных, робототехнике и на складе меда будут лежать холодильники с органами |
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.
о, да, еще забыл упомянуть важную вещь!
в билде полно мест где НЕ подразумевается отсутствие органов (в частности глаз)
и нужно пройтись по этим местам
//Liver | ||
if(should_have_organ(O_LIVER) && !has_organ(O_LIVER)) | ||
adjustToxLoss(0.2) | ||
blurEyes(0.5) | ||
|
||
//Kidneys | ||
if(should_have_organ(O_KIDNEYS) && !has_organ(O_KIDNEYS)) | ||
adjustToxLoss(0.4) | ||
adjustBruteLoss(0.2) | ||
|
||
//Heart | ||
if(should_have_organ(O_HEART) && !has_organ(O_HEART)) | ||
death() | ||
|
||
//Lungs | ||
if(should_have_organ(O_LUNGS) && !has_organ(O_LUNGS)) | ||
adjustOxyLoss(1.5) |
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.
это нужно вынести в отдельный прок
и еще эффекты меня напрягают, инста смерть без сердца даже с подключенным аиком/дексалином плюс/прочими приколами - что-то странное
или легкие, которые накидывают оксиурон, вместо того чтобы лишать дыхания хумана
/obj/item/organ/proc/insert_organ(mob/living/carbon/human/H, surgically = FALSE, datum/species/S) | ||
set_owner(H, S) | ||
|
||
STOP_PROCESSING(SSobj, src) |
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.
меня попросили я и убрал это, уверяя что процессинг выполняется самим хуманом
@@ -34,14 +34,23 @@ | |||
loc = null | |||
owner = H | |||
|
|||
/obj/item/organ/proc/del_owner(mob/living/carbon/human/H) | |||
loc = null | |||
owner = null |
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.
чтобы ТОЧНО решить проблему что орган остаётся в теле даже если его достанут
if(parent_bodypart) | ||
parent = owner.bodyparts_by_name[parent_bodypart] | ||
|
||
|
||
/obj/item/organ/proc/remove_organ(mob/living/carbon/human/H, surgically = FALSE, datum/species/S) | ||
del_owner(H, S) |
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/mob/living/simple_animal/borer/borer = target.has_brain_worms() | ||
|
||
if(borer) | ||
borer.detatch() //Should remove borer if the brain is removed - RR | ||
remove_from_cavity(user, target, choosen_object, BP, tool) |
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(istype(choosen_object, /obj/item/organ/internal)) | ||
var/obj/item/organ/internal/H = choosen_object | ||
BP.bodypart_organs -= choosen_object | ||
H.remove_organ(choosen_object) | ||
H.loc = get_turf(target) | ||
else if (istype(choosen_object, /obj/item/organ/internal/brain)) |
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.
никогда не дойдет этой проверки, брейн и есть /organ/internal
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.
гитхаб написал outdated но оно осталось неизмененным 👴
Co-authored-by: NinjaPikachuska <89906909+NinjaPikachuska@users.noreply.github.com>
var/list/embed_object_else = list() | ||
for(var/embed_object in BP.implants) | ||
for(var/embed_object in BP.implants || BP.bodypart_organs) |
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.
да что ты такое говоришь
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.
эээээ, да?
мы не учитываем бодипарт_органы, откуда же им взяться??? они не BP.implants, они попросту не покажутся.
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.
for(var/el in list1 || list2) итерирует только по list1
if(istype(embed_object, /obj/item/weapon/shard/shrapnel)) | ||
embed_object_shrapnel += embed_object | ||
continue | ||
if(istype(embed_object, /obj/item/weapon/implant)) | ||
embed_object_implants += embed_object | ||
continue | ||
if(istype(embed_object, /obj/item/organ/internal)) | ||
BP.bodypart_organs.Copy() |
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.
копия, которую ты делаешь, нигде не сохраняется и ни на что не влияет
BP.bodypart_organs -= choosen_object | ||
H.remove_organ(choosen_object) | ||
H.loc = get_turf(target) | ||
else if(istype(choosen_object, /obj/item/organ/internal/brain)) |
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.
просто сделай это как обычную ифку?
var/mob/living/simple_animal/borer/borer = target.has_brain_worms() | ||
if(borer) | ||
borer.detatch() //Should remove borer if the brain is removed - RR | ||
remove_from_cavity(user, target, choosen_object, BP, tool) |
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.
этот прок, хоть и, технически, выполняет то, что хочется (форсмувает на пол и пишет в чат), используется для вещей в BP.implants, а не чего угодно в хумане. волшебным образом работающий костыль
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.
так вещью в BP.implants может оказаться все что угодно, для этого даже есть отдельная категория "Else"
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.
BP.implants - то, что имплантировано в человека - то, что изначально в нём находится не должно
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.
так вещью в BP.implants может оказаться все что угодно, для этого даже есть отдельная категория "Else"
как это вообще отвечает на мое ревью?
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.
я понимаю, что ты хочешь видеть что-то другое вместо remove_from_cavity, но в каких случаях текущий вариант может что-то поломать?
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.
я уже лежу в кровати и мне тяжело посмотреть, может ли что-то сломаться per se, но это всё ещё жуткий костыль. судя по содержанию функции, кто-то может предположить, что функция работает только с имплантированными вещами (и он будет в своем праве, ведь так и есть), и на основе этого поменяет её так, что она будет рантаймить, если вызвать её для органов (как это делаешь ты)
var/obj/item/organ/external/chest/BP = target.get_bodypart(target_zone) | ||
user.visible_message("<span class='warning'>[user]'s hand slips, scraping tissue inside [target]'s [BP.name] with \the [tool]!</span>", \ | ||
"<span class='warning'>Your hand slips, scraping tissue inside [target]'s [BP.name] with \the [tool]!</span>") | ||
BP.take_damage(20, 0, DAM_SHARP|DAM_EDGE, tool) | ||
if (BP.implants.len) | ||
if (BP.implants.len || BP.bodypart_organs.len) |
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.
посмотри в код и что он тут делает, пожалуйста
прежде чем что-то сказать я это проверяю
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.
"далее" не существует. это конец файла. и проверок, что это именно имплант, который можно активировать, здесь тоже нет
смотри на контекст, про который я говорю, а не на одну похожую на что-то другую строку, что я выделил
кто-то попался на misleading название переменной (implants
), а ты решил вообще не смотреть код и просто скопировать своё из совершенно другого контекста
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.
надо было, конечно, в один ревью закинуть, но я чето тупанул
к сожалению, я действительно взялся за слишком огромную вещь и не смог с ней справиться. несмотря на то, что я хотел доделать это всё, однако недостаток опыта не позволит мне сделать это, спасибо ревьюверам и тем, кто помог мне сделать хотя бы то, что щас есть |
Этот запрос на слияние был упомянут в Tau Ceti Station Forum. Там могут быть соответствующие подробности: |
Описание изменений
добавление спрайтов для органов, создание операции для вытаскивания органов и их вставки
Почему и что этот ПР улучшит
органы перестанут быть чем-то неосязаемым, с чем можно подействовать только косвенно
Авторство
спрайты берутся с различных билдов и перерисовываются мною, реализация кодом на мне и с большой помощью людей из ховтукода в дискорде
Чеинжлог
🆑