mirror of
https://github.com/WWhiteDreamProject/wwdpublic.git
synced 2026-04-18 22:18:52 +03:00
# Description **Liquor Lifeline** 🍺 is a new trait (-3 points) that makes you slowly heal Brute and Burn (except Caustic) damage when drunk, healing more the drunker you are. Inspired by the SS13 /tg/station quirk called Drunken Resilience. Strength of Liquor Lifeline healing in terms of its Brute damage healed per tick compared to Bicaridine: - 0.1u to 0.5u Ethanol - 10% Bicaridine - 0.5u to 7u Ethanol - 20% Bicaridine - 7u to 11u Ethanol - 40% Bicaridine - 11u to 15u Ethanol - 80% Bicaridine - 15u+ Ethanol **(drunk poisoning starts)** - 120% Bicaridine ## Media **Trait entry**  # Changelog 🆑 Skubman - add: Add Liquor Lifeline (-3 points), a new positive trait that makes you slowly heal Brute and Burn damage when drunk, healing more the drunker you are. The trait also gives you the benefits of Alcohol Tolerance. - tweak: The cost of the Alcohol Tolerance trait has been reduced from -2 points to -1 point. - add: Dwarves receive the Liquor Lifeline trait for free. --------- Signed-off-by: Angelo Fallaria <ba.fallaria@gmail.com>
40 lines
1.3 KiB
C#
40 lines
1.3 KiB
C#
using Content.Server.Body.Components;
|
|
using Content.Server.Body.Systems;
|
|
using Content.Shared.Body.Components;
|
|
|
|
namespace Content.Server.Traits.Assorted;
|
|
|
|
public sealed class LiquorLifelineSystem : EntitySystem
|
|
{
|
|
[Dependency] private readonly BodySystem _bodySystem = default!;
|
|
|
|
public override void Initialize()
|
|
{
|
|
base.Initialize();
|
|
SubscribeLocalEvent<LiquorLifelineComponent, ComponentInit>(OnSpawn);
|
|
}
|
|
|
|
private void OnSpawn(Entity<LiquorLifelineComponent> entity, ref ComponentInit args)
|
|
{
|
|
if (!TryComp<BodyComponent>(entity, out var body))
|
|
return;
|
|
|
|
if (!_bodySystem.TryGetBodyOrganComponents<MetabolizerComponent>(entity, out var metabolizers, body))
|
|
return;
|
|
|
|
foreach (var (metabolizer, _) in metabolizers)
|
|
{
|
|
if (metabolizer.MetabolizerTypes is null
|
|
|| metabolizer.MetabolismGroups is null)
|
|
continue;
|
|
|
|
foreach (var metabolismGroup in metabolizer.MetabolismGroups)
|
|
{
|
|
// Add the LiquorLifeline metabolizer type to the liver and equivalent organs.
|
|
if (metabolismGroup.Id == "Alcohol")
|
|
metabolizer.MetabolizerTypes.Add("LiquorLifeline");
|
|
}
|
|
}
|
|
}
|
|
}
|