Skip to content

Commit

Permalink
spoder
Browse files Browse the repository at this point in the history
  • Loading branch information
Lyndomen committed Jan 16, 2025
1 parent 3db2afc commit d425c5d
Show file tree
Hide file tree
Showing 7 changed files with 35 additions and 12 deletions.
2 changes: 1 addition & 1 deletion Content.Client/_EE/Cocoon/CocoonSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ private void OnCocEntInserted(EntityUid uid, CocoonComponent component, EntInser
return;

if (TryComp<HumanoidAppearanceComponent>(args.Entity, out var humanoidAppearance)) // If humanoid, use height and width
cocoonSprite.Scale = new Vector2(humanoidAppearance.Width, humanoidAppearance.Height);
cocoonSprite.Scale = new Vector2(1,1);
else if (!TryComp<SpriteComponent>(args.Entity, out var entSprite))
return;
else if (entSprite.BaseRSI != null) // Set scale based on sprite scale + sprite dimensions. Ideally we would somehow get a bounding box from the sprite size not including transparent pixels, but FUCK figuring that out.
Expand Down
2 changes: 1 addition & 1 deletion Content.Server/_EE/Cocoon/CocoonerSystem.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Content.Shared.Cocoon;
using Content.Shared.Cocoon;
using Content.Shared.IdentityManagement;
using Content.Shared.Verbs;
using Content.Shared.DoAfter;
Expand Down
4 changes: 2 additions & 2 deletions Content.Server/_EE/Vampire/BloodSuckedComponent.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
namespace Content.Server.Vampiric
namespace Content.Server.Vampire
{
/// <summary>
/// For entities who have been succed.
/// For entities who have been sucked.
/// </summary>
[RegisterComponent]
public sealed partial class BloodSuckedComponent : Component
Expand Down
6 changes: 3 additions & 3 deletions Content.Server/_EE/Vampire/BloodSuckerComponent.cs
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
namespace Content.Server.Vampiric
namespace Content.Server.Vampire
{
[RegisterComponent]
public sealed partial class BloodSuckerComponent : Component
{
/// <summary>
/// How much to succ each time we succ.
/// How much to suck each time we suck.
/// </summary>
[DataField("unitsToSucc")]
public float UnitsToSucc = 20f;

/// <summary>
/// The time (in seconds) that it takes to succ an entity.
/// The time (in seconds) that it takes to suck an entity.
/// </summary>
[DataField, ViewVariables(VVAccess.ReadWrite)]
public TimeSpan Delay = TimeSpan.FromSeconds(4);
Expand Down
11 changes: 7 additions & 4 deletions Content.Server/_EE/Vampire/BloodSuckerSystem.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
using System.Linq;
using Content.Shared.Verbs;
using Content.Shared.Damage;
using Content.Shared.DoAfter;
Expand All @@ -19,7 +20,7 @@
using Robust.Shared.Audio.Systems;
using Robust.Shared.Utility;

namespace Content.Server.Vampiric
namespace Content.Server.Vampire
{
public sealed class BloodSuckerSystem : EntitySystem
{
Expand Down Expand Up @@ -157,11 +158,13 @@ public bool TrySucc(EntityUid bloodsucker, EntityUid victim, BloodSuckerComponen
return false;

// Does bloodsucker have a stomach?
var stomachList = _bodySystem.GetBodyOrganComponents<StomachComponent>(bloodsucker);
var stomachList = _bodySystem.GetBodyOrganEntityComps<StomachComponent>(bloodsucker);
if (stomachList.Count == 0)
return false;

if (!_solutionSystem.TryGetSolution(stomachList[0].Comp.Owner, StomachSystem.DefaultSolutionName, out var stomachSolution))
var stomach = stomachList.FirstOrDefault(); // DeltaV

if (!_solutionSystem.TryGetSolution(bloodsucker, StomachSystem.DefaultSolutionName, out var stomachSolution))
return false;

// Are we too full?
Expand All @@ -185,7 +188,7 @@ public bool TrySucc(EntityUid bloodsucker, EntityUid victim, BloodSuckerComponen
return false;

var temp = _solutionSystem.SplitSolution(bloodstream.BloodSolution.Value, bloodsuckerComp.UnitsToSucc);
_stomachSystem.TryTransferSolution(stomachList[0].Comp.Owner, temp, stomachList[0].Comp);
_stomachSystem.TryTransferSolution(bloodsucker, temp, stomach); // DeltaV

// Add a little pierce
DamageSpecifier damage = new();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
using Content.Server.Popups;
using Content.Server.Vampiric;
using Content.Shared.Interaction;

namespace Content.Server.Vampiric
namespace Content.Server.Vampire
{
public sealed class BloodSuckerGlandInjectorSystem : EntitySystem
{
Expand Down
19 changes: 19 additions & 0 deletions Resources/Locale/en-US/_EE/abilities/bloodsucker.ftl
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
action-name-suck-blood = Suck Blood
action-description-suck-blood = Suck the blood of the victim in your hand.
bloodsucker-fail-helmet = You'd need to remove {THE($helmet)}.
bloodsucker-fail-mask = You'd need to remove your mask!
bloodsucker-not-blood = {$target} doesn't have delicious, nourishing blood.
bloodsucker-fail-no-blood = {$target} has no blood in { POSS-ADJ($target) } body.
bloodsucker-fail-no-blood-bloodsucked = {$target} has been sucked dry.
bloodsucker-blood-sucked = You suck some blood from {$target}.
bloodsucker-doafter-start = You try to suck blood from {$target}.
bloodsucker-doafter-start-victim = {CAPITALIZE(THE($sucker))} is trying to bite your neck!
bloodsucker-blood-sucked-victim = {CAPITALIZE(THE($sucker))} sucks some of your blood!
bloodsucked-health-examine = [color=red]{ CAPITALIZE(SUBJECT($target)) } { CONJUGATE-HAVE($target) } bite marks on { POSS-ADJ($target) } neck.[/color]
bloodsucker-glands-throb = The glands behind your fangs feel a bit sore.

0 comments on commit d425c5d

Please sign in to comment.