Skip to content
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

Closed
wants to merge 54 commits into from

Conversation

maleyvich
Copy link
Contributor

@maleyvich maleyvich commented Dec 29, 2023

Описание изменений

добавление спрайтов для органов, создание операции для вытаскивания органов и их вставки

Почему и что этот ПР улучшит

органы перестанут быть чем-то неосязаемым, с чем можно подействовать только косвенно

Авторство

спрайты берутся с различных билдов и перерисовываются мною, реализация кодом на мне и с большой помощью людей из ховтукода в дискорде

Чеинжлог

🆑

  • image: Были добавлены спрайты для органов.
  • rscadd: Была дополнена операция на вынимание имплантов: теперь можно вынимать и сами органы пациента
  • tweak: Операция по выниманию мозга была обьединена с операцией на вынимание органов и немного усложнена.
  • map: В холодильниках операционных, на склад меда и робототехники теперь находятся органы.

@TauKitty
Copy link
Contributor

Changelog status: ✔️

@maleyvich maleyvich marked this pull request as draft December 29, 2023 10:31
@TauKitty TauKitty requested a review from a team December 29, 2023 10:31
@maleyvich
Copy link
Contributor Author

image

ингейм отображение сердец (проблема - обычное человеческое сердце очень маленькое)

@UDaV73rus
Copy link
Member

Они такие маленькие на других билдах, чтобы когда устраиваешь резню, весь коридор не был забит органами размером с весь тайл. А у нас есть ворлд иконки и норм

@maleyvich
Copy link
Contributor Author

image
смог найти альтернативу текущему сердцу и перекрасил под нашу палитру, вроде бы всё выдержано

@Chip11-n
Copy link
Contributor

Пластиковым выглядит сердце. Может всё-таки запрещенный-красный?

@maleyvich
Copy link
Contributor Author

Пластиковым выглядит сердце. Может всё-таки запрещенный-красный?

поспрашивал игроков в етолксе - им понравилось, хз, уже на мнение спрайтдепа

@KIBORG04
Copy link
Member

Ты в курсе, что спрайтов добавить мало? Там надо много кода рефакторить и заставить его работать. Сейчас органов даже в кукле физически нету, они в нуллспейсе лежат и через него работают

@maleyvich
Copy link
Contributor Author

maleyvich commented Dec 29, 2023

Ты в курсе, что спрайтов добавить мало? Там надо много кода рефакторить и заставить его работать. Сейчас органов даже в кукле физически нету, они в нуллспейсе лежат и через него работают

в курсе, поэтому и WiP

@maleyvich
Copy link
Contributor Author

image

были добавлены легкие всем (кроме дион), пока всё суммарно выглядит вот так

@Deahaka
Copy link
Contributor

Deahaka commented Dec 29, 2023

Как это улучшит РП?

@NinjaPikachuska
Copy link
Contributor

NinjaPikachuska commented Dec 29, 2023

ты бы лучше не со спрайтов начинал, а с кода
а еще здесь сто проц нужны будут ворлд иконки

@maleyvich
Copy link
Contributor Author

я не понимаю что я наделал

@@ -6,6 +6,8 @@

// Strings.
var/organ_tag = null // Unique identifier.
var/list/organ_races = list() // for species (human, tajaran, vox, etc.)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

а зачем этот список то?
(он сейчас нигде не используется)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

я попросту задал переменную в виде листа, ниже organ_races используется для органов

другой вопрос правильно ли я все сделал :trollface:

@MrPerenka
Copy link

Я что-то так посмотрел, и толи я не умею читать код, толи тут не прописан способ получения органов. Так где их брать? Карго, роботехника, авто/протолат, ксенобио, раундстарт?

@maleyvich
Copy link
Contributor Author

Я что-то так посмотрел, и толи я не умею читать код, толи тут не прописан способ получения органов. Так где их брать? Карго, роботехника, авто/протолат, ксенобио, раундстарт?

пока органы есть только у хуманов, этот пр лишь внедряет органы в жизнь игрочков

позже уже будут добавлены способы получения извне, если потребуют мейнтейнеры то добавлю прям в этот пр

@TauKitty TauKitty requested a review from a team January 4, 2024 04:12
@maleyvich
Copy link
Contributor Author

теперь в операционных, робототехнике и на складе меда будут лежать холодильники с органами
холодильник с органами для ксеносов на складу меда потому что потому.

Copy link
Contributor

@NinjaPikachuska NinjaPikachuska left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

о, да, еще забыл упомянуть важную вещь!
в билде полно мест где НЕ подразумевается отсутствие органов (в частности глаз)
и нужно пройтись по этим местам

code/modules/mob/living/carbon/brain/MMI.dm Outdated Show resolved Hide resolved
Comment on lines 837 to 853
//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)
Copy link
Contributor

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)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

зачем?

Copy link
Contributor Author

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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

мы убираем овнера и отправляем орган в нуллспейс, для чего?

Copy link
Contributor Author

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)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

тут даже аргументы не совпадают с тем что объявлено в проке 😔

code/modules/surgery/bodypart_manipulation.dm Show resolved Hide resolved
Comment on lines 275 to 279
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)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

эээ здесь тоже что-то нездоровое почему мы вытаскиваем борера вне проверки на мозг

Comment on lines 266 to 271
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))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

никогда не дойдет этой проверки, брейн и есть /organ/internal

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

гитхаб написал outdated но оно осталось неизмененным 👴

code/modules/surgery/bodypart_manipulation.dm Outdated Show resolved Hide resolved
code/modules/surgery/braincore.dm Show resolved Hide resolved
maleyvich and others added 5 commits January 6, 2024 00:20
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)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

это так не работает

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

однако, все таки без этого органы не будут показываться в радиалке.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

да что ты такое говоришь

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

эээээ, да?
мы не учитываем бодипарт_органы, откуда же им взяться??? они не BP.implants, они попросту не покажутся.

Copy link
Member

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()
Copy link
Member

@4310V343k 4310V343k Jan 7, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

зачем эта копия? может она должна была быть строкой ниже?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

оно работает именно если копию сделать сперва, а не после

Copy link
Member

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))
Copy link
Member

@4310V343k 4310V343k Jan 7, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

код под этой ифкой недосягаем

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

я уже пытался её как угодно дергать, не получается однако...

Copy link
Member

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)
Copy link
Member

@4310V343k 4310V343k Jan 7, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

этот прок, хоть и, технически, выполняет то, что хочется (форсмувает на пол и пишет в чат), используется для вещей в BP.implants, а не чего угодно в хумане. волшебным образом работающий костыль

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

так вещью в BP.implants может оказаться все что угодно, для этого даже есть отдельная категория "Else"

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BP.implants - то, что имплантировано в человека - то, что изначально в нём находится не должно

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

так вещью в BP.implants может оказаться все что угодно, для этого даже есть отдельная категория "Else"

как это вообще отвечает на мое ревью?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

я понимаю, что ты хочешь видеть что-то другое вместо remove_from_cavity, но в каких случаях текущий вариант может что-то поломать?

Copy link
Member

@4310V343k 4310V343k Jan 7, 2024

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)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ниже код специфичен для имплантов. хотя даже до этого изменения тут мог быть рантайм, если имплант - не имплант, а какая-нибудь шрапнель

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

имплантом считается любая вещь внутри хумана, не только сами импланты

Copy link
Member

@4310V343k 4310V343k Jan 7, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

посмотри в код и что он тут делает, пожалуйста

прежде чем что-то сказать я это проверяю

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

посмотри в код и что он тут делает, пожалуйста

прежде чем что-то сказать я это проверяю

так это даж в ховтукоде или рнд обсуждалось, что это неправильно и всё такое
во всяком случае, далее уже для каждой категории "имплантов" идёт свой код

Copy link
Member

@4310V343k 4310V343k Jan 7, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"далее" не существует. это конец файла. и проверок, что это именно имплант, который можно активировать, здесь тоже нет
смотри на контекст, про который я говорю, а не на одну похожую на что-то другую строку, что я выделил
кто-то попался на misleading название переменной (implants), а ты решил вообще не смотреть код и просто скопировать своё из совершенно другого контекста

Copy link
Member

@4310V343k 4310V343k left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

надо было, конечно, в один ревью закинуть, но я чето тупанул

@maleyvich
Copy link
Contributor Author

к сожалению, я действительно взялся за слишком огромную вещь и не смог с ней справиться. несмотря на то, что я хотел доделать это всё, однако недостаток опыта не позволит мне сделать это, спасибо ревьюверам и тем, кто помог мне сделать хотя бы то, что щас есть

@maleyvich maleyvich closed this Jan 7, 2024
@TauKitty
Copy link
Contributor

TauKitty commented Apr 9, 2024

Этот запрос на слияние был упомянут в Tau Ceti Station Forum. Там могут быть соответствующие подробности:

https://forum.taucetistation.org/t/kibernetika/42735/10

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet