-
Notifications
You must be signed in to change notification settings - Fork 61
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
Conversation
Content.Server/ADT/ReliveResuscitation/ReliveResuscitationSystem.cs
Outdated
Show resolved
Hide resolved
Content.Server/ADT/ReliveResuscitation/ReliveResuscitationSystem.cs
Outdated
Show resolved
Hide resolved
Content.Shared/ADT/ReliveResuscitation/ReliveResuscitationComponent.cs
Outdated
Show resolved
Hide resolved
Content.Server/ADT/ReliveResuscitation/ReliveResuscitationSystem.cs
Outdated
Show resolved
Hide resolved
Content.Server/ADT/ReliveResuscitation/ReliveResuscitationSystem.cs
Outdated
Show resolved
Hide resolved
Content.Server/ADT/ReliveResuscitation/ReliveResuscitationSystem.cs
Outdated
Show resolved
Hide resolved
мб кину всё шейрад |
cool. |
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.
В целом хорошо движемся
/// <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) |
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.
Да тут не критично
_damageable.TryChangeDamage(uid, damageBlunt, true); | ||
|
||
args.Handled = true; | ||
args.Repeat = true; |
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.
эта строчка не нужна, он у тебя по умолчанию репит из-за кода на 81 строчке
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 (!TryComp<MobStateComponent>(uid, out var mobState) || mobState.CurrentState != MobState.Critical) | ||
{ | ||
var locReliveAbort = Loc.GetString("relive-abort-message", |
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.
раз уж всеравно изменения есть, то сделай 2 сообщения - ваш пациент умер когда о Dead и ваш пациент с громким вдохом ожил когда Alive
@@ -122,6 +122,7 @@ | |||
tallscale: 1.15 | |||
short: true | |||
shortscale: 1 | |||
- type: ReliveResuscitation |
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.
Да базовая мед помощь..
Переведу пока в драфт |
Schrodinger71#22 - чтобы не валялось просто так, перенесу сюда, ветку с основной репы удалю |
Описание PR
Добавил новое действие при критическом состоянии сущности. При условии что сущность в крит состоянии, можно будет провести сердечно-лёгочную реанимацию
@Mirokko <3
Идею Отто подкинул
Который Dusty_Kot
Техническая информация
ЛЯЯЯ НУ Я ЗА ДОКУМЕНТИРОВАЛ КОД, ЧИТАЙТЕ --> Files changed
если в кратце ну там есть функции, классы,
новый компонент ReliveResuscitation вешается на сущность, при нём есть система, которая чекает в крит состоянии сущность или нет, если в крите, то добавляется новый Альтернативный верб(на правую кнопку мыши) для сущности
есть всплывающие надписи при действии, пишется кто кому что и т.д.
наносится рандомный дамаг грубый, в замен на восстановление рандомного удушения(пока настраивается)
для того чтобы произвести действие нужно потратить 3.3 секунды(тоже можн редачить)
Медиа
Требования
Чейнджлог
🆑 Шрёдька