forked from tgstation/tgstation
-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
<!-- Пишите **НИЖЕ** заголовков и **ВЫШЕ** комментариев, иначе что то может пойти не так. --> <!-- Вы можете прочитать Contributing.MD, если хотите узнать больше. --> ## Что этот PR делает closes #1032 Через запись конфига REVIVAL_BRAIN_LIFE при ее значение выше 0 позволяет изменить скорость разложения мозга. Так-же если это значение было изменено, это включает в себя перманентную смерть для игрока, в случае, если мозг умер (накладывает состояние DNR) <!-- Вкратце опишите изменения, которые вносите. --> <!-- Опишите **все** изменения, так как противное может сказаться на рассмотрении этого PR'а! --> <!-- Если вы исправляете Issue, добавьте "Fixes #xxxx" (где xxxx - номер Issue) где-нибудь в описании PR'а. Это автоматически закроет Issue после принятия PR'а. --> ## Почему это хорошо для игры По запросу стримеров и для закрытия #1032 <!-- Опишите, почему, по вашему, следует добавить эти изменения в игру. --> ## Изображения изменений <!-- Если вы не меняли карту или спрайты, можете опустить эту секцию. Если хотите, можете вставить видео. --> ## Тестирование Локальный сервер <!-- Как вы тестировали свой PR, если делали это вовсе? --> ## Changelog :cl: balance: Теперь в игре на сервере можно настроить перманентную смерть /:cl: <!-- Оба :cl:'а должны быть на месте, что-бы чейнджлог работал! Вы можете написать свой ник справа от первого :cl:, если хотите. Иначе будет использован ваш ник на ГитХабе. --> <!-- Вы можете использовать несколько записей с одинаковым префиксом (Они используются только для иконки в игре) и удалить ненужные. Помните, что чейнджлог должен быть понятен обычным игроком. --> <!-- Если чейнджлог не влияет на игроков(например, это рефактор), вы можете исключить всю секцию. --> ## Summary by Sourcery Implement permanent death configurable via the `revival_brain_life` config setting. If set to a value greater than 0, the brain decay rate is modified and permanent death is enabled for the player if their brain dies (DNR status is applied). New Features: - Introduce a configurable permanent death option. Tests: - Test the permanent death functionality on a local server. --------- Co-authored-by: tgstation-server-ci[bot] <161980869+tgstation-server-ci[bot]@users.noreply.github.com> Co-authored-by: Gaxeer <44334376+Gaxeer@users.noreply.github.com>
- Loading branch information
1 parent
76f4c70
commit 9f9d204
Showing
9 changed files
with
134 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
/obj/item/organ/brain/Initialize(mapload) | ||
. = ..() | ||
if(CONFIG_GET(flag/brain_permanent_death)) | ||
decay_factor = STANDARD_ORGAN_DECAY * 2 //7 минут до полной смерти (в 4 раза быстрее чем по умолчанию (30 минут)) | ||
|
||
/datum/surgery/brain_surgery/can_start(mob/user, mob/living/carbon/target) | ||
. = ..() | ||
if(!.) | ||
return | ||
|
||
var/obj/item/organ/brain/brain = target.get_organ_slot(ORGAN_SLOT_BRAIN) | ||
return !(brain.organ_flags & ORGAN_FAILING) || !CONFIG_GET(flag/brain_permanent_death) | ||
|
||
/datum/config_entry/flag/brain_permanent_death | ||
default = TRUE | ||
|
||
/datum/design/stasisbodybag | ||
name = "Stasis Body Bag" | ||
desc = "A folded bag designed for the storage and transportation of cadavers with portable stasis module and little space." | ||
id = "stasisbodybag" | ||
build_type = PROTOLATHE | AWAY_LATHE | ||
materials = list(/datum/material/iron =SHEET_MATERIAL_AMOUNT * 1.5, /datum/material/plasma =SHEET_MATERIAL_AMOUNT, /datum/material/diamond =SMALL_MATERIAL_AMOUNT*5) | ||
build_path = /obj/item/bodybag/stasis | ||
category = list( | ||
RND_CATEGORY_EQUIPMENT + RND_SUBCATEGORY_TOOLS_MEDICAL | ||
) | ||
departmental_flags = DEPARTMENT_BITFLAG_MEDICAL | DEPARTMENT_BITFLAG_SCIENCE | ||
|
||
/obj/item/bodybag/stasis | ||
name = "Stasis body bag" | ||
desc = "A folded bag designed for the storage and transportation of cadavers with portable stasis module and little space." | ||
icon = 'modular_bandastation/balance/icons/bodybag.dmi' //на замену | ||
icon_state = "stasisbag_folded" //на замену | ||
// Stored path we use for spawning a new body bag entity when unfolded. | ||
unfoldedbag_path = /obj/structure/closet/body_bag/stasis | ||
color = "#11978c" | ||
|
||
/obj/item/bodybag/stasis/deploy_bodybag(mob/user, atom/location) | ||
. = ..() | ||
var/obj/structure/closet/body_bag/item_bag = . | ||
item_bag.color = color | ||
return item_bag | ||
|
||
/obj/structure/closet/body_bag/stasis | ||
name = "stasis body bag" | ||
desc = "A plastic bag designed for the storage and transportation of cadavers with portable stasis module and little space." | ||
icon = 'modular_bandastation/balance/icons/bodybag.dmi' //на замену | ||
icon_state = "stasisbag" | ||
mob_storage_capacity = 1 | ||
color = "#11978c" | ||
open_sound = 'sound/effects/spray.ogg' | ||
close_sound = 'sound/effects/spray.ogg' | ||
foldedbag_path = /obj/item/bodybag/stasis | ||
|
||
//Добавить механизм добавления оверлея на предмет | ||
/obj/structure/closet/body_bag/stasis/closet_update_overlays(list/new_overlays) | ||
. = ..() | ||
. = new_overlays | ||
var/overlay_state = isnull(base_icon_state) ? initial(icon_state) : base_icon_state | ||
if(opened && has_opened_overlay) | ||
var/mutable_appearance/door_underlay = mutable_appearance(icon, "[overlay_state]_open_over", alpha = src.alpha) | ||
. += door_underlay | ||
door_underlay.color = "#6bd5ff" | ||
door_underlay.overlays += emissive_blocker(door_underlay.icon, door_underlay.icon_state, src, alpha = door_underlay.alpha) // If we don't do this the door doesn't block emissives and it looks weird. | ||
if(!opened && length(contents)) | ||
var/mutable_appearance/door_underlay = mutable_appearance(icon, "[overlay_state]_over", alpha = src.alpha) | ||
. += door_underlay | ||
door_underlay.color = "#059900" | ||
door_underlay.overlays += emissive_blocker(door_underlay.icon, door_underlay.icon_state, src, alpha = door_underlay.alpha) | ||
return . | ||
|
||
/obj/structure/closet/body_bag/stasis/undeploy_bodybag(atom/fold_loc) | ||
. = ..() | ||
var/obj/item/bodybag/folding_bodybag = . | ||
folding_bodybag.color = color | ||
return folding_bodybag | ||
|
||
/obj/structure/closet/body_bag/stasis/close(mob/living/user) | ||
. = ..() | ||
for(var/mob/living/mob in contents) | ||
mob.apply_status_effect(/datum/status_effect/grouped/stasis, STASIS_MACHINE_EFFECT) | ||
ADD_TRAIT(mob, TRAIT_TUMOR_SUPPRESSED, TRAIT_GENERIC) | ||
mob.extinguish_mob() | ||
|
||
/obj/structure/closet/body_bag/stasis/open(mob/living/user, force = FALSE, special_effects = TRUE) | ||
for(var/mob/living/mob in contents) | ||
mob.remove_status_effect(/datum/status_effect/grouped/stasis, STASIS_MACHINE_EFFECT) | ||
REMOVE_TRAIT(mob, TRAIT_TUMOR_SUPPRESSED, TRAIT_GENERIC) | ||
. = ..() | ||
|
||
/obj/item/reagent_containers/hypospray/medipen | ||
list_reagents = list(/datum/reagent/medicine/epinephrine = 10, /datum/reagent/medicine/coagulant = 2) | ||
|
||
/obj/item/reagent_containers/hypospray/medipen/survival | ||
list_reagents = list( /datum/reagent/medicine/epinephrine = 7, /datum/reagent/medicine/c2/aiuri = 7, /datum/reagent/medicine/c2/libital = 7, /datum/reagent/medicine/leporazine = 6, /datum/reagent/toxin/formaldehyde = 3) | ||
|
||
/obj/item/reagent_containers/hypospray/medipen/survival/luxury | ||
list_reagents = list(/datum/reagent/medicine/salbutamol = 10, /datum/reagent/medicine/c2/penthrite = 10, /datum/reagent/medicine/oxandrolone = 10, /datum/reagent/medicine/sal_acid = 10 ,/datum/reagent/medicine/omnizine = 10 ,/datum/reagent/medicine/leporazine = 5, /datum/reagent/toxin/formaldehyde = 5) |
Binary file not shown.