Skip to content

Commit

Permalink
Merge branch 'Fansana:master' into Ghost-Role-Bar
Browse files Browse the repository at this point in the history
  • Loading branch information
ShatteredSwords authored Sep 3, 2024
2 parents da6b7c1 + 1009ac7 commit 7c7c128
Show file tree
Hide file tree
Showing 13 changed files with 192 additions and 51 deletions.
3 changes: 2 additions & 1 deletion Content.Server/Body/Components/MetabolizerComponent.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using Content.Server.Body.Systems;
using Content.Server.Floofstation.Traits;
using Content.Server.Traits.Assorted;
using Content.Shared.Body.Prototypes;
using Content.Shared.FixedPoint;
Expand Down Expand Up @@ -45,7 +46,7 @@ public sealed partial class MetabolizerComponent : Component
/// List of metabolizer types that this organ is. ex. Human, Slime, Felinid, w/e.
/// </summary>
[DataField]
[Access(typeof(MetabolizerSystem), typeof(LiquorLifelineSystem), Other = AccessPermissions.ReadExecute)] // FIXME Friends
[Access(typeof(MetabolizerSystem), typeof(LiquorLifelineSystem), typeof(VampirismSystem), Other = AccessPermissions.ReadExecute)] // Floofstation
public HashSet<ProtoId<MetabolizerTypePrototype>>? MetabolizerTypes = null;

/// <summary>
Expand Down
2 changes: 2 additions & 0 deletions Content.Server/Body/Components/StomachComponent.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using Content.Server.Body.Systems;
using Content.Server.Floofstation.Traits;
using Content.Server.Nutrition.EntitySystems;
using Content.Shared.Chemistry.Components;
using Content.Shared.Chemistry.Reagent;
Expand Down Expand Up @@ -45,6 +46,7 @@ public sealed partial class StomachComponent : Component
/// A whitelist for what special-digestible-required foods this stomach is capable of eating.
/// </summary>
[DataField]
[Access(Other = AccessPermissions.ReadWriteExecute)] // Floofstation
public EntityWhitelist? SpecialDigestible = null;

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
using Content.Server.Body.Components;
using Content.Shared.Body.Prototypes;
using Content.Shared.Whitelist;
using Robust.Shared.Prototypes;

namespace Content.Server.Floofstation.Traits.Components;

/// <summary>
/// Enables the mob to suck blood from other mobs to replenish its own saturation.
/// Must be fully initialized before being added to a mob.
/// </summary>
[RegisterComponent]
public sealed partial class VampirismComponent : Component
{
[DataField]
public HashSet<ProtoId<MetabolizerTypePrototype>> MetabolizerPrototypes = new() { "Vampiric", "Animal" };

/// <summary>
/// A whitelist for what special-digestible-required foods the vampire's stomach is capable of eating.
/// </summary>
[DataField]
public EntityWhitelist? SpecialDigestible = null;

[DataField]
public TimeSpan SuccDelay = TimeSpan.FromSeconds(1);

[DataField]
public float UnitsToSucc = 10;
}
51 changes: 51 additions & 0 deletions Content.Server/FloofStation/Traits/VampirismSystem.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
using Content.Server.Body.Components;
using Content.Server.Floofstation.Traits.Components;
using Content.Server.Vampiric;
using Content.Shared.Body.Components;
using Content.Shared.Body.Systems;

namespace Content.Server.Floofstation.Traits;

public sealed class VampirismSystem : EntitySystem
{
[Dependency] private readonly SharedBodySystem _body = default!;

public override void Initialize()
{
SubscribeLocalEvent<VampirismComponent, MapInitEvent>(OnInitVampire);
}

private void OnInitVampire(Entity<VampirismComponent> ent, ref MapInitEvent args)
{
EnsureBloodSucker(ent);

if (!TryComp<BodyComponent>(ent, out var body)
|| !_body.TryGetBodyOrganComponents<MetabolizerComponent>(ent, out var comps, body))
return;

foreach (var (metabolizer, organ) in comps)
{
if (!TryComp<StomachComponent>(organ.Owner, out var stomach))
continue;

metabolizer.MetabolizerTypes = ent.Comp.MetabolizerPrototypes;

if (ent.Comp.SpecialDigestible is {} whitelist)
stomach.SpecialDigestible = whitelist;
}
}

private void EnsureBloodSucker(Entity<VampirismComponent> uid)
{
if (HasComp<BloodSuckerComponent>(uid))
return;

AddComp(uid, new BloodSuckerComponent
{
Delay = uid.Comp.SuccDelay,
InjectWhenSucc = false, // The code for it is deprecated, might wanna make it inject something when (if?) it gets reworked
UnitsToSucc = uid.Comp.UnitsToSucc,
WebRequired = false
});
}
}
20 changes: 20 additions & 0 deletions Resources/Changelog/Floof.yml
Original file line number Diff line number Diff line change
Expand Up @@ -785,3 +785,23 @@ Entries:
message: Whips and Paddles to lockers.
id: 108
time: '2024-09-01T18:55:37.0000000+00:00'
- author: ShatteredSwords
changes:
- type: Tweak
message: Many trait costs have been cheapened, some traits have been changed.
id: 109
time: '2024-09-01T23:06:43.0000000+00:00'
- author: Mnemotechnician
changes:
- type: Tweak
message: >-
The vampirism trait now changes your body's metabolism to the vampiric
type, making you unable to eat normal food and requiring you to drink
blood to survive.
- type: Add
message: >-
A new "hollow fangs" trait has been added. It simply allows you to suck
(and metabolize) blood, without the benefits and drawbacks of being a
vampire.
id: 110
time: '2024-09-02T03:14:35.0000000+00:00'
8 changes: 7 additions & 1 deletion Resources/Locale/en-US/Floof/traits/traits.ftl
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
trait-name-Vampirism = Vampirism
trait-description-Vampirism = Whether through implantation, genetic modification, or evolution, you have a pair of hollow, sharp fangs used to drink iron-based blood from the beings that contain it.
trait-description-Vampirism =
Your body has evolved to be able to suck blood from beings that contain it and metabolize it into useful compounds.
You cannot eat normal food, but drinking blood satiates your hunger and thirst, and also improves your health.
trait-name-HollowFangs = Hollow Fangs
trait-description-HollowFangs =
Whether through implantation, genetic modification, or evolution, you have a pair of hollow, sharp fangs used to drink iron-based blood from the beings that contain it.
trait-name-CumProducer = Cock
trait-description-CumProducer = You have a schlong between your legs.
Expand Down
2 changes: 1 addition & 1 deletion Resources/Locale/en-US/traits/traits.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ trait-description-Tenacity =
trait-name-GlassJaw = Glass Jaw
trait-description-GlassJaw =
Your body is more fragile than others, resulting in a greater susceptibility to critical injuries
Your damage threshold for becoming Critical is decreased by 10 points.
Your damage threshold for becoming Critical is decreased by 7 points.
trait-name-HighAdrenaline = High Adrenaline
trait-description-HighAdrenaline =
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
- type: entity
parent: ClothingOuterWinterCoat
id: ClothingLongcoatAL
name: Arashi Labs Longcoat
name: arashi labs longcoat
description: A Double-Breasted longcoat, specifically. This one is in the colors of Arashi Laboratories, A biotech corporation claiming to hail from the 'Long Rim', wherever that is. Longcoats are fairly robust, offering some protection from the wear and tear of the universe.
components:
- type: Sprite
Expand All @@ -12,7 +12,7 @@
- type: entity
parent: ClothingOuterWinterCoat
id: ClothingLongcoatNT
name: Nanotrasen Longcoat
name: nanotrasen longcoat
description: A Double-Breasted longcoat, specifically. This one is in the colors of NanoTrasen, The general-purpose spacefaring corporation that you (hopefully) work for! Longcoats are fairly robust, offering some protection from the wear and tear of the universe.
components:
- type: Sprite
Expand All @@ -23,7 +23,7 @@
- type: entity
parent: ClothingOuterWinterCoat
id: ClothingLongcoatBlack
name: Black Longcoat
name: black longcoat
description: A Double-Breasted longcoat, specifically. This one is matte black with gold-tinted brass buttons. Longcoats are fairly robust, offering some protection from the wear and tear of the universe.
components:
- type: Sprite
Expand All @@ -34,7 +34,7 @@
- type: entity
parent: ClothingOuterWinterCoat
id: ClothingLongcoatBrown
name: Brown Longcoat
name: brown longcoat
description: A Double-Breasted longcoat, specifically. This one is matte brown with onyx buttons. Longcoats are fairly robust, offering some protection from the wear and tear of the universe.
components:
- type: Sprite
Expand All @@ -45,7 +45,7 @@
- type: entity
parent: ClothingOuterWinterCoat
id: ClothingLongcoatLO
name: Logistics Officer's Longcoat
name: logistics officer's longcoat
description: A Double-Breasted longcoat, specifically. This one is a saturated brown with mossy trim, fit for the Logistics Officer. Longcoats are fairly robust, offering some protection from the wear and tear of the universe.
components:
- type: Sprite
Expand All @@ -56,7 +56,7 @@
- type: entity
parent: ClothingOuterWinterCoat
id: ClothingLongcoatRD
name: Mystagogue's Longcoat
name: mystagogue's longcoat
description: A Double-Breasted longcoat, specifically. This one is a pure white with a purple stripe, fit for the Mystagogue. Longcoats are fairly robust, offering some protection from the wear and tear of the universe.
components:
- type: Sprite
Expand All @@ -67,7 +67,7 @@
- type: entity
parent: ClothingOuterWinterCoat
id: ClothingLongcoatCMO
name: Chief Medical Officer's Longcoat
name: chief medical officer's longcoat
description: A Double-Breasted longcoat, specifically. This one is a deep cyan with a green cross, fit for the CMO. Longcoats are fairly robust, offering some protection from the wear and tear of the universe.
components:
- type: Sprite
Expand All @@ -78,7 +78,7 @@
- type: entity
parent: ClothingOuterWinterCoat
id: ClothingLongcoatCE
name: Chief Engineer's Longcoat
name: chief engineer's longcoat
description: A Double-Breasted longcoat, specifically. This one is a dark green with LED strip trim, fit for the CE. Longcoats are fairly robust, offering some protection from the wear and tear of the universe.
components:
- type: Sprite
Expand All @@ -89,7 +89,7 @@
- type: entity
parent: ClothingOuterWinterCoat
id: ClothingLongcoatHoP
name: Head of Personnel's Longcoat
name: head of personnel's longcoat
description: A Double-Breasted longcoat, specifically. This one is a navy blue with red shoulderpads, fit for the HoP. Longcoats are fairly robust, offering some protection from the wear and tear of the universe.
components:
- type: Sprite
Expand All @@ -100,7 +100,7 @@
- type: entity
parent: ClothingOuterWinterCoat
id: ClothingLongcoatCap
name: Captain's Longcoat
name: captain's longcoat
description: A Double-Breasted longcoat, specifically. This one is a navy blue with gold embelleshments, fit for the Captain. Longcoats are fairly robust, offering some protection from the wear and tear of the universe.
components:
- type: Sprite
Expand All @@ -111,7 +111,7 @@
- type: entity
parent: ClothingOuterWinterCoat
id: ClothingLongcoatSec
name: Security Officer's Armored Longcoat
name: security officer's armored longcoat
description: A Double-Breasted longcoat, specifically. This one is black with silver buttons and red armbands. Security longcoats sport protective plate carriers underneath, but are fairly heavy.
components:
- type: Sprite
Expand All @@ -135,7 +135,7 @@
- type: entity
parent: ClothingOuterWinterCoat
id: ClothingLongcoatWarden
name: Warden's Armored Longcoat
name: warden's armored longcoat
description: A Double-Breasted longcoat, specifically. This one is black with silver buttons and red band and cuffs, fit for the Warden. Security longcoats sport protective plate carriers underneath, but are fairly heavy.
components:
- type: Sprite
Expand All @@ -159,7 +159,7 @@
- type: entity
parent: ClothingOuterWinterCoat
id: ClothingLongcoatBrigmedic
name: Corpsman's Armored Longcoat
name: corpsman's armored longcoat
description: A Double-Breasted longcoat, specifically. This one is black with silver buttons, red and blue bands, and sterile fabric cuffs fit for the Corpsman. Security longcoats sport protective plate carriers underneath, though this one comes with lighter plates that traditional Armored Longcoats.
components:
- type: Sprite
Expand All @@ -183,7 +183,7 @@
- type: entity
parent: ClothingOuterWinterCoat
id: ClothingLongcoatHoS
name: Head of Security's Armored Longcoat
name: head of security's armored longcoat
description: A Double-Breasted longcoat, specifically. This one is black with gold buttons and gray sleeves with velvet trim along the whole outfit. A heavier alternative to the Armored Coat.
components:
- type: Sprite
Expand All @@ -207,7 +207,7 @@
- type: entity
parent: ClothingOuterWinterCoat
id: ClothingLongcoatCC
name: Central Command Longcoat
name: central command longcoat
description: A Double-Breasted longcoat, specifically. This one is a royal green with gold embellishments, fit for a Central Command Agent. Longcoats are fairly robust, offering some protection from the wear and tear of the universe.
components:
- type: Sprite
Expand Down
49 changes: 38 additions & 11 deletions Resources/Prototypes/Floof/Traits/physical.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,54 @@
- type: trait
id: Vampirism # You may port this to EE, you have my permission!
category: Physical
points: -1
points: 3
requirements:
- !type:CharacterJobRequirement
inverted: true
jobs:
- Borg
- MedicalBorg
- !type:CharacterSpeciesRequirement # This will be removed once you can edit organs with traits
- !type:CharacterSpeciesRequirement
inverted: true
species:
- Moth
- Oni
- Diona
- SlimePerson
- Human
- IPC
- !type:CharacterTraitRequirement
inverted: true
traits:
- HollowFangs
components:
- type: Vampirism
succDelay: 3
specialDigestible: # Vampires cannot eat food chat is that real
tags:
- IceCream
- Pill
- Crayon
- Paper

- type: trait
id: HollowFangs
category: Physical
points: -2
requirements:
- !type:CharacterJobRequirement
inverted: true
jobs:
- Borg
- MedicalBorg
- !type:CharacterSpeciesRequirement
inverted: true
species:
- IPC
- !type:CharacterTraitRequirement
inverted: true
traits:
- Vampirism
components:
- type: BloodSucker
unitsToSucc: 10
injectWhenSucc: false
webRequired: false
- type: Vampirism
succDelay: 5
metabolizerPrototypes:
- Animal

- type: trait
id: Weakness
Expand Down
5 changes: 5 additions & 0 deletions Resources/Prototypes/Reagents/biological.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,11 @@
- !type:AdjustReagent
reagent: UncookedAnimalProteins
amount: 0.5
# Floofstation - prevent vampires from getting sick by drinking blood
conditions:
- !type:OrganType
type: Vampiric
shouldHave: false
Medicine:
effects:
- !type:HealthChange
Expand Down
Loading

0 comments on commit 7c7c128

Please sign in to comment.