diff --git a/Content.Server/Body/Systems/RespiratorSystem.cs b/Content.Server/Body/Systems/RespiratorSystem.cs
index 378ce439fc..9eef980ebf 100644
--- a/Content.Server/Body/Systems/RespiratorSystem.cs
+++ b/Content.Server/Body/Systems/RespiratorSystem.cs
@@ -235,9 +235,10 @@ namespace Content.Server.Body.Systems
// WD start
private void OnHandInteract(EntityUid uid, RespiratorComponent component, InteractHandEvent args)
{
- if (CanCPR(uid, component, args.User))
- DoCPR(uid, component, args.User);
+ if (!CanCPR(uid, component, args.User))
+ return;
+ DoCPR(uid, component, args.User);
args.Handled = true;
}
diff --git a/Content.Server/White/Carrying/BeingCarriedComponent.cs b/Content.Server/White/Carrying/BeingCarriedComponent.cs
index 22423900e5..afc78978c8 100644
--- a/Content.Server/White/Carrying/BeingCarriedComponent.cs
+++ b/Content.Server/White/Carrying/BeingCarriedComponent.cs
@@ -4,7 +4,7 @@ namespace Content.Server.Carrying
/// Stores the carrier of an entity being carried.
///
[RegisterComponent]
- public sealed class BeingCarriedComponent : Component
+ public sealed partial class BeingCarriedComponent : Component
{
public EntityUid Carrier = default!;
}
diff --git a/Content.Server/White/Carrying/CarriableComponent.cs b/Content.Server/White/Carrying/CarriableComponent.cs
index 0f6a802ad0..f4fd1fa6d5 100644
--- a/Content.Server/White/Carrying/CarriableComponent.cs
+++ b/Content.Server/White/Carrying/CarriableComponent.cs
@@ -3,7 +3,7 @@ using System.Threading;
namespace Content.Server.Carrying
{
[RegisterComponent]
- public sealed class CarriableComponent : Component
+ public sealed partial class CarriableComponent : Component
{
///
/// Number of free hands required
diff --git a/Content.Server/White/Carrying/CarryingComponent.cs b/Content.Server/White/Carrying/CarryingComponent.cs
index c13ca92c4e..e79460595b 100644
--- a/Content.Server/White/Carrying/CarryingComponent.cs
+++ b/Content.Server/White/Carrying/CarryingComponent.cs
@@ -4,7 +4,7 @@ namespace Content.Server.Carrying
/// Added to an entity when they are carrying somebody.
///
[RegisterComponent]
- public sealed class CarryingComponent : Component
+ public sealed partial class CarryingComponent : Component
{
public EntityUid Carried = default!;
}
diff --git a/Content.Server/White/Carrying/CarryingSystem.cs b/Content.Server/White/Carrying/CarryingSystem.cs
index c661fadf15..8e03669a38 100644
--- a/Content.Server/White/Carrying/CarryingSystem.cs
+++ b/Content.Server/White/Carrying/CarryingSystem.cs
@@ -1,11 +1,9 @@
using System.Threading;
using Content.Server.DoAfter;
-using Content.Server.Body.Systems;
using Content.Server.Hands.Systems;
using Content.Server.Resist;
using Content.Server.Popups;
using Content.Server.Contests;
-using Content.Server.Climbing;
using Content.Shared.Mobs;
using Content.Shared.DoAfter;
using Content.Shared.Buckle.Components;
@@ -21,6 +19,7 @@ using Content.Shared.Pulling;
using Content.Shared.Pulling.Components;
using Content.Shared.Standing;
using Content.Shared.ActionBlocker;
+using Content.Shared.Climbing.Events;
using Content.Shared.Throwing;
using Content.Shared.Physics.Pull;
using Content.Shared.Mobs.Systems;
@@ -225,7 +224,7 @@ namespace Content.Server.Carrying
component.CancelToken = new CancellationTokenSource();
var ev = new CarryDoAfterEvent();
- var args = new DoAfterArgs(carrier, length, ev, carried, target: carried)
+ var args = new DoAfterArgs(EntityManager, carrier, length, ev, carried, target: carried)
{
BreakOnTargetMove = true,
BreakOnUserMove = true,
diff --git a/Content.Server/White/Felinid/CoughingUpHairballComponent.cs b/Content.Server/White/Felinid/CoughingUpHairballComponent.cs
index 854a29894a..6102bcbfa1 100644
--- a/Content.Server/White/Felinid/CoughingUpHairballComponent.cs
+++ b/Content.Server/White/Felinid/CoughingUpHairballComponent.cs
@@ -1,7 +1,7 @@
namespace Content.Server.Abilities.Felinid
{
[RegisterComponent]
- public sealed class CoughingUpHairballComponent : Component
+ public sealed partial class CoughingUpHairballComponent : Component
{
[DataField("accumulator")]
public float Accumulator = 0f;
diff --git a/Content.Server/White/Felinid/FelinidComponent.cs b/Content.Server/White/Felinid/FelinidComponent.cs
index 51a74fe04a..42858a9cb0 100644
--- a/Content.Server/White/Felinid/FelinidComponent.cs
+++ b/Content.Server/White/Felinid/FelinidComponent.cs
@@ -1,12 +1,10 @@
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
using Robust.Shared.Prototypes;
-using Content.Shared.Actions.ActionTypes;
-using Robust.Shared.Utility;
namespace Content.Server.Abilities.Felinid
{
[RegisterComponent]
- public sealed class FelinidComponent : Component
+ public sealed partial class FelinidComponent : Component
{
///
/// The hairball prototype to use.
@@ -14,8 +12,9 @@ namespace Content.Server.Abilities.Felinid
[DataField("hairballPrototype", customTypeSerializer: typeof(PrototypeIdSerializer))]
public string HairballPrototype = "Hairball";
- [DataField("hairballAction")]
- public InstantAction? HairballAction;
+ public EntityUid? HairballAction;
+
+ public EntityUid? EatMouseAction;
public EntityUid? PotentialTarget = null;
}
diff --git a/Content.Server/White/Felinid/FelinidFoodComponent.cs b/Content.Server/White/Felinid/FelinidFoodComponent.cs
index 11543401e5..559e70e629 100644
--- a/Content.Server/White/Felinid/FelinidFoodComponent.cs
+++ b/Content.Server/White/Felinid/FelinidFoodComponent.cs
@@ -1,6 +1,6 @@
namespace Content.Server.Abilities.Felinid
{
[RegisterComponent]
- public sealed class FelinidFoodComponent : Component
+ public sealed partial class FelinidFoodComponent : Component
{}
}
diff --git a/Content.Server/White/Felinid/FelinidSystem.cs b/Content.Server/White/Felinid/FelinidSystem.cs
index 610631a0c0..13596523f9 100644
--- a/Content.Server/White/Felinid/FelinidSystem.cs
+++ b/Content.Server/White/Felinid/FelinidSystem.cs
@@ -1,22 +1,20 @@
using Content.Shared.Actions;
-using Content.Shared.Audio;
using Content.Shared.StatusEffect;
using Content.Shared.Throwing;
using Content.Shared.Item;
using Content.Shared.Inventory;
using Content.Shared.Hands;
-using Content.Shared.Actions.ActionTypes;
using Content.Shared.IdentityManagement;
using Content.Shared.Nutrition.Components;
using Content.Shared.Nutrition.EntitySystems;
using Content.Server.Body.Components;
+using Content.Server.Chemistry.Containers.EntitySystems;
using Content.Server.Medical;
-using Content.Server.Nutrition.EntitySystems;
using Content.Server.Nutrition.Components;
-using Content.Server.Chemistry.EntitySystems;
using Content.Server.Popups;
+using Content.Shared.White.Events;
+using Robust.Server.Audio;
using Robust.Shared.Audio;
-using Robust.Shared.Player;
using Robust.Shared.Random;
using Robust.Shared.Prototypes;
@@ -24,7 +22,6 @@ namespace Content.Server.Abilities.Felinid
{
public sealed class FelinidSystem : EntitySystem
{
-
[Dependency] private readonly SharedActionsSystem _actionsSystem = default!;
[Dependency] private readonly HungerSystem _hungerSystem = default!;
[Dependency] private readonly VomitSystem _vomitSystem = default!;
@@ -32,7 +29,7 @@ namespace Content.Server.Abilities.Felinid
[Dependency] private readonly IRobustRandom _robustRandom = default!;
[Dependency] private readonly PopupSystem _popupSystem = default!;
[Dependency] private readonly InventorySystem _inventorySystem = default!;
- [Dependency] private readonly IPrototypeManager _prototypeManager = default!;
+ [Dependency] private readonly AudioSystem _audio = default!;
public override void Initialize()
{
@@ -71,11 +68,7 @@ namespace Content.Server.Abilities.Felinid
private void OnInit(EntityUid uid, FelinidComponent component, ComponentInit args)
{
- if (!_prototypeManager.TryIndex("HairballAction", out var hairball))
- return;
-
- component.HairballAction = new InstantAction(hairball);
- _actionsSystem.AddAction(uid, component.HairballAction, uid);
+ _actionsSystem.AddAction(uid, ref component.HairballAction, "HairballAction");
}
private void OnEquipped(EntityUid uid, FelinidComponent component, DidEquipHandEvent args)
@@ -85,8 +78,7 @@ namespace Content.Server.Abilities.Felinid
component.PotentialTarget = args.Equipped;
- if (_prototypeManager.TryIndex("EatMouse", out var eatMouse))
- _actionsSystem.AddAction(uid, new InstantAction(eatMouse), null);
+ _actionsSystem.AddAction(uid, ref component.EatMouseAction, "EatMouse");
}
private void OnUnequipped(EntityUid uid, FelinidComponent component, DidUnequipHandEvent args)
@@ -94,8 +86,7 @@ namespace Content.Server.Abilities.Felinid
if (args.Unequipped == component.PotentialTarget)
{
component.PotentialTarget = null;
- if (_prototypeManager.TryIndex("EatMouse", out var eatMouse))
- _actionsSystem.RemoveAction(uid, eatMouse);
+ _actionsSystem.RemoveAction(uid, component.EatMouseAction);
}
}
@@ -110,7 +101,7 @@ namespace Content.Server.Abilities.Felinid
}
_popupSystem.PopupEntity(Loc.GetString("hairball-cough", ("name", Identity.Entity(uid, EntityManager))), uid);
- SoundSystem.Play("/Audio/White/Felinid/hairball.ogg", Filter.Pvs(uid), uid, AudioHelpers.WithVariation(0.15f));
+ _audio.PlayPvs("/Audio/White/Felinid/hairball.ogg", uid, AudioParams.Default.WithVariation(0.15f));
EnsureComp(uid);
args.Handled = true;
@@ -140,18 +131,17 @@ namespace Content.Server.Abilities.Felinid
if (component.HairballAction != null)
{
- _actionsSystem.SetCharges(component.HairballAction, component.HairballAction.Charges + 1);
+ _actionsSystem.AddCharges(component.HairballAction, 1);
_actionsSystem.SetEnabled(component.HairballAction, true);
}
Del(component.PotentialTarget.Value);
component.PotentialTarget = null;
- SoundSystem.Play("/Audio/Items/eatfood.ogg", Filter.Pvs(uid), uid, AudioHelpers.WithVariation(0.15f));
+ _audio.PlayPvs("/Audio/Items/eatfood.ogg", uid, AudioParams.Default.WithVariation(0.15f));
_hungerSystem.ModifyHunger(uid, 70f, hunger);
- if (_prototypeManager.TryIndex("EatMouse", out var eatMouse))
- _actionsSystem.RemoveAction(uid, eatMouse);
+ _actionsSystem.RemoveAction(uid, component.EatMouseAction);
}
private void SpawnHairball(EntityUid uid, FelinidComponent component)
@@ -159,13 +149,13 @@ namespace Content.Server.Abilities.Felinid
var hairball = EntityManager.SpawnEntity(component.HairballPrototype, Transform(uid).Coordinates);
var hairballComp = Comp(hairball);
- if (TryComp(uid, out var bloodstream))
+ if (TryComp(uid, out var bloodstream) && bloodstream.ChemicalSolution != null)
{
- var temp = bloodstream.ChemicalSolution.SplitSolution(20);
+ var temp = _solutionSystem.SplitSolution(bloodstream.ChemicalSolution.Value, 20);
if (_solutionSystem.TryGetSolution(hairball, hairballComp.SolutionName, out var hairballSolution))
{
- _solutionSystem.TryAddSolution(hairball, hairballSolution, temp);
+ _solutionSystem.TryAddSolution(hairballSolution.Value, temp);
}
}
}
@@ -189,7 +179,4 @@ namespace Content.Server.Abilities.Felinid
}
}
}
-
- public sealed class HairballActionEvent : InstantActionEvent {}
- public sealed class EatMouseActionEvent : InstantActionEvent {}
}
diff --git a/Content.Server/White/Felinid/HairballComponent.cs b/Content.Server/White/Felinid/HairballComponent.cs
index 465d81791c..d358926c20 100644
--- a/Content.Server/White/Felinid/HairballComponent.cs
+++ b/Content.Server/White/Felinid/HairballComponent.cs
@@ -1,7 +1,7 @@
namespace Content.Server.Abilities.Felinid
{
[RegisterComponent]
- public sealed class HairballComponent : Component
+ public sealed partial class HairballComponent : Component
{
public string SolutionName = "hairball";
}
diff --git a/Content.Shared/White/Carrying/CarryingDoAfterEvent.cs b/Content.Shared/White/Carrying/CarryingDoAfterEvent.cs
index 642dde5ddf..6acd6b775f 100644
--- a/Content.Shared/White/Carrying/CarryingDoAfterEvent.cs
+++ b/Content.Shared/White/Carrying/CarryingDoAfterEvent.cs
@@ -4,7 +4,7 @@ using Content.Shared.DoAfter;
namespace Content.Shared.Carrying
{
[Serializable, NetSerializable]
- public sealed class CarryDoAfterEvent : SimpleDoAfterEvent
+ public sealed partial class CarryDoAfterEvent : SimpleDoAfterEvent
{
}
}
diff --git a/Content.Shared/White/Carrying/CarryingSlowdownComponent.cs b/Content.Shared/White/Carrying/CarryingSlowdownComponent.cs
index f9913c36a0..aabde66af0 100644
--- a/Content.Shared/White/Carrying/CarryingSlowdownComponent.cs
+++ b/Content.Shared/White/Carrying/CarryingSlowdownComponent.cs
@@ -5,7 +5,7 @@ namespace Content.Shared.Carrying
{
[RegisterComponent, NetworkedComponent, Access(typeof(CarryingSlowdownSystem))]
- public sealed class CarryingSlowdownComponent : Component
+ public sealed partial class CarryingSlowdownComponent : Component
{
[DataField("walkModifier", required: true)] [ViewVariables(VVAccess.ReadWrite)]
public float WalkModifier = 1.0f;
@@ -25,4 +25,4 @@ namespace Content.Shared.Carrying
SprintModifier = sprintModifier;
}
}
-}
\ No newline at end of file
+}
diff --git a/Content.Shared/White/Events/FelinidEvents.cs b/Content.Shared/White/Events/FelinidEvents.cs
new file mode 100644
index 0000000000..5a6d6fe888
--- /dev/null
+++ b/Content.Shared/White/Events/FelinidEvents.cs
@@ -0,0 +1,11 @@
+using Content.Shared.Actions;
+
+namespace Content.Shared.White.Events;
+
+public sealed partial class HairballActionEvent : InstantActionEvent
+{
+}
+
+public sealed partial class EatMouseActionEvent : InstantActionEvent
+{
+}
diff --git a/Content.Shared/White/Item/PseudoItemInsertDoAfterEvent.cs b/Content.Shared/White/Item/PseudoItemInsertDoAfterEvent.cs
index ac6417cb85..c7c76fbd08 100644
--- a/Content.Shared/White/Item/PseudoItemInsertDoAfterEvent.cs
+++ b/Content.Shared/White/Item/PseudoItemInsertDoAfterEvent.cs
@@ -4,7 +4,7 @@ using Content.Shared.DoAfter;
namespace Content.Shared.Item.PseudoItem
{
[Serializable, NetSerializable]
- public sealed class PseudoItemInsertDoAfterEvent : SimpleDoAfterEvent
+ public sealed partial class PseudoItemInsertDoAfterEvent : SimpleDoAfterEvent
{
}
}
diff --git a/Resources/Locale/ru-RU/white/species/felinid/felinid.ftl b/Resources/Locale/ru-RU/white/species/felinid/felinid.ftl
index 5943bd2f30..0447af3898 100644
--- a/Resources/Locale/ru-RU/white/species/felinid/felinid.ftl
+++ b/Resources/Locale/ru-RU/white/species/felinid/felinid.ftl
@@ -6,6 +6,11 @@ hairball-cough = {CAPITALIZE(THE($name))} пытается выкашлять к
action-name-eat-mouse = Съесть мышь.
action-description-eat-mouse = Съешьте мышь в своей руке, получая питательные вещества и заряд комка шерсти.
+ent-HairballAction = Откашлять комок шерсти.
+ .desc = Люди это не любят.
+
+ent-EatMouse = Съесть мышь.
+ .desc = Съешьте мышь в своей руке, получая питательные вещества и заряд комка шерсти.
marking-FelinidEarsBasic = Обычные ушки
marking-FelinidEarsBasic-basic_outer = Внешняя часть уха
diff --git a/Resources/Prototypes/Entities/Markers/Spawners/Random/loot.yml b/Resources/Prototypes/Entities/Markers/Spawners/Random/loot.yml
index 0c6ef3721c..9a05118dcf 100644
--- a/Resources/Prototypes/Entities/Markers/Spawners/Random/loot.yml
+++ b/Resources/Prototypes/Entities/Markers/Spawners/Random/loot.yml
@@ -1,4 +1,4 @@
-- type: entity
+- type: entity
name: Engineer loot spawner
id: EngiLootSpawner
parent: MarkerBase
@@ -59,7 +59,7 @@
layers:
- state: red
- sprite: Objects/Specific/Janitorial/soap.rsi
- state: omega
+ state: omega-4
- type: RandomSpawner
rarePrototypes:
- FoamBlade
diff --git a/Resources/Prototypes/White/Mobs/Player/felinid.yml b/Resources/Prototypes/White/Mobs/Player/felinid.yml
index a9c193373f..2286b850c9 100644
--- a/Resources/Prototypes/White/Mobs/Player/felinid.yml
+++ b/Resources/Prototypes/White/Mobs/Player/felinid.yml
@@ -31,9 +31,6 @@
- type: CameraRecoil
- type: Examiner
- type: CanHostGuardian
- - type: Faction
- factions:
- - NanoTrasen
- type: Felinid #since this just adds an action...
- type: InteractionPopup
successChance: 1
diff --git a/Resources/Prototypes/White/Mobs/Species/felinid.yml b/Resources/Prototypes/White/Mobs/Species/felinid.yml
index e54a35580e..2328210e9a 100644
--- a/Resources/Prototypes/White/Mobs/Species/felinid.yml
+++ b/Resources/Prototypes/White/Mobs/Species/felinid.yml
@@ -115,12 +115,6 @@
types:
Blunt: 1
Slash: 5
- - type: DiseaseCarrier
- naturalImmunities:
- - OwOnavirus
- - type: Thieving
- stealthy: true
- stripTimeReduction: 1
- type: Speech
speechSounds: Alto
- type: DamageOnHighSpeedImpact
diff --git a/Resources/Prototypes/White/Species/actions.yml b/Resources/Prototypes/White/Species/actions.yml
index c56c6748d3..28ef9d91b7 100644
--- a/Resources/Prototypes/White/Species/actions.yml
+++ b/Resources/Prototypes/White/Species/actions.yml
@@ -1,14 +1,23 @@
-- type: instantAction
+- type: entity
id: EatMouse
- name: action-name-eat-mouse
- description: action-description-eat-mouse
- icon: White/Icons/verbiconfangs.png
- serverEvent: !type:EatMouseActionEvent
+ name: Eat mouse
+ description: Eat the mouse in your hand, receiving nutrients and a hairball charge.
+ nospawn: true
+ components:
+ - type: InstantAction
+ icon: White/Icons/verbiconfangs.png
+ event: !type:EatMouseActionEvent
-- type: instantAction
+- type: entity
id: HairballAction
- name: hairball-action
- description: hairball-action-desc
- charges: 1
- useDelay: 30
- serverEvent: !type:HairballActionEvent
+ name: Cough up a hairball.
+ description: People don't like that.
+ nospawn: true
+ components:
+ - type: InstantAction
+ icon:
+ sprite: White/Specific/Species/felinid.rsi
+ state: icon
+ event: !type:HairballActionEvent
+ charges: 1
+ useDelay: 30