Skip to content

Commit

Permalink
Merge branch 'master' into investigator
Browse files Browse the repository at this point in the history
  • Loading branch information
Schrodinger71 committed Sep 3, 2024
2 parents 01c4fb6 + ffdcdda commit 3116ea9
Show file tree
Hide file tree
Showing 59 changed files with 839 additions and 17 deletions.
22 changes: 22 additions & 0 deletions Content.Server/ADT/Atmos/Rotting/EmbalmedSystem.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
using Content.Shared.ADT.Atmos.Miasma;
using Content.Shared.Examine;
using Content.Shared.Mobs.Systems;

namespace Content.Server.ADT.Atmos.Rotting;

public sealed partial class EmbalmedSystem : EntitySystem
{
[Dependency] private readonly MobStateSystem _mobState = default!;
public override void Initialize()
{
SubscribeLocalEvent<EmbalmedComponent, ExaminedEvent>(OnExamine);
base.Initialize();
}

private void OnExamine(EntityUid uid, EmbalmedComponent component, ExaminedEvent args)
{
if (!_mobState.IsDead(uid))
return;
args.PushMarkup(Loc.GetString("adt-rotting-embalmed"));
}
}
19 changes: 19 additions & 0 deletions Content.Server/ADT/EntityEffects/Effects/Embalm.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
using Content.Shared.EntityEffects;
using Robust.Shared.Prototypes;
using Content.Shared.ADT.Atmos.Miasma;


namespace Content.Server.ADT.EntityEffects.Effects;

public sealed partial class Embalm : EntityEffect
{
protected override string? ReagentEffectGuidebookText(IPrototypeManager prototype, IEntitySystemManager entSys)
=> Loc.GetString("reagent-effect-guidebook-embalm", ("chance", Probability));

// Gives the entity a component that prevents rotting and also execution by defibrillator
public override void Effect(EntityEffectBaseArgs args)
{
var entityManager = args.EntityManager;
entityManager.EnsureComponent<EmbalmedComponent>(args.TargetEntity);
}
}
6 changes: 6 additions & 0 deletions Content.Server/Medical/DefibrillatorSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
using Robust.Shared.Audio.Systems;
using Robust.Shared.Player;
using Robust.Shared.Timing;
using Content.Shared.ADT.Atmos.Miasma; //ADT-Medicine

namespace Content.Server.Medical;

Expand Down Expand Up @@ -152,6 +153,11 @@ public void Zap(EntityUid uid, EntityUid target, EntityUid user, DefibrillatorCo
_chatManager.TrySendInGameICMessage(uid, Loc.GetString("defibrillator-rotten"),
InGameICChatType.Speak, true);
}
if (HasComp<EmbalmedComponent>(target)) //ADT-Medicine
{
_chatManager.TrySendInGameICMessage(uid, Loc.GetString("defibrillator-embalmed"),
InGameICChatType.Speak, true);
}
else if (HasComp<UnrevivableComponent>(target))
{
_chatManager.TrySendInGameICMessage(uid, Loc.GetString("defibrillator-unrevivable"),
Expand Down
10 changes: 10 additions & 0 deletions Content.Shared/ADT/Atmos/Rotting/EmbalmedComponent.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
namespace Content.Shared.ADT.Atmos.Miasma;

/// <summary>
/// Entities wouldn't rot at all with this component.
/// </summary>
[RegisterComponent]
public sealed partial class EmbalmedComponent : Component
{

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
using Robust.Shared.GameStates;
using Content.Shared.Damage;

namespace Content.Shared.ADT.Damage.Components;

/// <summary>
/// This is used for an effect that nullifies <see cref="SlowOnDamageComponent"/> and adds an alert.
/// Thanks EmoGarbage404 for contributing this mechanic.
/// https://github.com/space-wizards/space-station-14/pull/31322
/// </summary>
[RegisterComponent, NetworkedComponent, Access(typeof(SlowOnDamageSystem))]
public sealed partial class IgnoreSlowOnDamageComponent : Component;
33 changes: 30 additions & 3 deletions Content.Shared/Damage/Systems/SlowOnDamageSystem.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
using Content.Shared.Damage.Components;
using Content.Shared.FixedPoint;
using Content.Shared.Inventory;
using Content.Shared.Movement.Systems;
using Content.Shared.ADT.Damage.Components;

namespace Content.Shared.Damage
{
Expand All @@ -14,6 +16,9 @@ public override void Initialize()

SubscribeLocalEvent<SlowOnDamageComponent, DamageChangedEvent>(OnDamageChanged);
SubscribeLocalEvent<SlowOnDamageComponent, RefreshMovementSpeedModifiersEvent>(OnRefreshMovespeed);
SubscribeLocalEvent<IgnoreSlowOnDamageComponent, ComponentStartup>(OnIgnoreStartup); //ADT-Medicine start
SubscribeLocalEvent<IgnoreSlowOnDamageComponent, ComponentShutdown>(OnIgnoreShutdown);
SubscribeLocalEvent<IgnoreSlowOnDamageComponent, ModifySlowOnDamageSpeedEvent>(OnIgnoreModifySpeed); //ADT-Medicine end
}

private void OnRefreshMovespeed(EntityUid uid, SlowOnDamageComponent component, RefreshMovementSpeedModifiersEvent args)
Expand All @@ -36,16 +41,38 @@ private void OnRefreshMovespeed(EntityUid uid, SlowOnDamageComponent component,
if (closest != FixedPoint2.Zero)
{
var speed = component.SpeedModifierThresholds[closest];
args.ModifySpeed(speed, speed);

var ev = new ModifySlowOnDamageSpeedEvent(speed); //ADT-Medicine start
RaiseLocalEvent(uid, ref ev);
args.ModifySpeed(ev.Speed, ev.Speed); //ADT-Medicine end
}
}

private void OnDamageChanged(EntityUid uid, SlowOnDamageComponent component, DamageChangedEvent args)
{
// We -could- only refresh if it crossed a threshold but that would kind of be a lot of duplicated
// code and this isn't a super hot path anyway since basically only humans have this

_movementSpeedModifierSystem.RefreshMovementSpeedModifiers(uid);
}
private void OnIgnoreStartup(Entity<IgnoreSlowOnDamageComponent> ent, ref ComponentStartup args) //ADT-Medicine start
{
_movementSpeedModifierSystem.RefreshMovementSpeedModifiers(ent);
}

private void OnIgnoreShutdown(Entity<IgnoreSlowOnDamageComponent> ent, ref ComponentShutdown args)
{
_movementSpeedModifierSystem.RefreshMovementSpeedModifiers(ent);
}

private void OnIgnoreModifySpeed(Entity<IgnoreSlowOnDamageComponent> ent, ref ModifySlowOnDamageSpeedEvent args)
{
args.Speed = 1f;
}
}
}

[ByRefEvent]
public record struct ModifySlowOnDamageSpeedEvent(float Speed) : IInventoryRelayEvent
{
public SlotFlags TargetSlots => SlotFlags.WITHOUT_POCKET;
} //ADT-Medicine end
}
6 changes: 6 additions & 0 deletions Resources/Changelog/1ChangelogADT.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2673,3 +2673,9 @@ Entries:
будет гореть красным, как при обновлении от Визардов.', type: Tweak}
time: '2024-09-02T13:17:49Z'
id: 307
- author: Шрёдька
changes:
- {message: Технический ассистент переименован в -> Инженер-стажёр., type: Tweak}
- {message: Научный ассистент переименован в -> Лаборант., type: Tweak}
time: '2024-09-02T14:12:31Z'
id: 308
2 changes: 1 addition & 1 deletion Resources/Locale/en-US/disease/miasma.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ rotting-extremely-bloated = [color=red]{ CAPITALIZE(POSS-ADJ($target)) } corpse
rotting-rotting-nonmob = [color=orange]{ CAPITALIZE(SUBJECT($target)) } is rotting![/color]
rotting-bloated-nonmob = [color=orangered]{ CAPITALIZE(SUBJECT($target)) } is bloated![/color]
rotting-extremely-bloated-nonmob = [color=red]{ CAPITALIZE(SUBJECT($target)) } is extremely bloated![/color]
rotting-extremely-bloated-nonmob = [color=red]{ CAPITALIZE(SUBJECT($target)) } is extremely bloated![/color]
4 changes: 3 additions & 1 deletion Resources/Locale/ru-RU/ADT/alerts/alerts.ftl
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
alerts-crawling-name = Ползание
alerts-crawling-desc = Вы ползёте, нажмите С чтобы встать.
alerts-crawling-desc = Вы ползёте, нажмите С чтобы встать.
alerts-adrenaline-name = [color=red]Адреналин[/color]
alerts-adrenaline-desc = Вы полны адреналина: боль вас не замедлит.
1 change: 1 addition & 0 deletions Resources/Locale/ru-RU/ADT/disease/miasma.ftl
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
adt-rotting-embalmed = [color=#edad45]Похоже, тело забальзамировано.[/color]
5 changes: 5 additions & 0 deletions Resources/Locale/ru-RU/ADT/guidebook/chemistry/effects.ftl
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
reagent-effect-guidebook-embalm =
{ $chance ->
[1] Предотвращает
*[other] предотвращают
} гниение трупов
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
reagent-effect-status-effect-Adrenaline = адреналин
1 change: 1 addition & 0 deletions Resources/Locale/ru-RU/ADT/medical/defibrillator.ftl
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
defibrillator-embalmed = Обнаружено бальзамирование тела: реанимация невозможна.
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
ent-ADTSpaceSecWall = укреплённая стена
.desc = Удерживает воздух внутри, а дронов снаружи.
ent-ADTSpaceSecWallDiagonal = диагональная укреплённая стена
.desc = Удерживает воздух внутри, а дронов снаружи.
.desc = Удерживает воздух внутри, а дронов снаружи.
ent-ADTCardboardWall = картонная стена
.desc = Стена из бумаги и тонких досок. Пользуется определенной популярностью в [восточном месте].
ent-ADTStonebrickWall = каменная стена
.desc = Классическая каменная стена.
ent-ADTYellowbrickWall = кирпичная жёлтая стена
.desc = Желтые кирпичи, уложенные по древним обычаям.
20 changes: 20 additions & 0 deletions Resources/Locale/ru-RU/ADT/reagents/effects/medicine_effects.ftl
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
medicine-effect-usual = Вы чувствуете, как ваша боль постепенно уходит.
medicine-effect-asphyxia = Ваше дыхание восстанавливается и понемногу приходит в норму.
medicine-effect-hungover = Ваши мысли становятся более собранными, а движения менее неряшливыми.
medicine-effect-eyedamage = Ваше зрение стало чуть лучше.
medicine-effect-mind = Похоже, ваш разум расширяется.
medicine-effect-stress = Ваше тело напрягается.
medicine-effect-headache = Вы чувствуете, как ваша головная боль постепенно уменьшается.
medicine-effect-slash = Вы чувствуете, как боль от ваших ран уменьшается.
medicine-effect-piercing = Вы чувствуете, как боль от ваших колотых мест уменьшается.
medicine-effect-heat = Похоже, ваша температура совсем немного понизилась.
medicine-effect-shock = Вы чувствуете, как боль от электрического ожога по всему вашему телу уменьшается.
medicine-effect-major-stress = Ваше тело сильно напрягается.
medicine-effect-emotions = Ваши эмоции и чувства становятся менее выразительными.
medicine-effect-antipsychotic = Ваше зрение и мысли становятся менее расплывчатыми.
medicine-effect-pain = Вы чувствуете, как ваша боль притупляется.
medicine-effect-visible-emotions-m = { CAPITALIZE($entity) } выглядит менее эмоциональным.
medicine-effect-visible-emotions-f = { CAPITALIZE($entity) } выглядит менее эмоциональной.
medicine-effect-visible-polymorph = { CAPITALIZE($entity) } притерпевает изменения в теле!
42 changes: 42 additions & 0 deletions Resources/Locale/ru-RU/ADT/reagents/meta/medicine.ftl
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
flavor-complex-somesalty = солёненькое
reagent-name-ultra-chloral-hydrate = Ультрахлоральгидрат
reagent-desc-ultra-chloral-hydrate = Модифицированный хлоральгидрат. В малых дозах вызывает сонливость. В больших дозах усыпляет. Передозировки нет
reagent-name-nitrofurfoll = нитрофурфол
reagent-desc-nitrofurfoll = Антимикробный препарат, который зачастую используют для исцеления небольших ран. Становится более эффективным вместе с бикаридином.
reagent-name-perohydrogen = пероводород
reagent-desc-perohydrogen = Часто используемый препарат для обработки болезненных уколов. Становится более эффективным вместе с бикаридином.
reagent-name-anelgesin = анельгезин
reagent-desc-anelgesin = Популярное жаропонижающее. Имеет исцелительные свойства в паре с дермалином.
reagent-name-minoxide = миноксид
reagent-desc-minoxide = Препарат, который смягчает эффект и боль от электрического шока. Становится более эффективным вместе с дермалином.
reagent-name-biomicine = биомицин
reagent-desc-biomicine = Сам по себе не влияет на организм, но становится крайне не стабильным при совмещении с диловеном. Зачастую используется в предсмертных случаях отравления. Оказывает значительное напряжение тела.
reagent-name-nikematide = никематид
reagent-desc-nikematide = Используется для лечения лёгкого кислородного голодания, но менее эффективно, чем дексалин. Однако, это отличное дополнение к дексалину плюс.
reagent-name-diethamilate = диэтамилат
reagent-desc-diethamilate = Гемостатическое средство для остановки небольшого кровотечения. Восполняет кровопотерю в паре с дексалином плюс.
reagent-name-sodiumizole = натримизол
reagent-desc-sodiumizole = Достаточно дешёвый и слабый анальгетик. Становится более эффективным в паре с бикаридином.
reagent-name-agolatine = аголатин
reagent-desc-agolatine = Атипичный антидепрессант, зачастую используемый для лечения эпизодов большой депрессии и генерализованного тревожного расстройства.
reagent-name-morphine = морфин
reagent-desc-morphine = Сильный опиат, добываемый из снотворного мака. В основном используется как анальгетик.
reagent-name-formalin = формалин
reagent-desc-formalin = Препарат, свёртывающий белки и предотвращающий их разложение. Используется для бальзамирования трупов.
reagent-name-styptic-powder = Кровоостанавливающая пудра
reagent-desc-styptic-powder = При нанесении на кожу заживляет травмы.
reagent-name-silver-sulfadiazine = Сульфадиазин серебра
reagent-desc-silver-sulfadiazine = При нанесении на кожу заживляет ожоги.
1 change: 1 addition & 0 deletions Resources/Locale/ru-RU/ADT/reagents/meta/physical-desc.ftl
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
reagent-physical-desc-skunky = вонючее
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ reagent-effect-status-effect-Pacified = принудительный пациф
reagent-effect-status-effect-RatvarianLanguage = паттерны ратварского языка
reagent-effect-status-effect-StaminaModifier = модифицированная выносливость
reagent-effect-status-effect-RadiationProtection = защита от радиации
reagent-effect-status-effect-Drowsiness = сонливость
reagent-effect-status-effect-Drowsiness = сонливость
8 changes: 8 additions & 0 deletions Resources/Prototypes/ADT/Alerts/alerts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -126,3 +126,11 @@
state: icon
name: alerts-crawling-name
description: alerts-crawling-desc

- type: alert
id: Adrenaline
icons:
- sprite: Mobs/Species/Human/organs.rsi
state: heart-on
name: alerts-adrenaline-name
description: alerts-adrenaline-desc
50 changes: 49 additions & 1 deletion Resources/Prototypes/ADT/Entities/Structures/Walls/walls.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,52 @@
damage: 550
behaviors:
- !type:DoActsBehavior
acts: [ "Destruction" ]
acts: [ "Destruction" ]

- type: entity
parent: BaseWall
id: ADTCardboardWall
name: cardboard Wall
description: A wall of paper and thin boards. Enjoys a certain popularity in [eastern place].
components:
- type: Sprite
sprite: ADT/Structures/Walls/cardboard_walls.rsi
- type: Icon
sprite: ADT/Structures/Walls/cardboard_walls.rsi
- type: IconSmooth
base: cardboard
- type: Destructible
thresholds:
- trigger:
!type:DamageTrigger
damage: 40
behaviors:
- !type:DoActsBehavior
acts: [ "Destruction" ]


- type: entity
parent: BaseWall
id: ADTStonebrickWall
name: stone brick Wall
description: Stone brick wall. Classic
components:
- type: Sprite
sprite: ADT/Structures/Walls/stone_bricks_wall.rsi
- type: Icon
sprite: ADT/Structures/Walls/stone_bricks_wall.rsi
- type: IconSmooth
base: stonebricks

- type: entity
parent: BaseWall
id: ADTYellowbrickWall
name: yellow brick Wall
description: Yellow bricks laid according to ancient customs
components:
- type: Sprite
sprite: ADT/Structures/Walls/yellow_bricks_wall.rsi
- type: Icon
sprite: ADT/Structures/Walls/yellow_bricks_wall.rsi
- type: IconSmooth
base: yellowbricks
Loading

0 comments on commit 3116ea9

Please sign in to comment.