Skip to content

tweak: Реворк СЛР #6621

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

Open
wants to merge 3 commits into
base: master220
Choose a base branch
from

Conversation

chomasuke
Copy link
Contributor

@chomasuke chomasuke commented Mar 2, 2025

Описание

Порт вот этого ParadiseSS13/Paradise#21754 вот этого ParadiseSS13/Paradise#23257 и вот этого ParadiseSS13/Paradise#15563

Сердечно-лёгочная Реанимация теперь:

  • проводится, даже если у участников закрыты лица, но уже со сниженной эффективностью (75%)
  • автоматически повторится, если это возможно
  • сдвигает таймер дефиба на 3 секунды, если у участников не закрыто лицо, и на 1 секунды, если хотя бы у одного из участников лицо закрыто
  • с 25% шансом может запустить остановившееся сердце (игрока к жизни не вернёт)

Так же повышен приоритет тушения напарника.

Локализация - локализаторам.

Причина создания ПР / Почему это хорошо для игры

https://discord.com/channels/617003227182792704/755125334097133628/1347830892051304449

Демонстрация изменений

photo_2024-09-26_17-04-03

Тесты

Тесты - тестерам.
Тосты - тостерам.

@github-actions github-actions bot added the Merge Conflict This doesn't seem right label Mar 10, 2025
@github-actions github-actions bot removed the Merge Conflict This doesn't seem right label May 16, 2025
@chomasuke chomasuke marked this pull request as ready for review May 16, 2025 01:19
*/
/mob/living/carbon/proc/pat_out(mob/living/target)
if(target == src) // stop drop and roll, no trying to put out fire on yourself for free.
to_chat(src, "<span class='warning'>Stop drop and roll!</span>")
Copy link
Collaborator

Choose a reason for hiding this comment

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

используй span_warning, заместо явного указания тега

H.receiving_cpr_from = null
return

visible_message(span_danger("[src] is trying to perform CPR on [H]'s lifeless body!"), span_danger("You start trying to perform CPR on [H]'s lifeless body!"))
Copy link
Collaborator

Choose a reason for hiding this comment

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

Если мы что-то меняем/добавляем, текст нужно переводить на русский. Исключение - багфиксы.

add_attack_logs(src, target, "activated an implanted grenade [G] in [target] with CPR.", ATKLOG_MOST)
playsound(target.loc, 'sound/weapons/armbomb.ogg', 60, TRUE)
G.active = TRUE
addtimer(CALLBACK(G, TYPE_PROC_REF(/obj/item/grenade, prime)), G.det_time)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Сделай тут ранние ретурны. if(!условие) return .А со следующей строчки продолжаем то, что делается, если условие выполняется.

if(target.health >= HEALTH_THRESHOLD_CRIT && !HAS_TRAIT(target, TRAIT_FAKEDEATH))
if(target.on_fire)
user.pat_out(target)
else if(target.health >= HEALTH_THRESHOLD_CRIT && !HAS_TRAIT(target, TRAIT_FAKEDEATH) && target.stat != DEAD)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Тут тоже переделай на ранние ретурны


H.receiving_cpr_from = null
visible_message(span_notice("[src] stops performing CPR on [H]."), span_notice("You stop performing CPR on [H]."))
to_chat(src, span_danger("You need to stay still while performing CPR!"))
Copy link
Collaborator

Choose a reason for hiding this comment

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

Вообще прок do_cpr нужно резбить на несколько. Он слишком большой.

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

Successfully merging this pull request may close these issues.

2 participants