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

[НЕ ДОДЕЛАНО, ПЕренесено в АРХИВ] Cердечно-лёгочная реанимация #643

Closed
wants to merge 27 commits into from

Conversation

Schrodinger71
Copy link
Collaborator

@Schrodinger71 Schrodinger71 commented Oct 15, 2024

Описание PR

Добавил новое действие при критическом состоянии сущности. При условии что сущность в крит состоянии, можно будет провести сердечно-лёгочную реанимацию

@Mirokko <3

Идею Отто подкинул
Который Dusty_Kot

Техническая информация

ЛЯЯЯ НУ Я ЗА ДОКУМЕНТИРОВАЛ КОД, ЧИТАЙТЕ --> Files changed

если в кратце ну там есть функции, классы,
новый компонент ReliveResuscitation вешается на сущность, при нём есть система, которая чекает в крит состоянии сущность или нет, если в крите, то добавляется новый Альтернативный верб(на правую кнопку мыши) для сущности
есть всплывающие надписи при действии, пишется кто кому что и т.д.

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

Медиа

image
image
image

Требования

  • Я прочитал(а) и следую Руководство по созданию пулл реквестов. Я понимаю, что в противном случае мой ПР может быть закрыт по усмотрению мейнтейнера.
  • Я добавил скриншоты/видео к этому пулл реквесту, демонстрирующие его изменения в игре, или этот пулл реквест не требует демонстрации в игре

Чейнджлог

🆑 Шрёдька

  • add: НТ провело переобучение экипажа, теперь все обладают самым базовым навыком по оказанию первой помощи, а именно проведение сердечно-лёгочной реанимации.

@Schrodinger71 Schrodinger71 added Issue: help wanted Необходима помощь In progress В процессе выполнения labels Oct 15, 2024
@github-actions github-actions bot added the Status: Awaiting Changes Ожидание изменений label Oct 15, 2024
@Schrodinger71 Schrodinger71 removed the Status: Awaiting Changes Ожидание изменений label Oct 15, 2024
@github-actions github-actions bot added Changes: Localization Изменение локализации Status: Needs Review labels Oct 15, 2024
@github-actions github-actions bot added Status: Awaiting Changes Ожидание изменений and removed Status: Needs Review labels Oct 15, 2024
@Schrodinger71 Schrodinger71 added Status: Needs Review and removed Status: Awaiting Changes Ожидание изменений Issue: help wanted Необходима помощь labels Oct 15, 2024
@github-actions github-actions bot added the Status: Awaiting Changes Ожидание изменений label Oct 15, 2024
@Schrodinger71
Copy link
Collaborator Author

мб кину всё шейрад

@JustKekc
Copy link
Contributor

cool.

Copy link
Contributor

@Mirokko Mirokko left a comment

Choose a reason for hiding this comment

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

В целом хорошо движемся

/// <param name="args">Событие, содержащее информацию о доступных альтернативных действиях.</param>
private void OnAltVerbs(EntityUid uid, ReliveResuscitationComponent component, GetVerbsEvent<AlternativeVerb> args)
{
if (TryComp<MobStateComponent>(uid, out var mobState) && mobState.CurrentState == MobState.Critical)
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
Collaborator Author

Choose a reason for hiding this comment

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

Да тут не критично

_damageable.TryChangeDamage(uid, damageBlunt, true);

args.Handled = true;
args.Repeat = true;
Copy link
Contributor

Choose a reason for hiding this comment

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

эта строчка не нужна, он у тебя по умолчанию репит из-за кода на 81 строчке

Copy link
Collaborator Author

@Schrodinger71 Schrodinger71 Oct 16, 2024

Choose a reason for hiding this comment

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

А вот кстати повтор не работал... Я тестил.. поэтому пусть так будет


if (!TryComp<MobStateComponent>(uid, out var mobState) || mobState.CurrentState != MobState.Critical)
{
var locReliveAbort = Loc.GetString("relive-abort-message",
Copy link
Contributor

Choose a reason for hiding this comment

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

раз уж всеравно изменения есть, то сделай 2 сообщения - ваш пациент умер когда о Dead и ваш пациент с громким вдохом ожил когда Alive

@@ -122,6 +122,7 @@
tallscale: 1.15
short: true
shortscale: 1
- type: ReliveResuscitation
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
Collaborator Author

Choose a reason for hiding this comment

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

Да базовая мед помощь..

@Schrodinger71
Copy link
Collaborator Author

image

@Schrodinger71
Copy link
Collaborator Author

Переведу пока в драфт

@Schrodinger71 Schrodinger71 marked this pull request as draft October 27, 2024 07:24
@Schrodinger71 Schrodinger71 self-assigned this Oct 27, 2024
@Schrodinger71 Schrodinger71 changed the title Cердечно-лёгочная реанимация [НЕ ДОДЕЛАНО] Cердечно-лёгочная реанимация Oct 29, 2024
@Schrodinger71 Schrodinger71 changed the title [НЕ ДОДЕЛАНО] Cердечно-лёгочная реанимация [НЕ ДОДЕЛАНО, ПЕренесено в АРХИВ] Cердечно-лёгочная реанимация Oct 29, 2024
@Schrodinger71
Copy link
Collaborator Author

Schrodinger71#22 - чтобы не валялось просто так, перенесу сюда, ветку с основной репы удалю

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Changes: Localization Изменение локализации In progress В процессе выполнения Status: Awaiting Changes Ожидание изменений
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants