From df631ff8a07325a889b45235120eec60fe844233 Mon Sep 17 00:00:00 2001
From: nikthechampiongr <32041239+nikthechampiongr@users.noreply.github.com>
Date: Thu, 28 Mar 2024 19:19:53 +0000
Subject: [PATCH 01/22] Fix Incorrect stealth messages appearing on readmin.
(#26511)
Fix major skill issue/Incorrect stealth messages appearing on readmin.
---
Content.Server/Administration/Managers/AdminManager.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Content.Server/Administration/Managers/AdminManager.cs b/Content.Server/Administration/Managers/AdminManager.cs
index 371755dcef..41171eef73 100644
--- a/Content.Server/Administration/Managers/AdminManager.cs
+++ b/Content.Server/Administration/Managers/AdminManager.cs
@@ -154,7 +154,7 @@ namespace Content.Server.Administration.Managers
plyData.ExplicitlyDeadminned = false;
reg.Data.Active = true;
- if (reg.Data.Stealth)
+ if (!reg.Data.Stealth)
{
_chat.SendAdminAnnouncement(Loc.GetString("admin-manager-self-re-admin-message", ("newAdminName", session.Name)));
}
From aba16198f6846d880b3a1c233b5e9252d21e6985 Mon Sep 17 00:00:00 2001
From: Nemanja <98561806+EmoGarbage404@users.noreply.github.com>
Date: Thu, 28 Mar 2024 16:44:44 -0400
Subject: [PATCH 02/22] Go back to constant electrocution damage based on
voltage (#26455)
Makes electrocution damage based on the voltage of the wire and bring down the damage to a sane level. It's no longer primarily based on the power being received.
LV Cable -> 10 damage
MV Cable -> 20 damage
HV Cable -> 30 damage
Having a primarily power-based damage system causes there to be massive fluctuations in damage based on things outside of a regular player's control, like the station power output. This removes a lot of player agency and turns grilles into a risky gamble where they can either do no damage or instantly fry the player due to simply being hooked up to the engine.
While this may be a more accurate simulation in some regards, the reality of the gameplay is that it's often just frustrating, resulting in constant death traps as players brushing against electrified grilles and punching wires take absurd amounts of damage. By making them flat rates, it's possible to actually balance the damage output.
---
.../Components/ElectrifiedComponent.cs | 26 +++++++++-
.../Components/ElectrocutionComponent.cs | 6 ---
.../Electrocution/ElectrocutionSystem.cs | 52 +++++--------------
3 files changed, 38 insertions(+), 46 deletions(-)
diff --git a/Content.Server/Electrocution/Components/ElectrifiedComponent.cs b/Content.Server/Electrocution/Components/ElectrifiedComponent.cs
index 2f3def6e06..65a539eb08 100644
--- a/Content.Server/Electrocution/Components/ElectrifiedComponent.cs
+++ b/Content.Server/Electrocution/Components/ElectrifiedComponent.cs
@@ -41,8 +41,32 @@ public sealed partial class ElectrifiedComponent : Component
[DataField("lowVoltageNode")]
public string? LowVoltageNode;
+ ///
+ /// Damage multiplier for HV electrocution
+ ///
+ [DataField]
+ public float HighVoltageDamageMultiplier = 3f;
+
+ ///
+ /// Shock time multiplier for HV electrocution
+ ///
+ [DataField]
+ public float HighVoltageTimeMultiplier = 1.5f;
+
+ ///
+ /// Damage multiplier for MV electrocution
+ ///
+ [DataField]
+ public float MediumVoltageDamageMultiplier = 2f;
+
+ ///
+ /// Shock time multiplier for MV electrocution
+ ///
+ [DataField]
+ public float MediumVoltageTimeMultiplier = 1.25f;
+
[DataField("shockDamage")]
- public int ShockDamage = 20;
+ public float ShockDamage = 7.5f;
///
/// Shock time, in seconds.
diff --git a/Content.Server/Electrocution/Components/ElectrocutionComponent.cs b/Content.Server/Electrocution/Components/ElectrocutionComponent.cs
index 9da78c9134..7badc85257 100644
--- a/Content.Server/Electrocution/Components/ElectrocutionComponent.cs
+++ b/Content.Server/Electrocution/Components/ElectrocutionComponent.cs
@@ -15,10 +15,4 @@ public sealed partial class ElectrocutionComponent : Component
[DataField("timeLeft")]
public float TimeLeft;
-
- [DataField("accumDamage")]
- public float AccumulatedDamage;
-
- [DataField("baseDamage")]
- public float BaseDamage = 20f;
}
diff --git a/Content.Server/Electrocution/ElectrocutionSystem.cs b/Content.Server/Electrocution/ElectrocutionSystem.cs
index d967013f65..1163306282 100644
--- a/Content.Server/Electrocution/ElectrocutionSystem.cs
+++ b/Content.Server/Electrocution/ElectrocutionSystem.cs
@@ -17,7 +17,6 @@ using Content.Shared.Interaction;
using Content.Shared.Inventory;
using Content.Shared.Jittering;
using Content.Shared.Maps;
-using Content.Shared.Mobs;
using Content.Shared.Popups;
using Content.Shared.Speech.EntitySystems;
using Content.Shared.StatusEffect;
@@ -98,29 +97,18 @@ public sealed class ElectrocutionSystem : SharedElectrocutionSystem
private void UpdateElectrocutions(float frameTime)
{
var query = EntityQueryEnumerator();
- while (query.MoveNext(out var uid, out var electrocution, out var consumer))
+ while (query.MoveNext(out var uid, out var electrocution, out _))
{
var timePassed = Math.Min(frameTime, electrocution.TimeLeft);
electrocution.TimeLeft -= timePassed;
- electrocution.AccumulatedDamage += electrocution.BaseDamage * (consumer.ReceivedPower / consumer.DrawRate) * timePassed;
if (!MathHelper.CloseTo(electrocution.TimeLeft, 0))
continue;
- if (EntityManager.EntityExists(electrocution.Electrocuting))
- {
- // TODO: damage should be scaled by shock damage multiplier
- // TODO: better paralyze/jitter timing
- var damage = new DamageSpecifier(_prototypeManager.Index(DamageType), (int) electrocution.AccumulatedDamage);
+ // We tried damage scaling based on power in the past and it really wasn't good.
+ // Various scaling types didn't fix tiders and HV grilles instantly critting players.
- var actual = _damageable.TryChangeDamage(electrocution.Electrocuting, damage, origin: electrocution.Source);
- if (actual != null)
- {
- _adminLogger.Add(LogType.Electrocution,
- $"{ToPrettyString(electrocution.Electrocuting):entity} received {actual.GetTotal():damage} powered electrocution damage from {ToPrettyString(electrocution.Source):source}");
- }
- }
QueueDel(uid);
}
}
@@ -198,7 +186,7 @@ public sealed class ElectrocutionSystem : SharedElectrocutionSystem
if (!_meleeWeapon.GetDamage(args.Used, args.User).Any())
return;
- DoCommonElectrocution(args.User, uid, component.UnarmedHitShock, component.UnarmedHitStun, false, 1);
+ DoCommonElectrocution(args.User, uid, component.UnarmedHitShock, component.UnarmedHitStun, false);
}
private void OnElectrifiedInteractUsing(EntityUid uid, ElectrifiedComponent electrified, InteractUsingEvent args)
@@ -213,16 +201,6 @@ public sealed class ElectrocutionSystem : SharedElectrocutionSystem
TryDoElectrifiedAct(uid, args.User, siemens, electrified);
}
- private float CalculateElectrifiedDamageScale(float power)
- {
- // A logarithm allows a curve of damage that grows quickly, but slows down dramatically past a value. This keeps the damage to a reasonable range.
- const float DamageShift = 1.67f; // Shifts the curve for an overall higher or lower damage baseline
- const float CeilingCoefficent = 1.35f; // Adjusts the approach to maximum damage, higher = Higher top damage
- const float LogGrowth = 0.00001f; // Adjusts the growth speed of the curve
-
- return DamageShift + MathF.Log(power * LogGrowth) * CeilingCoefficent;
- }
-
public bool TryDoElectrifiedAct(EntityUid uid, EntityUid targetUid,
float siemens = 1,
ElectrifiedComponent? electrified = null,
@@ -263,19 +241,15 @@ public sealed class ElectrocutionSystem : SharedElectrocutionSystem
}
var node = PoweredNode(uid, electrified, nodeContainer);
- if (node?.NodeGroup is not IBasePowerNet powerNet)
+ if (node?.NodeGroup is not IBasePowerNet)
return false;
- var net = powerNet.NetworkNode;
- var supp = net.LastCombinedMaxSupply;
-
- if (supp <= 0f)
- return false;
-
- // Initial damage scales off of the available supply on the principle that the victim has shorted the entire powernet through their body.
- var damageScale = CalculateElectrifiedDamageScale(supp);
- if (damageScale <= 0f)
- return false;
+ var (damageScalar, timeScalar) = node.NodeGroupID switch
+ {
+ NodeGroupID.HVPower => (electrified.HighVoltageDamageMultiplier, electrified.HighVoltageTimeMultiplier),
+ NodeGroupID.MVPower => (electrified.MediumVoltageDamageMultiplier, electrified.MediumVoltageTimeMultiplier),
+ _ => (1f, 1f)
+ };
{
var lastRet = true;
@@ -286,8 +260,8 @@ public sealed class ElectrocutionSystem : SharedElectrocutionSystem
entity,
uid,
node,
- (int) MathF.Ceiling(electrified.ShockDamage * damageScale * MathF.Pow(RecursiveDamageMultiplier, depth)),
- TimeSpan.FromSeconds(electrified.ShockTime * MathF.Min(1f + MathF.Log2(1f + damageScale), 3f) * MathF.Pow(RecursiveTimeMultiplier, depth)),
+ (int) (electrified.ShockDamage * MathF.Pow(RecursiveDamageMultiplier, depth) * damageScalar),
+ TimeSpan.FromSeconds(electrified.ShockTime * MathF.Pow(RecursiveTimeMultiplier, depth) * timeScalar),
true,
electrified.SiemensCoefficient);
}
From daff65582dba2d305d1d2a4fd6a7f7b82250efbd Mon Sep 17 00:00:00 2001
From: PJBot
Date: Thu, 28 Mar 2024 20:45:52 +0000
Subject: [PATCH 03/22] Automatic changelog update
---
Resources/Changelog/Changelog.yml | 18 ++++++++----------
1 file changed, 8 insertions(+), 10 deletions(-)
diff --git a/Resources/Changelog/Changelog.yml b/Resources/Changelog/Changelog.yml
index db48f993d5..33bb70f3c8 100644
--- a/Resources/Changelog/Changelog.yml
+++ b/Resources/Changelog/Changelog.yml
@@ -1,14 +1,4 @@
Entries:
-- author: mirrorcult
- changes:
- - message: Destruction & impact sounds have been reworked in general, you should
- expect better sounds/more variance/actually playing sounds when applicable
- type: Add
- - message: Melee hit sounds being cut off when an entity is destroyed has been fixed
- type: Fix
- id: 5746
- time: '2024-01-19T15:33:08.0000000+00:00'
- url: https://api.github.com/repos/space-wizards/space-station-14/pulls/24282
- author: SpeltIncorrectyl
changes:
- message: Emagging the artifact crusher now stops it from being opened while it
@@ -3798,3 +3788,11 @@
id: 6245
time: '2024-03-28T06:36:43.0000000+00:00'
url: https://github.com/space-wizards/space-station-14/pull/25768
+- author: EmoGarbage404
+ changes:
+ - message: Electrocution damage is no longer based on the power supplied and is
+ instead based on the wire voltage (LV, MV, or HV).
+ type: Tweak
+ id: 6246
+ time: '2024-03-28T20:44:44.0000000+00:00'
+ url: https://github.com/space-wizards/space-station-14/pull/26455
From 66e8e05c462a61b808c5e194798176936890ef4e Mon Sep 17 00:00:00 2001
From: "Mr. 27" <45323883+Dutch-VanDerLinde@users.noreply.github.com>
Date: Thu, 28 Mar 2024 21:06:23 -0400
Subject: [PATCH 04/22] more melee weapon sound fixes (#26520)
g
---
.../Entities/Objects/Specific/Janitorial/janitor.yml | 4 ++++
.../Entities/Objects/Weapons/Melee/weapon_toolbox.yml | 2 ++
2 files changed, 6 insertions(+)
diff --git a/Resources/Prototypes/Entities/Objects/Specific/Janitorial/janitor.yml b/Resources/Prototypes/Entities/Objects/Specific/Janitorial/janitor.yml
index 2ddb21b9e6..db08481dc5 100644
--- a/Resources/Prototypes/Entities/Objects/Specific/Janitorial/janitor.yml
+++ b/Resources/Prototypes/Entities/Objects/Specific/Janitorial/janitor.yml
@@ -11,6 +11,8 @@
damage:
types:
Blunt: 10
+ soundHit:
+ collection: MetalThud
- type: Spillable
solution: absorbed
- type: Wieldable
@@ -49,6 +51,8 @@
damage:
types:
Blunt: 10
+ soundHit:
+ collection: MetalThud
- type: Spillable
solution: absorbed
- type: Wieldable
diff --git a/Resources/Prototypes/Entities/Objects/Weapons/Melee/weapon_toolbox.yml b/Resources/Prototypes/Entities/Objects/Weapons/Melee/weapon_toolbox.yml
index 366aabd2f2..240a17a0a4 100644
--- a/Resources/Prototypes/Entities/Objects/Weapons/Melee/weapon_toolbox.yml
+++ b/Resources/Prototypes/Entities/Objects/Weapons/Melee/weapon_toolbox.yml
@@ -17,3 +17,5 @@
damage:
types:
Blunt: 20
+ soundHit:
+ path: "/Audio/Weapons/smash.ogg"
From 8537e279e18b59080d5b86795fac71906534085f Mon Sep 17 00:00:00 2001
From: Valent <108285874+ValentFingerov@users.noreply.github.com>
Date: Fri, 29 Mar 2024 06:07:38 +0500
Subject: [PATCH 05/22] Foldable ushanka (#26519)
* UpdateUshankaPrototype
* UpdateUshankaPrototype
---
.../Entities/Clothing/Head/hats.yml | 19 ++++++++++++++++---
1 file changed, 16 insertions(+), 3 deletions(-)
diff --git a/Resources/Prototypes/Entities/Clothing/Head/hats.yml b/Resources/Prototypes/Entities/Clothing/Head/hats.yml
index dc57302619..fba77d885f 100644
--- a/Resources/Prototypes/Entities/Clothing/Head/hats.yml
+++ b/Resources/Prototypes/Entities/Clothing/Head/hats.yml
@@ -476,17 +476,30 @@
- WhitelistChameleon
- type: entity
- parent: ClothingHeadBase
+ parent: [ClothingHeadBase, BaseFoldable]
id: ClothingHeadHatUshanka
name: ushanka
description: "Perfect for winter in Siberia, da?"
components:
- - type: Sprite
- sprite: Clothing/Head/Hats/ushanka.rsi
- type: Clothing
sprite: Clothing/Head/Hats/ushanka.rsi
+ - type: Appearance
- type: AddAccentClothing
accent: RussianAccent
+ - type: Foldable
+ canFoldInsideContainer: true
+ - type: FoldableClothing
+ foldedEquippedPrefix: up
+ foldedHeldPrefix: up
+ - type: Sprite
+ sprite: Clothing/Head/Hats/ushanka.rsi
+ layers:
+ - state: icon
+ map: [ "unfoldedLayer" ]
+ - state: icon-up
+ map: ["foldedLayer"]
+ visible: false
+
- type: entity
parent: ClothingHeadBase
From cfc0ecbf80ab497a01443aea354f4ac3dc205b58 Mon Sep 17 00:00:00 2001
From: Jake Huxell
Date: Thu, 28 Mar 2024 22:30:23 -0400
Subject: [PATCH 06/22] [BugFix] Persist Job Restrictions When New User Late
Joins (#26498)
* make sure to keep late join button disabled if requirements not met
* more succinct representation of condition
---
Content.Client/LateJoin/LateJoinGui.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Content.Client/LateJoin/LateJoinGui.cs b/Content.Client/LateJoin/LateJoinGui.cs
index d6a028d6c4..ba9351d674 100644
--- a/Content.Client/LateJoin/LateJoinGui.cs
+++ b/Content.Client/LateJoin/LateJoinGui.cs
@@ -309,7 +309,7 @@ namespace Content.Client.LateJoin
if (matchingJobButton.Amount != updatedJobValue)
{
matchingJobButton.RefreshLabel(updatedJobValue);
- matchingJobButton.Disabled = matchingJobButton.Amount == 0;
+ matchingJobButton.Disabled |= matchingJobButton.Amount == 0;
}
}
}
From 653d53db13ce07542ccc1e84701b776948b8e4ba Mon Sep 17 00:00:00 2001
From: PJBot
Date: Fri, 29 Mar 2024 02:31:29 +0000
Subject: [PATCH 07/22] Automatic changelog update
---
Resources/Changelog/Changelog.yml | 15 +++++++--------
1 file changed, 7 insertions(+), 8 deletions(-)
diff --git a/Resources/Changelog/Changelog.yml b/Resources/Changelog/Changelog.yml
index 33bb70f3c8..7a832f5412 100644
--- a/Resources/Changelog/Changelog.yml
+++ b/Resources/Changelog/Changelog.yml
@@ -1,12 +1,4 @@
Entries:
-- author: SpeltIncorrectyl
- changes:
- - message: Emagging the artifact crusher now stops it from being opened while it
- is crushing.
- type: Add
- id: 5747
- time: '2024-01-19T15:35:02.0000000+00:00'
- url: https://api.github.com/repos/space-wizards/space-station-14/pulls/23957
- author: EmoGarbage404
changes:
- message: You can now sort lathe recipes by category.
@@ -3796,3 +3788,10 @@
id: 6246
time: '2024-03-28T20:44:44.0000000+00:00'
url: https://github.com/space-wizards/space-station-14/pull/26455
+- author: Jake Huxell
+ changes:
+ - message: Late join menu correctly respects client role restrictions.
+ type: Fix
+ id: 6247
+ time: '2024-03-29T02:30:23.0000000+00:00'
+ url: https://github.com/space-wizards/space-station-14/pull/26498
From 69a15ada7f83cd7ad6010c7d6ac80ab7fc6b1e23 Mon Sep 17 00:00:00 2001
From: lzk <124214523+lzk228@users.noreply.github.com>
Date: Fri, 29 Mar 2024 06:03:34 +0100
Subject: [PATCH 08/22] Send what seleted for secret to admin chat (#26500)
* Send what seleted for secret to admin chat
* add line
* Add localization support
---
Content.Server/GameTicking/Rules/SecretRuleSystem.cs | 3 +++
Resources/Locale/en-US/game-ticking/game-rules/rule-secret.ftl | 2 ++
2 files changed, 5 insertions(+)
create mode 100644 Resources/Locale/en-US/game-ticking/game-rules/rule-secret.ftl
diff --git a/Content.Server/GameTicking/Rules/SecretRuleSystem.cs b/Content.Server/GameTicking/Rules/SecretRuleSystem.cs
index 6a00eb7d10..fa5f17b4f3 100644
--- a/Content.Server/GameTicking/Rules/SecretRuleSystem.cs
+++ b/Content.Server/GameTicking/Rules/SecretRuleSystem.cs
@@ -1,4 +1,5 @@
using Content.Server.Administration.Logs;
+using Content.Server.Chat.Managers;
using Content.Server.GameTicking.Presets;
using Content.Server.GameTicking.Rules.Components;
using Content.Shared.Random;
@@ -17,6 +18,7 @@ public sealed class SecretRuleSystem : GameRuleSystem
[Dependency] private readonly IRobustRandom _random = default!;
[Dependency] private readonly IConfigurationManager _configurationManager = default!;
[Dependency] private readonly IAdminLogManager _adminLogger = default!;
+ [Dependency] private readonly IChatManager _chatManager = default!;
protected override void Added(EntityUid uid, SecretRuleComponent component, GameRuleComponent gameRule, GameRuleAddedEvent args)
{
@@ -42,6 +44,7 @@ public sealed class SecretRuleSystem : GameRuleSystem
var preset = _prototypeManager.Index(presetString).Pick(_random);
Log.Info($"Selected {preset} for secret.");
_adminLogger.Add(LogType.EventStarted, $"Selected {preset} for secret.");
+ _chatManager.SendAdminAnnouncement(Loc.GetString("rule-secret-selected-preset", ("preset", preset)));
var rules = _prototypeManager.Index(preset).Rules;
foreach (var rule in rules)
diff --git a/Resources/Locale/en-US/game-ticking/game-rules/rule-secret.ftl b/Resources/Locale/en-US/game-ticking/game-rules/rule-secret.ftl
new file mode 100644
index 0000000000..c38220cca1
--- /dev/null
+++ b/Resources/Locale/en-US/game-ticking/game-rules/rule-secret.ftl
@@ -0,0 +1,2 @@
+# Sent to admin chat
+rule-secret-selected-preset = Selected {$preset} for secret.
From cdfa7c3c7031ac01dd6a1479b6df7abc9e435190 Mon Sep 17 00:00:00 2001
From: PJBot
Date: Fri, 29 Mar 2024 05:04:40 +0000
Subject: [PATCH 09/22] Automatic changelog update
---
Resources/Changelog/Admin.yml | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/Resources/Changelog/Admin.yml b/Resources/Changelog/Admin.yml
index 48cbebdb29..b4b7f699fe 100644
--- a/Resources/Changelog/Admin.yml
+++ b/Resources/Changelog/Admin.yml
@@ -129,5 +129,12 @@ Entries:
id: 17
time: '2024-03-24T15:39:54.0000000+00:00'
url: https://github.com/space-wizards/space-station-14/pull/26263
+- author: lzk228
+ changes:
+ - message: Selected preset for secret is now sent to admin chat.
+ type: Tweak
+ id: 18
+ time: '2024-03-29T05:03:34.0000000+00:00'
+ url: https://github.com/space-wizards/space-station-14/pull/26500
Name: Admin
Order: 1
From 59e46aab93ca38f8d57fcad4e3a2c893737d9ad4 Mon Sep 17 00:00:00 2001
From: Jake Huxell
Date: Fri, 29 Mar 2024 01:28:16 -0400
Subject: [PATCH 10/22] Reduced Warning Count By 130 For Full Rebuilds (#26518)
* remove deprecated entity coordinate extension functions. Reduces warning count by approximately 50
* final toCoords Removed
* Remove all unused variables and dead code paths
* remove always true variable, should be a cvar or something instead
* remove superfluous variables from tests
---
Content.Client/Alerts/ClientAlertsSystem.cs | 2 -
.../Clothing/ClientClothingSystem.cs | 2 +-
Content.Client/Doors/DoorSystem.cs | 2 -
.../IconSmoothing/IconSmoothSystem.cs | 2 -
Content.Client/Items/Systems/ItemSystem.cs | 2 +-
Content.Client/NPC/PathfindingSystem.cs | 1 -
.../Shuttles/UI/BaseShuttleControl.xaml.cs | 1 -
Content.IntegrationTests/PoolManager.cs | 5 -
.../Tests/Fluids/PuddleTest.cs | 2 +-
.../Tests/Power/PowerTest.cs | 167 ++++++++++--------
.../Tests/PrototypeSaveTest.cs | 4 +-
.../Commands/PersistenceSaveCommand.cs | 6 -
.../Commands/VariantizeCommand.cs | 2 -
.../Anomaly/Effects/EntityAnomalySystem.cs | 2 -
.../Atmos/EntitySystems/AirFilterSystem.cs | 3 -
.../Atmos/EntitySystems/GasTankSystem.cs | 4 -
.../EntitySystems/GasVolumePumpSystem.cs | 1 -
.../Unary/EntitySystems/GasCanisterSystem.cs | 3 -
Content.Server/Body/Systems/BodySystem.cs | 4 -
.../Body/Systems/InternalsSystem.cs | 2 -
Content.Server/Cargo/Systems/CargoSystem.cs | 1 -
Content.Server/Cargo/Systems/PricingSystem.cs | 2 -
.../EntitySystems/SolutionContainerSystem.cs | 3 -
.../EntitySystems/ReagentDispenserSystem.cs | 2 -
.../Decals/Commands/EditDecalCommand.cs | 2 -
.../Decals/Commands/RemoveDecalCommand.cs | 3 -
.../Unit/EntitySystems/DisposableSystem.cs | 3 -
.../ExplosionSystem.Processing.cs | 11 --
.../EyeProtection/EyeProtectionSystem.cs | 3 -
.../Gateway/Systems/GatewayGeneratorSystem.cs | 8 -
.../Instruments/InstrumentComponent.cs | 1 -
.../Interaction/InteractionSystem.cs | 2 -
Content.Server/Mech/Systems/MechSystem.cs | 3 -
.../Medical/SuitSensors/SuitSensorSystem.cs | 2 -
.../Ninja/Systems/StunProviderSystem.cs | 4 -
.../EntitySystems/SliceableFoodSystem.cs | 2 -
.../Systems/NinjaConditionsSystem.cs | 2 -
.../ParticleAcceleratorSystem.cs | 2 -
.../Polymorph/Systems/PolymorphSystem.cs | 1 -
.../EntitySystems/ExtensionCableSystem.cs | 3 -
.../Generator/PortableGeneratorSystem.cs | 2 -
Content.Server/RatKing/RatKingSystem.cs | 2 -
Content.Server/Roles/RemoveRoleCommand.cs | 2 -
.../Sandbox/Commands/ColorNetworkCommand.cs | 1 -
.../Shuttles/Systems/ArrivalsSystem.cs | 5 -
.../Shuttles/Systems/ThrusterSystem.cs | 2 -
.../Silicons/Laws/SiliconLawSystem.cs | 2 -
.../EntitySystems/RadiationCollectorSystem.cs | 1 -
Content.Server/Spreader/SpreaderSystem.cs | 1 -
.../Station/Systems/StationJobsSystem.cs | 1 -
.../Station/Systems/StationSystem.cs | 1 -
.../StationEvents/Events/NinjaSpawnRule.cs | 3 -
.../SurveillanceCameraSpeakerSystem.cs | 5 -
.../Temperature/Systems/TemperatureSystem.cs | 2 -
.../Weapons/Ranged/Systems/GunSystem.cs | 2 -
.../Systems/ArtifactGasTriggerSystem.cs | 2 -
.../Systems/ArtifactHeatTriggerSystem.cs | 2 -
.../Systems/ArtifactPressureTriggerSystem.cs | 2 -
Content.Server/Zombies/ZombieSystem.cs | 3 -
.../Climbing/Systems/ClimbSystem.cs | 1 -
.../Construction/SharedFlatpackSystem.cs | 3 +-
.../EntityCoordinatesExtensions.cs | 13 --
Content.Shared/Maps/TurfSystem.cs | 1 -
Content.Shared/RCD/Systems/RCDSystem.cs | 5 +-
.../EntitySystems/SharedDoorRemoteSystem.cs | 3 -
.../Shuttles/Components/IFFComponent.cs | 5 -
.../Systems/SharedShuttleSystem.IFF.cs | 5 -
.../Shuttles/Systems/SharedShuttleSystem.cs | 1 -
.../Systems/SharedGunSystem.Interactions.cs | 2 +-
69 files changed, 101 insertions(+), 256 deletions(-)
diff --git a/Content.Client/Alerts/ClientAlertsSystem.cs b/Content.Client/Alerts/ClientAlertsSystem.cs
index 9c4ebb9cd2..223bf7876a 100644
--- a/Content.Client/Alerts/ClientAlertsSystem.cs
+++ b/Content.Client/Alerts/ClientAlertsSystem.cs
@@ -4,7 +4,6 @@ using JetBrains.Annotations;
using Robust.Client.Player;
using Robust.Shared.Player;
using Robust.Shared.Prototypes;
-using Robust.Shared.Timing;
namespace Content.Client.Alerts;
@@ -13,7 +12,6 @@ public sealed class ClientAlertsSystem : AlertsSystem
{
public AlertOrderPrototype? AlertOrder { get; set; }
- [Dependency] private readonly IGameTiming _timing = default!;
[Dependency] private readonly IPlayerManager _playerManager = default!;
[Dependency] private readonly IPrototypeManager _prototypeManager = default!;
diff --git a/Content.Client/Clothing/ClientClothingSystem.cs b/Content.Client/Clothing/ClientClothingSystem.cs
index fbe9d5ec5b..7e78ac7d70 100644
--- a/Content.Client/Clothing/ClientClothingSystem.cs
+++ b/Content.Client/Clothing/ClientClothingSystem.cs
@@ -133,7 +133,7 @@ public sealed class ClientClothingSystem : ClothingSystem
else if (TryComp(uid, out SpriteComponent? sprite))
rsi = sprite.BaseRSI;
- if (rsi == null || rsi.Path == null)
+ if (rsi == null)
return false;
var correctedSlot = slot;
diff --git a/Content.Client/Doors/DoorSystem.cs b/Content.Client/Doors/DoorSystem.cs
index 473ae97059..bc52730b0e 100644
--- a/Content.Client/Doors/DoorSystem.cs
+++ b/Content.Client/Doors/DoorSystem.cs
@@ -4,14 +4,12 @@ using Robust.Client.Animations;
using Robust.Client.GameObjects;
using Robust.Client.ResourceManagement;
using Robust.Shared.Serialization.TypeSerializers.Implementations;
-using Robust.Shared.Timing;
namespace Content.Client.Doors;
public sealed class DoorSystem : SharedDoorSystem
{
[Dependency] private readonly AnimationPlayerSystem _animationSystem = default!;
- [Dependency] private readonly IGameTiming _gameTiming = default!;
[Dependency] private readonly IResourceCache _resourceCache = default!;
public override void Initialize()
diff --git a/Content.Client/IconSmoothing/IconSmoothSystem.cs b/Content.Client/IconSmoothing/IconSmoothSystem.cs
index 20a80c42a3..4b02560846 100644
--- a/Content.Client/IconSmoothing/IconSmoothSystem.cs
+++ b/Content.Client/IconSmoothing/IconSmoothSystem.cs
@@ -16,8 +16,6 @@ namespace Content.Client.IconSmoothing
[UsedImplicitly]
public sealed partial class IconSmoothSystem : EntitySystem
{
- [Dependency] private readonly IMapManager _mapManager = default!;
-
private readonly Queue _dirtyEntities = new();
private readonly Queue _anchorChangedEntities = new();
diff --git a/Content.Client/Items/Systems/ItemSystem.cs b/Content.Client/Items/Systems/ItemSystem.cs
index e406ba2b55..5e60d06d0c 100644
--- a/Content.Client/Items/Systems/ItemSystem.cs
+++ b/Content.Client/Items/Systems/ItemSystem.cs
@@ -93,7 +93,7 @@ public sealed class ItemSystem : SharedItemSystem
else if (TryComp(uid, out SpriteComponent? sprite))
rsi = sprite.BaseRSI;
- if (rsi == null || rsi.Path == null)
+ if (rsi == null)
return false;
var state = (item.HeldPrefix == null)
diff --git a/Content.Client/NPC/PathfindingSystem.cs b/Content.Client/NPC/PathfindingSystem.cs
index 7bf3df1f0b..709601a57b 100644
--- a/Content.Client/NPC/PathfindingSystem.cs
+++ b/Content.Client/NPC/PathfindingSystem.cs
@@ -289,7 +289,6 @@ namespace Content.Client.NPC
var invGridMatrix = gridXform.InvWorldMatrix;
DebugPathPoly? nearest = null;
- var nearestDistance = float.MaxValue;
foreach (var poly in tile)
{
diff --git a/Content.Client/Shuttles/UI/BaseShuttleControl.xaml.cs b/Content.Client/Shuttles/UI/BaseShuttleControl.xaml.cs
index fed2a9f171..284c668190 100644
--- a/Content.Client/Shuttles/UI/BaseShuttleControl.xaml.cs
+++ b/Content.Client/Shuttles/UI/BaseShuttleControl.xaml.cs
@@ -88,7 +88,6 @@ public partial class BaseShuttleControl : MapGridControl
var cornerDistance = MathF.Sqrt(WorldRange * WorldRange + WorldRange * WorldRange);
var origin = ScalePosition(-new Vector2(Offset.X, -Offset.Y));
- var distOffset = -24f;
for (var radius = minDistance; radius <= maxDistance; radius *= EquatorialMultiplier)
{
diff --git a/Content.IntegrationTests/PoolManager.cs b/Content.IntegrationTests/PoolManager.cs
index 6046ed65e4..b544fe2854 100644
--- a/Content.IntegrationTests/PoolManager.cs
+++ b/Content.IntegrationTests/PoolManager.cs
@@ -306,11 +306,6 @@ public static partial class PoolManager
Pairs[fallback!] = true;
}
- if (fallback == null && _pairId > 8)
- {
- var x = 2;
- }
-
return fallback;
}
}
diff --git a/Content.IntegrationTests/Tests/Fluids/PuddleTest.cs b/Content.IntegrationTests/Tests/Fluids/PuddleTest.cs
index 3213bba51f..611af67380 100644
--- a/Content.IntegrationTests/Tests/Fluids/PuddleTest.cs
+++ b/Content.IntegrationTests/Tests/Fluids/PuddleTest.cs
@@ -67,7 +67,7 @@ namespace Content.IntegrationTests.Tests.Fluids
await server.WaitAssertion(() =>
{
- var coordinates = grid.ToCoordinates();
+ var coordinates = grid.Owner.ToCoordinates();
var solution = new Solution("Water", FixedPoint2.New(20));
Assert.That(spillSystem.TrySpillAt(coordinates, solution, out _), Is.False);
diff --git a/Content.IntegrationTests/Tests/Power/PowerTest.cs b/Content.IntegrationTests/Tests/Power/PowerTest.cs
index d4e2cde9b0..a6af3e6a65 100644
--- a/Content.IntegrationTests/Tests/Power/PowerTest.cs
+++ b/Content.IntegrationTests/Tests/Power/PowerTest.cs
@@ -176,16 +176,18 @@ namespace Content.IntegrationTests.Tests.Power
var map = mapManager.CreateMap();
var grid = mapManager.CreateGrid(map);
+ var gridOwner = grid.Owner;
+
// Power only works when anchored
for (var i = 0; i < 3; i++)
{
grid.SetTile(new Vector2i(0, i), new Tile(1));
- entityManager.SpawnEntity("CableHV", grid.ToCoordinates(0, i));
+ entityManager.SpawnEntity("CableHV", gridOwner.ToCoordinates(0, i));
}
- var generatorEnt = entityManager.SpawnEntity("GeneratorDummy", grid.ToCoordinates());
- var consumerEnt1 = entityManager.SpawnEntity("ConsumerDummy", grid.ToCoordinates(0, 1));
- var consumerEnt2 = entityManager.SpawnEntity("ConsumerDummy", grid.ToCoordinates(0, 2));
+ var generatorEnt = entityManager.SpawnEntity("GeneratorDummy", gridOwner.ToCoordinates());
+ var consumerEnt1 = entityManager.SpawnEntity("ConsumerDummy", gridOwner.ToCoordinates(0, 1));
+ var consumerEnt2 = entityManager.SpawnEntity("ConsumerDummy", gridOwner.ToCoordinates(0, 2));
supplier = entityManager.GetComponent(generatorEnt);
consumer1 = entityManager.GetComponent(consumerEnt1);
@@ -237,16 +239,18 @@ namespace Content.IntegrationTests.Tests.Power
var map = mapManager.CreateMap();
var grid = mapManager.CreateGrid(map);
+ var gridOwner = grid.Owner;
+
// Power only works when anchored
for (var i = 0; i < 3; i++)
{
grid.SetTile(new Vector2i(0, i), new Tile(1));
- entityManager.SpawnEntity("CableHV", grid.ToCoordinates(0, i));
+ entityManager.SpawnEntity("CableHV", gridOwner.ToCoordinates(0, i));
}
- var generatorEnt = entityManager.SpawnEntity("GeneratorDummy", grid.ToCoordinates());
- var consumerEnt1 = entityManager.SpawnEntity("ConsumerDummy", grid.ToCoordinates(0, 1));
- var consumerEnt2 = entityManager.SpawnEntity("ConsumerDummy", grid.ToCoordinates(0, 2));
+ var generatorEnt = entityManager.SpawnEntity("GeneratorDummy", gridOwner.ToCoordinates());
+ var consumerEnt1 = entityManager.SpawnEntity("ConsumerDummy", gridOwner.ToCoordinates(0, 1));
+ var consumerEnt2 = entityManager.SpawnEntity("ConsumerDummy", gridOwner.ToCoordinates(0, 2));
supplier = entityManager.GetComponent(generatorEnt);
consumer1 = entityManager.GetComponent(consumerEnt1);
@@ -292,16 +296,17 @@ namespace Content.IntegrationTests.Tests.Power
{
var map = mapManager.CreateMap();
var grid = mapManager.CreateGrid(map);
+ var gridOwner = grid.Owner;
// Power only works when anchored
for (var i = 0; i < 3; i++)
{
grid.SetTile(new Vector2i(0, i), new Tile(1));
- entityManager.SpawnEntity("CableHV", grid.ToCoordinates(0, i));
+ entityManager.SpawnEntity("CableHV", gridOwner.ToCoordinates(0, i));
}
- var generatorEnt = entityManager.SpawnEntity("GeneratorDummy", grid.ToCoordinates());
- var consumerEnt = entityManager.SpawnEntity("ConsumerDummy", grid.ToCoordinates(0, 2));
+ var generatorEnt = entityManager.SpawnEntity("GeneratorDummy", gridOwner.ToCoordinates());
+ var consumerEnt = entityManager.SpawnEntity("ConsumerDummy", gridOwner.ToCoordinates(0, 2));
supplier = entityManager.GetComponent(generatorEnt);
consumer = entityManager.GetComponent(consumerEnt);
@@ -383,16 +388,17 @@ namespace Content.IntegrationTests.Tests.Power
{
var map = mapManager.CreateMap();
var grid = mapManager.CreateGrid(map);
+ var gridOwner = grid.Owner;
// Power only works when anchored
for (var i = 0; i < 3; i++)
{
grid.SetTile(new Vector2i(0, i), new Tile(1));
- entityManager.SpawnEntity("CableHV", grid.ToCoordinates(0, i));
+ entityManager.SpawnEntity("CableHV", gridOwner.ToCoordinates(0, i));
}
- var generatorEnt = entityManager.SpawnEntity("DischargingBatteryDummy", grid.ToCoordinates());
- var consumerEnt = entityManager.SpawnEntity("ConsumerDummy", grid.ToCoordinates(0, 2));
+ var generatorEnt = entityManager.SpawnEntity("DischargingBatteryDummy", gridOwner.ToCoordinates());
+ var consumerEnt = entityManager.SpawnEntity("ConsumerDummy", gridOwner.ToCoordinates(0, 2));
netBattery = entityManager.GetComponent(generatorEnt);
battery = entityManager.GetComponent(generatorEnt);
@@ -486,17 +492,18 @@ namespace Content.IntegrationTests.Tests.Power
{
var map = mapManager.CreateMap();
var grid = mapManager.CreateGrid(map);
+ var gridOwner = grid.Owner;
// Power only works when anchored
for (var i = 0; i < 3; i++)
{
grid.SetTile(new Vector2i(0, i), new Tile(1));
- entityManager.SpawnEntity("CableHV", grid.ToCoordinates(0, i));
+ entityManager.SpawnEntity("CableHV", gridOwner.ToCoordinates(0, i));
}
- var generatorEnt = entityManager.SpawnEntity("GeneratorDummy", grid.ToCoordinates());
- var consumerEnt = entityManager.SpawnEntity("ConsumerDummy", grid.ToCoordinates(0, 1));
- var batteryEnt = entityManager.SpawnEntity("DischargingBatteryDummy", grid.ToCoordinates(0, 2));
+ var generatorEnt = entityManager.SpawnEntity("GeneratorDummy", gridOwner.ToCoordinates());
+ var consumerEnt = entityManager.SpawnEntity("ConsumerDummy", gridOwner.ToCoordinates(0, 1));
+ var batteryEnt = entityManager.SpawnEntity("DischargingBatteryDummy", gridOwner.ToCoordinates(0, 2));
netBattery = entityManager.GetComponent(batteryEnt);
battery = entityManager.GetComponent(batteryEnt);
supplier = entityManager.GetComponent(generatorEnt);
@@ -577,16 +584,17 @@ namespace Content.IntegrationTests.Tests.Power
{
var map = mapManager.CreateMap();
var grid = mapManager.CreateGrid(map);
+ var gridOwner = grid.Owner;
// Power only works when anchored
for (var i = 0; i < 3; i++)
{
grid.SetTile(new Vector2i(0, i), new Tile(1));
- entityManager.SpawnEntity("CableHV", grid.ToCoordinates(0, i));
+ entityManager.SpawnEntity("CableHV", gridOwner.ToCoordinates(0, i));
}
- var generatorEnt = entityManager.SpawnEntity("GeneratorDummy", grid.ToCoordinates());
- var batteryEnt = entityManager.SpawnEntity("ChargingBatteryDummy", grid.ToCoordinates(0, 2));
+ var generatorEnt = entityManager.SpawnEntity("GeneratorDummy", gridOwner.ToCoordinates());
+ var batteryEnt = entityManager.SpawnEntity("ChargingBatteryDummy", gridOwner.ToCoordinates(0, 2));
supplier = entityManager.GetComponent(generatorEnt);
var netBattery = entityManager.GetComponent(batteryEnt);
@@ -635,20 +643,21 @@ namespace Content.IntegrationTests.Tests.Power
{
var map = mapManager.CreateMap();
var grid = mapManager.CreateGrid(map);
+ var gridOwner = grid.Owner;
// Power only works when anchored
for (var i = 0; i < 4; i++)
{
grid.SetTile(new Vector2i(0, i), new Tile(1));
- entityManager.SpawnEntity("CableHV", grid.ToCoordinates(0, i));
+ entityManager.SpawnEntity("CableHV", gridOwner.ToCoordinates(0, i));
}
- var terminal = entityManager.SpawnEntity("CableTerminal", grid.ToCoordinates(0, 1));
+ var terminal = entityManager.SpawnEntity("CableTerminal", gridOwner.ToCoordinates(0, 1));
entityManager.GetComponent(terminal).LocalRotation = Angle.FromDegrees(180);
- var batteryEnt = entityManager.SpawnEntity("FullBatteryDummy", grid.ToCoordinates(0, 2));
- var supplyEnt = entityManager.SpawnEntity("GeneratorDummy", grid.ToCoordinates(0, 0));
- var consumerEnt = entityManager.SpawnEntity("ConsumerDummy", grid.ToCoordinates(0, 3));
+ var batteryEnt = entityManager.SpawnEntity("FullBatteryDummy", gridOwner.ToCoordinates(0, 2));
+ var supplyEnt = entityManager.SpawnEntity("GeneratorDummy", gridOwner.ToCoordinates(0, 0));
+ var consumerEnt = entityManager.SpawnEntity("ConsumerDummy", gridOwner.ToCoordinates(0, 3));
consumer = entityManager.GetComponent(consumerEnt);
supplier = entityManager.GetComponent(supplyEnt);
@@ -712,20 +721,21 @@ namespace Content.IntegrationTests.Tests.Power
{
var map = mapManager.CreateMap();
var grid = mapManager.CreateGrid(map);
+ var gridOwner = grid.Owner;
// Power only works when anchored
for (var i = 0; i < 4; i++)
{
grid.SetTile(new Vector2i(0, i), new Tile(1));
- entityManager.SpawnEntity("CableHV", grid.ToCoordinates(0, i));
+ entityManager.SpawnEntity("CableHV", gridOwner.ToCoordinates(0, i));
}
- var terminal = entityManager.SpawnEntity("CableTerminal", grid.ToCoordinates(0, 1));
+ var terminal = entityManager.SpawnEntity("CableTerminal", gridOwner.ToCoordinates(0, 1));
entityManager.GetComponent(terminal).LocalRotation = Angle.FromDegrees(180);
- var batteryEnt = entityManager.SpawnEntity("FullBatteryDummy", grid.ToCoordinates(0, 2));
- var supplyEnt = entityManager.SpawnEntity("GeneratorDummy", grid.ToCoordinates(0, 0));
- var consumerEnt = entityManager.SpawnEntity("ConsumerDummy", grid.ToCoordinates(0, 3));
+ var batteryEnt = entityManager.SpawnEntity("FullBatteryDummy", gridOwner.ToCoordinates(0, 2));
+ var supplyEnt = entityManager.SpawnEntity("GeneratorDummy", gridOwner.ToCoordinates(0, 0));
+ var consumerEnt = entityManager.SpawnEntity("ConsumerDummy", gridOwner.ToCoordinates(0, 3));
consumer = entityManager.GetComponent(consumerEnt);
supplier = entityManager.GetComponent(supplyEnt);
@@ -787,6 +797,7 @@ namespace Content.IntegrationTests.Tests.Power
{
var map = mapManager.CreateMap();
var grid = mapManager.CreateGrid(map);
+ var gridOwner = grid.Owner;
// Map layout here is
// C - consumer
@@ -800,18 +811,18 @@ namespace Content.IntegrationTests.Tests.Power
for (var i = 0; i < 5; i++)
{
grid.SetTile(new Vector2i(0, i), new Tile(1));
- entityManager.SpawnEntity("CableHV", grid.ToCoordinates(0, i));
+ entityManager.SpawnEntity("CableHV", gridOwner.ToCoordinates(0, i));
}
- entityManager.SpawnEntity("CableTerminal", grid.ToCoordinates(0, 2));
- var terminal = entityManager.SpawnEntity("CableTerminal", grid.ToCoordinates(0, 2));
+ entityManager.SpawnEntity("CableTerminal", gridOwner.ToCoordinates(0, 2));
+ var terminal = entityManager.SpawnEntity("CableTerminal", gridOwner.ToCoordinates(0, 2));
entityManager.GetComponent(terminal).LocalRotation = Angle.FromDegrees(180);
- var batteryEnt1 = entityManager.SpawnEntity("FullBatteryDummy", grid.ToCoordinates(0, 1));
- var batteryEnt2 = entityManager.SpawnEntity("FullBatteryDummy", grid.ToCoordinates(0, 3));
- var supplyEnt = entityManager.SpawnEntity("GeneratorDummy", grid.ToCoordinates(0, 2));
- var consumerEnt1 = entityManager.SpawnEntity("ConsumerDummy", grid.ToCoordinates(0, 0));
- var consumerEnt2 = entityManager.SpawnEntity("ConsumerDummy", grid.ToCoordinates(0, 4));
+ var batteryEnt1 = entityManager.SpawnEntity("FullBatteryDummy", gridOwner.ToCoordinates(0, 1));
+ var batteryEnt2 = entityManager.SpawnEntity("FullBatteryDummy", gridOwner.ToCoordinates(0, 3));
+ var supplyEnt = entityManager.SpawnEntity("GeneratorDummy", gridOwner.ToCoordinates(0, 2));
+ var consumerEnt1 = entityManager.SpawnEntity("ConsumerDummy", gridOwner.ToCoordinates(0, 0));
+ var consumerEnt2 = entityManager.SpawnEntity("ConsumerDummy", gridOwner.ToCoordinates(0, 4));
consumer1 = entityManager.GetComponent(consumerEnt1);
consumer2 = entityManager.GetComponent(consumerEnt2);
@@ -888,6 +899,7 @@ namespace Content.IntegrationTests.Tests.Power
{
var map = mapManager.CreateMap();
var grid = mapManager.CreateGrid(map);
+ var gridOwner = grid.Owner;
// Layout is two generators, two batteries, and one load. As to why two: because previously this test
// would fail ONLY if there were more than two batteries present, because each of them tries to supply
@@ -900,16 +912,16 @@ namespace Content.IntegrationTests.Tests.Power
for (var i = -2; i <= 2; i++)
{
grid.SetTile(new Vector2i(0, i), new Tile(1));
- entityManager.SpawnEntity("CableHV", grid.ToCoordinates(0, i));
+ entityManager.SpawnEntity("CableHV", gridOwner.ToCoordinates(0, i));
}
- var batteryEnt1 = entityManager.SpawnEntity("FullBatteryDummy", grid.ToCoordinates(0, 2));
- var batteryEnt2 = entityManager.SpawnEntity("FullBatteryDummy", grid.ToCoordinates(0, -2));
+ var batteryEnt1 = entityManager.SpawnEntity("FullBatteryDummy", gridOwner.ToCoordinates(0, 2));
+ var batteryEnt2 = entityManager.SpawnEntity("FullBatteryDummy", gridOwner.ToCoordinates(0, -2));
- var supplyEnt1 = entityManager.SpawnEntity("GeneratorDummy", grid.ToCoordinates(0, 1));
- var supplyEnt2 = entityManager.SpawnEntity("GeneratorDummy", grid.ToCoordinates(0, -1));
+ var supplyEnt1 = entityManager.SpawnEntity("GeneratorDummy", gridOwner.ToCoordinates(0, 1));
+ var supplyEnt2 = entityManager.SpawnEntity("GeneratorDummy", gridOwner.ToCoordinates(0, -1));
- var consumerEnt = entityManager.SpawnEntity("ConsumerDummy", grid.ToCoordinates(0, 0));
+ var consumerEnt = entityManager.SpawnEntity("ConsumerDummy", gridOwner.ToCoordinates(0, 0));
consumer = entityManager.GetComponent(consumerEnt);
supplier1 = entityManager.GetComponent(supplyEnt1);
@@ -981,6 +993,7 @@ namespace Content.IntegrationTests.Tests.Power
{
var map = mapManager.CreateMap();
var grid = mapManager.CreateGrid(map);
+ var gridOwner = grid.Owner;
// Map layout here is
// C - consumer
@@ -994,18 +1007,18 @@ namespace Content.IntegrationTests.Tests.Power
for (var i = 0; i < 5; i++)
{
grid.SetTile(new Vector2i(0, i), new Tile(1));
- entityManager.SpawnEntity("CableHV", grid.ToCoordinates(0, i));
+ entityManager.SpawnEntity("CableHV", gridOwner.ToCoordinates(0, i));
}
- entityManager.SpawnEntity("CableTerminal", grid.ToCoordinates(0, 2));
- var terminal = entityManager.SpawnEntity("CableTerminal", grid.ToCoordinates(0, 2));
+ entityManager.SpawnEntity("CableTerminal", gridOwner.ToCoordinates(0, 2));
+ var terminal = entityManager.SpawnEntity("CableTerminal", gridOwner.ToCoordinates(0, 2));
entityManager.GetComponent(terminal).LocalRotation = Angle.FromDegrees(180);
- var batteryEnt1 = entityManager.SpawnEntity("FullBatteryDummy", grid.ToCoordinates(0, 1));
- var batteryEnt2 = entityManager.SpawnEntity("FullBatteryDummy", grid.ToCoordinates(0, 3));
- var supplyEnt = entityManager.SpawnEntity("GeneratorDummy", grid.ToCoordinates(0, 2));
- var consumerEnt1 = entityManager.SpawnEntity("ConsumerDummy", grid.ToCoordinates(0, 0));
- var consumerEnt2 = entityManager.SpawnEntity("ConsumerDummy", grid.ToCoordinates(0, 4));
+ var batteryEnt1 = entityManager.SpawnEntity("FullBatteryDummy", gridOwner.ToCoordinates(0, 1));
+ var batteryEnt2 = entityManager.SpawnEntity("FullBatteryDummy", gridOwner.ToCoordinates(0, 3));
+ var supplyEnt = entityManager.SpawnEntity("GeneratorDummy", gridOwner.ToCoordinates(0, 2));
+ var consumerEnt1 = entityManager.SpawnEntity("ConsumerDummy", gridOwner.ToCoordinates(0, 0));
+ var consumerEnt2 = entityManager.SpawnEntity("ConsumerDummy", gridOwner.ToCoordinates(0, 4));
consumer1 = entityManager.GetComponent(consumerEnt1);
consumer2 = entityManager.GetComponent(consumerEnt2);
@@ -1068,20 +1081,21 @@ namespace Content.IntegrationTests.Tests.Power
{
var map = mapManager.CreateMap();
var grid = mapManager.CreateGrid(map);
+ var gridOwner = grid.Owner;
// Power only works when anchored
for (var i = 0; i < 4; i++)
{
grid.SetTile(new Vector2i(0, i), new Tile(1));
- entityManager.SpawnEntity("CableHV", grid.ToCoordinates(0, i));
+ entityManager.SpawnEntity("CableHV", gridOwner.ToCoordinates(0, i));
}
- var terminal = entityManager.SpawnEntity("CableTerminal", grid.ToCoordinates(0, 1));
+ var terminal = entityManager.SpawnEntity("CableTerminal", gridOwner.ToCoordinates(0, 1));
entityManager.GetComponent(terminal).LocalRotation = Angle.FromDegrees(180);
- var batteryEnt = entityManager.SpawnEntity("FullBatteryDummy", grid.ToCoordinates(0, 2));
- var supplyEnt = entityManager.SpawnEntity("GeneratorDummy", grid.ToCoordinates(0, 0));
- var consumerEnt = entityManager.SpawnEntity("ConsumerDummy", grid.ToCoordinates(0, 3));
+ var batteryEnt = entityManager.SpawnEntity("FullBatteryDummy", gridOwner.ToCoordinates(0, 2));
+ var supplyEnt = entityManager.SpawnEntity("GeneratorDummy", gridOwner.ToCoordinates(0, 0));
+ var consumerEnt = entityManager.SpawnEntity("ConsumerDummy", gridOwner.ToCoordinates(0, 3));
consumer = entityManager.GetComponent(consumerEnt);
supplier = entityManager.GetComponent(supplyEnt);
@@ -1153,6 +1167,7 @@ namespace Content.IntegrationTests.Tests.Power
{
var map = mapManager.CreateMap();
var grid = mapManager.CreateGrid(map);
+ var gridOwner = grid.Owner;
// Power only works when anchored
for (var i = 0; i < 4; i++)
@@ -1160,15 +1175,15 @@ namespace Content.IntegrationTests.Tests.Power
grid.SetTile(new Vector2i(0, i), new Tile(1));
}
- var leftEnt = entityManager.SpawnEntity("CableHV", grid.ToCoordinates(0, 0));
- entityManager.SpawnEntity("CableHV", grid.ToCoordinates(0, 1));
- entityManager.SpawnEntity("CableHV", grid.ToCoordinates(0, 2));
- var rightEnt = entityManager.SpawnEntity("CableHV", grid.ToCoordinates(0, 3));
+ var leftEnt = entityManager.SpawnEntity("CableHV", gridOwner.ToCoordinates(0, 0));
+ entityManager.SpawnEntity("CableHV", gridOwner.ToCoordinates(0, 1));
+ entityManager.SpawnEntity("CableHV", gridOwner.ToCoordinates(0, 2));
+ var rightEnt = entityManager.SpawnEntity("CableHV", gridOwner.ToCoordinates(0, 3));
- var terminal = entityManager.SpawnEntity("CableTerminal", grid.ToCoordinates(0, 1));
+ var terminal = entityManager.SpawnEntity("CableTerminal", gridOwner.ToCoordinates(0, 1));
entityManager.GetComponent(terminal).LocalRotation = Angle.FromDegrees(180);
- var battery = entityManager.SpawnEntity("FullBatteryDummy", grid.ToCoordinates(0, 2));
+ var battery = entityManager.SpawnEntity("FullBatteryDummy", gridOwner.ToCoordinates(0, 2));
var batteryNodeContainer = entityManager.GetComponent(battery);
if (nodeContainer.TryGetNode(entityManager.GetComponent(leftEnt),
@@ -1216,6 +1231,7 @@ namespace Content.IntegrationTests.Tests.Power
{
var map = mapManager.CreateMap();
var grid = mapManager.CreateGrid(map);
+ var gridOwner = grid.Owner;
// Power only works when anchored
for (var i = 0; i < 3; i++)
@@ -1223,14 +1239,14 @@ namespace Content.IntegrationTests.Tests.Power
grid.SetTile(new Vector2i(0, i), new Tile(1));
}
- entityManager.SpawnEntity("CableHV", grid.ToCoordinates(0, 0));
- entityManager.SpawnEntity("CableHV", grid.ToCoordinates(0, 1));
- entityManager.SpawnEntity("CableMV", grid.ToCoordinates(0, 1));
- entityManager.SpawnEntity("CableMV", grid.ToCoordinates(0, 2));
+ entityManager.SpawnEntity("CableHV", gridOwner.ToCoordinates(0, 0));
+ entityManager.SpawnEntity("CableHV", gridOwner.ToCoordinates(0, 1));
+ entityManager.SpawnEntity("CableMV", gridOwner.ToCoordinates(0, 1));
+ entityManager.SpawnEntity("CableMV", gridOwner.ToCoordinates(0, 2));
- var generatorEnt = entityManager.SpawnEntity("GeneratorDummy", grid.ToCoordinates(0, 0));
- var substationEnt = entityManager.SpawnEntity("SubstationDummy", grid.ToCoordinates(0, 1));
- var apcEnt = entityManager.SpawnEntity("ApcDummy", grid.ToCoordinates(0, 2));
+ var generatorEnt = entityManager.SpawnEntity("GeneratorDummy", gridOwner.ToCoordinates(0, 0));
+ var substationEnt = entityManager.SpawnEntity("SubstationDummy", gridOwner.ToCoordinates(0, 1));
+ var apcEnt = entityManager.SpawnEntity("ApcDummy", gridOwner.ToCoordinates(0, 2));
var generatorSupplier = entityManager.GetComponent(generatorEnt);
substationNetBattery = entityManager.GetComponent(substationEnt);
@@ -1273,6 +1289,7 @@ namespace Content.IntegrationTests.Tests.Power
{
var map = mapManager.CreateMap();
var grid = mapManager.CreateGrid(map);
+ var gridOwner = grid.Owner;
const int range = 5;
@@ -1282,15 +1299,15 @@ namespace Content.IntegrationTests.Tests.Power
grid.SetTile(new Vector2i(0, i), new Tile(1));
}
- var apcEnt = entityManager.SpawnEntity("ApcDummy", grid.ToCoordinates(0, 0));
- var apcExtensionEnt = entityManager.SpawnEntity("CableApcExtension", grid.ToCoordinates(0, 0));
+ var apcEnt = entityManager.SpawnEntity("ApcDummy", gridOwner.ToCoordinates(0, 0));
+ var apcExtensionEnt = entityManager.SpawnEntity("CableApcExtension", gridOwner.ToCoordinates(0, 0));
// Create a powered receiver in range (range is 0 indexed)
- var powerReceiverEnt = entityManager.SpawnEntity("ApcPowerReceiverDummy", grid.ToCoordinates(0, range - 1));
+ var powerReceiverEnt = entityManager.SpawnEntity("ApcPowerReceiverDummy", gridOwner.ToCoordinates(0, range - 1));
receiver = entityManager.GetComponent(powerReceiverEnt);
// Create an unpowered receiver outside range
- var unpoweredReceiverEnt = entityManager.SpawnEntity("ApcPowerReceiverDummy", grid.ToCoordinates(0, range));
+ var unpoweredReceiverEnt = entityManager.SpawnEntity("ApcPowerReceiverDummy", gridOwner.ToCoordinates(0, range));
unpoweredReceiver = entityManager.GetComponent(unpoweredReceiverEnt);
var battery = entityManager.GetComponent(apcEnt);
diff --git a/Content.IntegrationTests/Tests/PrototypeSaveTest.cs b/Content.IntegrationTests/Tests/PrototypeSaveTest.cs
index 6096c497ef..e4a9c1a840 100644
--- a/Content.IntegrationTests/Tests/PrototypeSaveTest.cs
+++ b/Content.IntegrationTests/Tests/PrototypeSaveTest.cs
@@ -59,7 +59,7 @@ public sealed class PrototypeSaveTest
var tileDefinition = tileDefinitionManager["FloorSteel"]; // Wires n such disable ambiance while under the floor
var tile = new Tile(tileDefinition.TileId);
- var coordinates = grid.ToCoordinates();
+ var coordinates = grid.Owner.ToCoordinates();
grid.SetTile(coordinates, tile);
});
@@ -94,7 +94,7 @@ public sealed class PrototypeSaveTest
await server.WaitAssertion(() =>
{
Assert.That(!mapManager.IsMapInitialized(mapId));
- var testLocation = grid.ToCoordinates();
+ var testLocation = grid.Owner.ToCoordinates();
Assert.Multiple(() =>
{
diff --git a/Content.Server/Administration/Commands/PersistenceSaveCommand.cs b/Content.Server/Administration/Commands/PersistenceSaveCommand.cs
index 2684e85d5f..7ef1932c56 100644
--- a/Content.Server/Administration/Commands/PersistenceSaveCommand.cs
+++ b/Content.Server/Administration/Commands/PersistenceSaveCommand.cs
@@ -1,11 +1,6 @@
-using Content.Server.GameTicking;
-using Content.Server.Ghost.Components;
-using Content.Server.Players;
using Content.Shared.Administration;
using Content.Shared.CCVar;
-using Content.Shared.Ghost;
using Robust.Server.GameObjects;
-using Robust.Server.Player;
using Robust.Shared.Configuration;
using Robust.Shared.Console;
using Robust.Shared.Map;
@@ -17,7 +12,6 @@ namespace Content.Server.Administration.Commands;
public sealed class PersistenceSave : IConsoleCommand
{
[Dependency] private readonly IConfigurationManager _config = default!;
- [Dependency] private readonly IEntityManager _entities = default!;
[Dependency] private readonly IEntitySystemManager _system = default!;
[Dependency] private readonly IMapManager _map = default!;
diff --git a/Content.Server/Administration/Commands/VariantizeCommand.cs b/Content.Server/Administration/Commands/VariantizeCommand.cs
index 7aabd76335..3f9b7efd07 100644
--- a/Content.Server/Administration/Commands/VariantizeCommand.cs
+++ b/Content.Server/Administration/Commands/VariantizeCommand.cs
@@ -3,7 +3,6 @@ using Content.Shared.Maps;
using Robust.Shared.Console;
using Robust.Shared.Map;
using Robust.Shared.Map.Components;
-using Robust.Shared.Random;
namespace Content.Server.Administration.Commands;
@@ -11,7 +10,6 @@ namespace Content.Server.Administration.Commands;
public sealed class VariantizeCommand : IConsoleCommand
{
[Dependency] private readonly IEntityManager _entManager = default!;
- [Dependency] private readonly IRobustRandom _random = default!;
[Dependency] private readonly ITileDefinitionManager _tileDefManager = default!;
public string Command => "variantize";
diff --git a/Content.Server/Anomaly/Effects/EntityAnomalySystem.cs b/Content.Server/Anomaly/Effects/EntityAnomalySystem.cs
index 7c397d6888..90a655fbba 100644
--- a/Content.Server/Anomaly/Effects/EntityAnomalySystem.cs
+++ b/Content.Server/Anomaly/Effects/EntityAnomalySystem.cs
@@ -2,7 +2,6 @@ using Content.Shared.Anomaly;
using Content.Shared.Anomaly.Components;
using Content.Shared.Anomaly.Effects;
using Content.Shared.Anomaly.Effects.Components;
-using Robust.Shared.Map;
using Robust.Shared.Map.Components;
using Robust.Shared.Physics.Components;
using Robust.Shared.Random;
@@ -12,7 +11,6 @@ namespace Content.Server.Anomaly.Effects;
public sealed class EntityAnomalySystem : SharedEntityAnomalySystem
{
[Dependency] private readonly SharedAnomalySystem _anomaly = default!;
- [Dependency] private readonly IMapManager _map = default!;
[Dependency] private readonly IRobustRandom _random = default!;
[Dependency] private readonly SharedMapSystem _mapSystem = default!;
diff --git a/Content.Server/Atmos/EntitySystems/AirFilterSystem.cs b/Content.Server/Atmos/EntitySystems/AirFilterSystem.cs
index 416045fc5e..d947e60b6d 100644
--- a/Content.Server/Atmos/EntitySystems/AirFilterSystem.cs
+++ b/Content.Server/Atmos/EntitySystems/AirFilterSystem.cs
@@ -1,8 +1,6 @@
-using Content.Server.Atmos;
using Content.Server.Atmos.Components;
using Content.Server.Atmos.Piping.Components;
using Content.Shared.Atmos;
-using Robust.Shared.GameObjects;
using Robust.Shared.Map;
using System.Diagnostics.CodeAnalysis;
@@ -15,7 +13,6 @@ public sealed class AirFilterSystem : EntitySystem
{
[Dependency] private readonly AtmosphereSystem _atmosphere = default!;
[Dependency] private readonly IMapManager _map = default!;
- [Dependency] private readonly SharedTransformSystem _transform = default!;
public override void Initialize()
{
diff --git a/Content.Server/Atmos/EntitySystems/GasTankSystem.cs b/Content.Server/Atmos/EntitySystems/GasTankSystem.cs
index dfe8447340..aed00432e1 100644
--- a/Content.Server/Atmos/EntitySystems/GasTankSystem.cs
+++ b/Content.Server/Atmos/EntitySystems/GasTankSystem.cs
@@ -1,4 +1,3 @@
-using System.Numerics;
using Content.Server.Atmos.Components;
using Content.Server.Body.Components;
using Content.Server.Body.Systems;
@@ -17,8 +16,6 @@ using Robust.Server.GameObjects;
using Robust.Shared.Audio;
using Robust.Shared.Audio.Systems;
using Robust.Shared.Containers;
-using Robust.Shared.Physics.Systems;
-using Robust.Shared.Player;
using Robust.Shared.Random;
namespace Content.Server.Atmos.EntitySystems
@@ -33,7 +30,6 @@ namespace Content.Server.Atmos.EntitySystems
[Dependency] private readonly SharedContainerSystem _containers = default!;
[Dependency] private readonly SharedActionsSystem _actions = default!;
[Dependency] private readonly UserInterfaceSystem _ui = default!;
- [Dependency] private readonly SharedPhysicsSystem _physics = default!;
[Dependency] private readonly IRobustRandom _random = default!;
[Dependency] private readonly ThrowingSystem _throwing = default!;
diff --git a/Content.Server/Atmos/Piping/Binary/EntitySystems/GasVolumePumpSystem.cs b/Content.Server/Atmos/Piping/Binary/EntitySystems/GasVolumePumpSystem.cs
index 10b9cccc09..8e478bd2b5 100644
--- a/Content.Server/Atmos/Piping/Binary/EntitySystems/GasVolumePumpSystem.cs
+++ b/Content.Server/Atmos/Piping/Binary/EntitySystems/GasVolumePumpSystem.cs
@@ -27,7 +27,6 @@ namespace Content.Server.Atmos.Piping.Binary.EntitySystems
public sealed class GasVolumePumpSystem : EntitySystem
{
[Dependency] private readonly IAdminLogManager _adminLogger = default!;
- [Dependency] private readonly TransformSystem _transformSystem = default!;
[Dependency] private readonly AtmosphereSystem _atmosphereSystem = default!;
[Dependency] private readonly UserInterfaceSystem _userInterfaceSystem = default!;
[Dependency] private readonly SharedAmbientSoundSystem _ambientSoundSystem = default!;
diff --git a/Content.Server/Atmos/Piping/Unary/EntitySystems/GasCanisterSystem.cs b/Content.Server/Atmos/Piping/Unary/EntitySystems/GasCanisterSystem.cs
index ad647fad1b..170586339d 100644
--- a/Content.Server/Atmos/Piping/Unary/EntitySystems/GasCanisterSystem.cs
+++ b/Content.Server/Atmos/Piping/Unary/EntitySystems/GasCanisterSystem.cs
@@ -13,7 +13,6 @@ using Content.Shared.Atmos;
using Content.Shared.Atmos.Piping.Binary.Components;
using Content.Shared.Containers.ItemSlots;
using Content.Shared.Database;
-using Content.Shared.Hands.EntitySystems;
using Content.Shared.Interaction;
using Content.Shared.Lock;
using Robust.Server.GameObjects;
@@ -29,8 +28,6 @@ public sealed class GasCanisterSystem : EntitySystem
[Dependency] private readonly IAdminLogManager _adminLogger = default!;
[Dependency] private readonly SharedAppearanceSystem _appearance = default!;
[Dependency] private readonly SharedAudioSystem _audio = default!;
- [Dependency] private readonly SharedContainerSystem _container = default!;
- [Dependency] private readonly SharedHandsSystem _hands = default!;
[Dependency] private readonly PopupSystem _popup = default!;
[Dependency] private readonly UserInterfaceSystem _ui = default!;
[Dependency] private readonly NodeContainerSystem _nodeContainer = default!;
diff --git a/Content.Server/Body/Systems/BodySystem.cs b/Content.Server/Body/Systems/BodySystem.cs
index 92074d06ff..e10158cf35 100644
--- a/Content.Server/Body/Systems/BodySystem.cs
+++ b/Content.Server/Body/Systems/BodySystem.cs
@@ -10,8 +10,6 @@ using Content.Shared.Mobs.Systems;
using Content.Shared.Movement.Events;
using Content.Shared.Movement.Systems;
using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
-using Robust.Shared.Random;
using Robust.Shared.Timing;
using System.Numerics;
@@ -23,9 +21,7 @@ public sealed class BodySystem : SharedBodySystem
[Dependency] private readonly IGameTiming _gameTiming = default!;
[Dependency] private readonly HumanoidAppearanceSystem _humanoidSystem = default!;
[Dependency] private readonly MobStateSystem _mobState = default!;
- [Dependency] private readonly SharedAudioSystem _audio = default!;
[Dependency] private readonly SharedMindSystem _mindSystem = default!;
- [Dependency] private readonly IRobustRandom _random = default!;
public override void Initialize()
{
diff --git a/Content.Server/Body/Systems/InternalsSystem.cs b/Content.Server/Body/Systems/InternalsSystem.cs
index 999aa40077..972967fb15 100644
--- a/Content.Server/Body/Systems/InternalsSystem.cs
+++ b/Content.Server/Body/Systems/InternalsSystem.cs
@@ -1,7 +1,6 @@
using Content.Server.Atmos.Components;
using Content.Server.Atmos.EntitySystems;
using Content.Server.Body.Components;
-using Content.Server.Hands.Systems;
using Content.Server.Popups;
using Content.Shared.Alert;
using Content.Shared.Atmos;
@@ -11,7 +10,6 @@ using Content.Shared.Internals;
using Content.Shared.Inventory;
using Content.Shared.Verbs;
using Robust.Shared.Containers;
-using Robust.Shared.Prototypes;
using Robust.Shared.Utility;
namespace Content.Server.Body.Systems;
diff --git a/Content.Server/Cargo/Systems/CargoSystem.cs b/Content.Server/Cargo/Systems/CargoSystem.cs
index d4be68efc8..badad9e57b 100644
--- a/Content.Server/Cargo/Systems/CargoSystem.cs
+++ b/Content.Server/Cargo/Systems/CargoSystem.cs
@@ -37,7 +37,6 @@ public sealed partial class CargoSystem : SharedCargoSystem
[Dependency] private readonly PricingSystem _pricing = default!;
[Dependency] private readonly SharedAppearanceSystem _appearance = default!;
[Dependency] private readonly SharedAudioSystem _audio = default!;
- [Dependency] private readonly SharedTransformSystem _xformSystem = default!;
[Dependency] private readonly ShuttleConsoleSystem _console = default!;
[Dependency] private readonly StackSystem _stack = default!;
[Dependency] private readonly StationSystem _station = default!;
diff --git a/Content.Server/Cargo/Systems/PricingSystem.cs b/Content.Server/Cargo/Systems/PricingSystem.cs
index 6fb36c9608..9e1970d63c 100644
--- a/Content.Server/Cargo/Systems/PricingSystem.cs
+++ b/Content.Server/Cargo/Systems/PricingSystem.cs
@@ -12,7 +12,6 @@ using Content.Shared.Mobs.Systems;
using Content.Shared.Stacks;
using Robust.Shared.Console;
using Robust.Shared.Containers;
-using Robust.Shared.Map;
using Robust.Shared.Map.Components;
using Robust.Shared.Prototypes;
using Robust.Shared.Utility;
@@ -27,7 +26,6 @@ public sealed class PricingSystem : EntitySystem
{
[Dependency] private readonly IComponentFactory _factory = default!;
[Dependency] private readonly IConsoleHost _consoleHost = default!;
- [Dependency] private readonly IMapManager _mapManager = default!;
[Dependency] private readonly IPrototypeManager _prototypeManager = default!;
[Dependency] private readonly BodySystem _bodySystem = default!;
[Dependency] private readonly MobStateSystem _mobStateSystem = default!;
diff --git a/Content.Server/Chemistry/Containers/EntitySystems/SolutionContainerSystem.cs b/Content.Server/Chemistry/Containers/EntitySystems/SolutionContainerSystem.cs
index 7926121c2b..468212f5ea 100644
--- a/Content.Server/Chemistry/Containers/EntitySystems/SolutionContainerSystem.cs
+++ b/Content.Server/Chemistry/Containers/EntitySystems/SolutionContainerSystem.cs
@@ -4,7 +4,6 @@ using Content.Shared.Chemistry.EntitySystems;
using Content.Shared.FixedPoint;
using Robust.Shared.Containers;
using Robust.Shared.Map;
-using Robust.Shared.Network;
using Robust.Shared.Utility;
using System.Numerics;
@@ -12,8 +11,6 @@ namespace Content.Server.Chemistry.Containers.EntitySystems;
public sealed partial class SolutionContainerSystem : SharedSolutionContainerSystem
{
- [Dependency] private readonly INetManager _netManager = default!;
-
public override void Initialize()
{
base.Initialize();
diff --git a/Content.Server/Chemistry/EntitySystems/ReagentDispenserSystem.cs b/Content.Server/Chemistry/EntitySystems/ReagentDispenserSystem.cs
index b93498fe31..a8583e6bcb 100644
--- a/Content.Server/Chemistry/EntitySystems/ReagentDispenserSystem.cs
+++ b/Content.Server/Chemistry/EntitySystems/ReagentDispenserSystem.cs
@@ -1,4 +1,3 @@
-using Content.Server.Administration.Logs;
using Content.Server.Chemistry.Components;
using Content.Server.Chemistry.Containers.EntitySystems;
using Content.Server.Nutrition.EntitySystems;
@@ -30,7 +29,6 @@ namespace Content.Server.Chemistry.EntitySystems
[Dependency] private readonly ItemSlotsSystem _itemSlotsSystem = default!;
[Dependency] private readonly UserInterfaceSystem _userInterfaceSystem = default!;
[Dependency] private readonly IPrototypeManager _prototypeManager = default!;
- [Dependency] private readonly IAdminLogManager _adminLogger = default!;
[Dependency] private readonly OpenableSystem _openable = default!;
public override void Initialize()
diff --git a/Content.Server/Decals/Commands/EditDecalCommand.cs b/Content.Server/Decals/Commands/EditDecalCommand.cs
index 2344b0a367..812e131832 100644
--- a/Content.Server/Decals/Commands/EditDecalCommand.cs
+++ b/Content.Server/Decals/Commands/EditDecalCommand.cs
@@ -2,7 +2,6 @@ using System.Numerics;
using Content.Server.Administration;
using Content.Shared.Administration;
using Robust.Shared.Console;
-using Robust.Shared.Map;
using Robust.Shared.Map.Components;
namespace Content.Server.Decals;
@@ -11,7 +10,6 @@ namespace Content.Server.Decals;
public sealed class EditDecalCommand : IConsoleCommand
{
[Dependency] private readonly IEntityManager _entManager = default!;
- [Dependency] private readonly IMapManager _mapManager = default!;
public string Command => "editdecal";
public string Description => "Edits a decal.";
diff --git a/Content.Server/Decals/Commands/RemoveDecalCommand.cs b/Content.Server/Decals/Commands/RemoveDecalCommand.cs
index 3fc5c75e10..fc6af4d009 100644
--- a/Content.Server/Decals/Commands/RemoveDecalCommand.cs
+++ b/Content.Server/Decals/Commands/RemoveDecalCommand.cs
@@ -1,9 +1,7 @@
using Content.Server.Administration;
using Content.Shared.Administration;
using Robust.Shared.Console;
-using Robust.Shared.Map;
using Robust.Shared.Map.Components;
-using SQLitePCL;
namespace Content.Server.Decals.Commands
{
@@ -11,7 +9,6 @@ namespace Content.Server.Decals.Commands
public sealed class RemoveDecalCommand : IConsoleCommand
{
[Dependency] private readonly IEntityManager _entManager = default!;
- [Dependency] private readonly IMapManager _mapManager = default!;
public string Command => "rmdecal";
public string Description => "removes a decal";
diff --git a/Content.Server/Disposal/Unit/EntitySystems/DisposableSystem.cs b/Content.Server/Disposal/Unit/EntitySystems/DisposableSystem.cs
index eb3cda4db9..38e3923803 100644
--- a/Content.Server/Disposal/Unit/EntitySystems/DisposableSystem.cs
+++ b/Content.Server/Disposal/Unit/EntitySystems/DisposableSystem.cs
@@ -1,4 +1,3 @@
-using System.Linq;
using Content.Server.Atmos.EntitySystems;
using Content.Server.Disposal.Tube;
using Content.Server.Disposal.Tube.Components;
@@ -12,14 +11,12 @@ using Robust.Shared.Containers;
using Robust.Shared.Map.Components;
using Robust.Shared.Physics.Components;
using Robust.Shared.Physics.Systems;
-using Robust.Shared.Random;
namespace Content.Server.Disposal.Unit.EntitySystems
{
public sealed class DisposableSystem : EntitySystem
{
[Dependency] private readonly ThrowingSystem _throwing = default!;
- [Dependency] private readonly IRobustRandom _random = default!;
[Dependency] private readonly AtmosphereSystem _atmosphereSystem = default!;
[Dependency] private readonly DamageableSystem _damageable = default!;
[Dependency] private readonly DisposalUnitSystem _disposalUnitSystem = default!;
diff --git a/Content.Server/Explosion/EntitySystems/ExplosionSystem.Processing.cs b/Content.Server/Explosion/EntitySystems/ExplosionSystem.Processing.cs
index 85d705846e..60db6bdf5b 100644
--- a/Content.Server/Explosion/EntitySystems/ExplosionSystem.Processing.cs
+++ b/Content.Server/Explosion/EntitySystems/ExplosionSystem.Processing.cs
@@ -1,4 +1,3 @@
-using System.Linq;
using System.Numerics;
using Content.Shared.CCVar;
using Content.Shared.Damage;
@@ -17,7 +16,6 @@ using Robust.Shared.Random;
using Robust.Shared.Timing;
using Robust.Shared.Utility;
using TimedDespawnComponent = Robust.Shared.Spawners.TimedDespawnComponent;
-using Content.Server.Atmos.Components;
using Content.Server.Atmos.EntitySystems;
namespace Content.Server.Explosion.EntitySystems;
@@ -48,13 +46,6 @@ public sealed partial class ExplosionSystem
///
private Explosion? _activeExplosion;
- ///
- /// While processing an explosion, the "progress" is sent to clients, so that the explosion fireball effect
- /// syncs up with the damage. When the tile iteration increments, an update needs to be sent to clients.
- /// This integer keeps track of the last value sent to clients.
- ///
- private int _previousTileIteration;
-
///
/// This list is used when raising to avoid allocating a new list per event.
///
@@ -112,8 +103,6 @@ public sealed partial class ExplosionSystem
if (_activeExplosion == null)
continue;
- _previousTileIteration = 0;
-
// just a lil nap
if (SleepNodeSys)
{
diff --git a/Content.Server/Eye/Blinding/EyeProtection/EyeProtectionSystem.cs b/Content.Server/Eye/Blinding/EyeProtection/EyeProtectionSystem.cs
index 24ee2b7154..2d54c03b51 100644
--- a/Content.Server/Eye/Blinding/EyeProtection/EyeProtectionSystem.cs
+++ b/Content.Server/Eye/Blinding/EyeProtection/EyeProtectionSystem.cs
@@ -1,10 +1,8 @@
using Content.Shared.StatusEffect;
using Content.Shared.Inventory;
-using Content.Shared.Item;
using Content.Shared.Eye.Blinding.Components;
using Content.Shared.Eye.Blinding.Systems;
using Content.Shared.Tools.Components;
-using Content.Shared.Item.ItemToggle;
using Content.Shared.Item.ItemToggle.Components;
namespace Content.Server.Eye.Blinding.EyeProtection
@@ -13,7 +11,6 @@ namespace Content.Server.Eye.Blinding.EyeProtection
{
[Dependency] private readonly StatusEffectsSystem _statusEffectsSystem = default!;
[Dependency] private readonly BlindableSystem _blindingSystem = default!;
- [Dependency] private readonly SharedItemToggleSystem _itemToggle = default!;
public override void Initialize()
{
diff --git a/Content.Server/Gateway/Systems/GatewayGeneratorSystem.cs b/Content.Server/Gateway/Systems/GatewayGeneratorSystem.cs
index 7558f7afc0..c934fb66bf 100644
--- a/Content.Server/Gateway/Systems/GatewayGeneratorSystem.cs
+++ b/Content.Server/Gateway/Systems/GatewayGeneratorSystem.cs
@@ -1,23 +1,16 @@
using System.Linq;
-using System.Numerics;
using Content.Server.Gateway.Components;
using Content.Server.Parallax;
using Content.Server.Procedural;
-using Content.Server.Salvage;
using Content.Shared.CCVar;
using Content.Shared.Dataset;
using Content.Shared.Maps;
-using Content.Shared.Movement.Components;
using Content.Shared.Parallax.Biomes;
-using Content.Shared.Physics;
using Content.Shared.Procedural;
using Content.Shared.Salvage;
using Robust.Shared.Configuration;
using Robust.Shared.Map;
using Robust.Shared.Map.Components;
-using Robust.Shared.Physics.Collision.Shapes;
-using Robust.Shared.Physics.Components;
-using Robust.Shared.Physics.Systems;
using Robust.Shared.Prototypes;
using Robust.Shared.Random;
using Robust.Shared.Timing;
@@ -40,7 +33,6 @@ public sealed class GatewayGeneratorSystem : EntitySystem
[Dependency] private readonly DungeonSystem _dungeon = default!;
[Dependency] private readonly GatewaySystem _gateway = default!;
[Dependency] private readonly MetaDataSystem _metadata = default!;
- [Dependency] private readonly RestrictedRangeSystem _restricted = default!;
[Dependency] private readonly SharedMapSystem _maps = default!;
[Dependency] private readonly TileSystem _tile = default!;
diff --git a/Content.Server/Instruments/InstrumentComponent.cs b/Content.Server/Instruments/InstrumentComponent.cs
index 4302ab6791..1b7913386d 100644
--- a/Content.Server/Instruments/InstrumentComponent.cs
+++ b/Content.Server/Instruments/InstrumentComponent.cs
@@ -1,6 +1,5 @@
using Content.Server.UserInterface;
using Content.Shared.Instruments;
-using Robust.Server.GameObjects;
using Robust.Shared.Player;
namespace Content.Server.Instruments;
diff --git a/Content.Server/Interaction/InteractionSystem.cs b/Content.Server/Interaction/InteractionSystem.cs
index 6692886dae..203781bcda 100644
--- a/Content.Server/Interaction/InteractionSystem.cs
+++ b/Content.Server/Interaction/InteractionSystem.cs
@@ -1,4 +1,3 @@
-using Content.Shared.ActionBlocker;
using Content.Shared.Interaction;
using Content.Shared.Storage;
using JetBrains.Annotations;
@@ -14,7 +13,6 @@ namespace Content.Server.Interaction
[UsedImplicitly]
public sealed partial class InteractionSystem : SharedInteractionSystem
{
- [Dependency] private readonly ActionBlockerSystem _actionBlockerSystem = default!;
[Dependency] private readonly SharedContainerSystem _container = default!;
[Dependency] private readonly UserInterfaceSystem _uiSystem = default!;
diff --git a/Content.Server/Mech/Systems/MechSystem.cs b/Content.Server/Mech/Systems/MechSystem.cs
index 2f5f8bf433..78034e0fc3 100644
--- a/Content.Server/Mech/Systems/MechSystem.cs
+++ b/Content.Server/Mech/Systems/MechSystem.cs
@@ -20,7 +20,6 @@ using Content.Server.Body.Systems;
using Robust.Server.Containers;
using Robust.Server.GameObjects;
using Robust.Shared.Containers;
-using Robust.Shared.Map;
using Robust.Shared.Player;
namespace Content.Server.Mech.Systems;
@@ -33,8 +32,6 @@ public sealed partial class MechSystem : SharedMechSystem
[Dependency] private readonly BatterySystem _battery = default!;
[Dependency] private readonly ContainerSystem _container = default!;
[Dependency] private readonly DamageableSystem _damageable = default!;
- [Dependency] private readonly IMapManager _map = default!;
- [Dependency] private readonly MapSystem _mapSystem = default!;
[Dependency] private readonly SharedDoAfterSystem _doAfter = default!;
[Dependency] private readonly SharedPopupSystem _popup = default!;
[Dependency] private readonly UserInterfaceSystem _ui = default!;
diff --git a/Content.Server/Medical/SuitSensors/SuitSensorSystem.cs b/Content.Server/Medical/SuitSensors/SuitSensorSystem.cs
index b807b63e21..29e4ceebbe 100644
--- a/Content.Server/Medical/SuitSensors/SuitSensorSystem.cs
+++ b/Content.Server/Medical/SuitSensors/SuitSensorSystem.cs
@@ -9,7 +9,6 @@ using Content.Server.Popups;
using Content.Server.Station.Systems;
using Content.Shared.Damage;
using Content.Shared.DeviceNetwork;
-using Content.Shared.Emp;
using Content.Shared.Examine;
using Content.Shared.Inventory.Events;
using Content.Shared.Medical.SuitSensor;
@@ -27,7 +26,6 @@ public sealed class SuitSensorSystem : EntitySystem
{
[Dependency] private readonly IGameTiming _gameTiming = default!;
[Dependency] private readonly IRobustRandom _random = default!;
- [Dependency] private readonly CrewMonitoringServerSystem _monitoringServerSystem = default!;
[Dependency] private readonly DeviceNetworkSystem _deviceNetworkSystem = default!;
[Dependency] private readonly IdCardSystem _idCardSystem = default!;
[Dependency] private readonly MobStateSystem _mobStateSystem = default!;
diff --git a/Content.Server/Ninja/Systems/StunProviderSystem.cs b/Content.Server/Ninja/Systems/StunProviderSystem.cs
index 636037060a..970ca78e2c 100644
--- a/Content.Server/Ninja/Systems/StunProviderSystem.cs
+++ b/Content.Server/Ninja/Systems/StunProviderSystem.cs
@@ -1,14 +1,11 @@
using Content.Server.Ninja.Events;
using Content.Server.Power.EntitySystems;
using Content.Shared.Damage;
-using Content.Shared.Damage.Prototypes;
using Content.Shared.Interaction;
using Content.Shared.Ninja.Components;
using Content.Shared.Ninja.Systems;
using Content.Shared.Popups;
using Content.Shared.Stunnable;
-using Content.Shared.Whitelist;
-using Robust.Shared.Audio;
using Robust.Shared.Prototypes;
using Robust.Shared.Audio.Systems;
using Robust.Shared.Timing;
@@ -23,7 +20,6 @@ public sealed class StunProviderSystem : SharedStunProviderSystem
[Dependency] private readonly BatterySystem _battery = default!;
[Dependency] private readonly DamageableSystem _damageable = default!;
[Dependency] private readonly IGameTiming _timing = default!;
- [Dependency] private readonly IPrototypeManager _proto = default!;
[Dependency] private readonly SharedAudioSystem _audio = default!;
[Dependency] private readonly SharedNinjaGlovesSystem _gloves = default!;
[Dependency] private readonly SharedPopupSystem _popup = default!;
diff --git a/Content.Server/Nutrition/EntitySystems/SliceableFoodSystem.cs b/Content.Server/Nutrition/EntitySystems/SliceableFoodSystem.cs
index e966daf5e5..ea422afdf0 100644
--- a/Content.Server/Nutrition/EntitySystems/SliceableFoodSystem.cs
+++ b/Content.Server/Nutrition/EntitySystems/SliceableFoodSystem.cs
@@ -5,7 +5,6 @@ using Content.Shared.Nutrition.Components;
using Content.Shared.Chemistry.Components;
using Content.Shared.Examine;
using Content.Shared.FixedPoint;
-using Content.Shared.Hands.EntitySystems;
using Content.Shared.Interaction;
using Robust.Server.GameObjects;
using Robust.Shared.Audio;
@@ -19,7 +18,6 @@ namespace Content.Server.Nutrition.EntitySystems
[Dependency] private readonly SolutionContainerSystem _solutionContainerSystem = default!;
[Dependency] private readonly SharedAudioSystem _audio = default!;
[Dependency] private readonly SharedContainerSystem _containerSystem = default!;
- [Dependency] private readonly SharedHandsSystem _handsSystem = default!;
[Dependency] private readonly TransformSystem _xformSystem = default!;
public override void Initialize()
diff --git a/Content.Server/Objectives/Systems/NinjaConditionsSystem.cs b/Content.Server/Objectives/Systems/NinjaConditionsSystem.cs
index 2bd8538af1..888a365a5d 100644
--- a/Content.Server/Objectives/Systems/NinjaConditionsSystem.cs
+++ b/Content.Server/Objectives/Systems/NinjaConditionsSystem.cs
@@ -1,7 +1,6 @@
using Content.Server.Objectives.Components;
using Content.Server.Warps;
using Content.Shared.Objectives.Components;
-using Content.Shared.Mind;
using Content.Shared.Ninja.Components;
using Robust.Shared.Random;
using Content.Server.Roles;
@@ -16,7 +15,6 @@ public sealed class NinjaConditionsSystem : EntitySystem
{
[Dependency] private readonly MetaDataSystem _metaData = default!;
[Dependency] private readonly NumberObjectiveSystem _number = default!;
- [Dependency] private readonly SharedMindSystem _mind = default!;
[Dependency] private readonly IRobustRandom _random = default!;
public override void Initialize()
diff --git a/Content.Server/ParticleAccelerator/EntitySystems/ParticleAcceleratorSystem.cs b/Content.Server/ParticleAccelerator/EntitySystems/ParticleAcceleratorSystem.cs
index ddc7e2a083..e9b62bc4a8 100644
--- a/Content.Server/ParticleAccelerator/EntitySystems/ParticleAcceleratorSystem.cs
+++ b/Content.Server/ParticleAccelerator/EntitySystems/ParticleAcceleratorSystem.cs
@@ -2,7 +2,6 @@ using Content.Server.Administration.Logs;
using Content.Server.Chat.Managers;
using Content.Server.Projectiles;
using Robust.Shared.Physics.Systems;
-using Robust.Shared.Map;
using Robust.Shared.Timing;
using Robust.Server.GameObjects;
using Robust.Shared.Configuration;
@@ -13,7 +12,6 @@ public sealed partial class ParticleAcceleratorSystem : EntitySystem
{
[Dependency] private readonly IAdminLogManager _adminLogger = default!;
[Dependency] private readonly IGameTiming _gameTiming = default!;
- [Dependency] private readonly IMapManager _mapManager = default!;
[Dependency] private readonly IConfigurationManager _cfg = default!;
[Dependency] private readonly IChatManager _chat = default!;
[Dependency] private readonly ProjectileSystem _projectileSystem = default!;
diff --git a/Content.Server/Polymorph/Systems/PolymorphSystem.cs b/Content.Server/Polymorph/Systems/PolymorphSystem.cs
index 66dc9dab99..5fe29dcd30 100644
--- a/Content.Server/Polymorph/Systems/PolymorphSystem.cs
+++ b/Content.Server/Polymorph/Systems/PolymorphSystem.cs
@@ -32,7 +32,6 @@ public sealed partial class PolymorphSystem : EntitySystem
[Dependency] private readonly IPrototypeManager _proto = default!;
[Dependency] private readonly IGameTiming _gameTiming = default!;
[Dependency] private readonly ActionsSystem _actions = default!;
- [Dependency] private readonly ActionContainerSystem _actionContainer = default!;
[Dependency] private readonly AudioSystem _audio = default!;
[Dependency] private readonly SharedBuckleSystem _buckle = default!;
[Dependency] private readonly ContainerSystem _container = default!;
diff --git a/Content.Server/Power/EntitySystems/ExtensionCableSystem.cs b/Content.Server/Power/EntitySystems/ExtensionCableSystem.cs
index acfb8ff87b..85e553031f 100644
--- a/Content.Server/Power/EntitySystems/ExtensionCableSystem.cs
+++ b/Content.Server/Power/EntitySystems/ExtensionCableSystem.cs
@@ -1,6 +1,5 @@
using System.Diagnostics.CodeAnalysis;
using Content.Server.Power.Components;
-using Robust.Shared.Map;
using Robust.Shared.Map.Components;
using Robust.Shared.Physics;
using Robust.Shared.Physics.Components;
@@ -9,8 +8,6 @@ namespace Content.Server.Power.EntitySystems
{
public sealed class ExtensionCableSystem : EntitySystem
{
- [Dependency] private readonly IMapManager _mapManager = default!;
-
public override void Initialize()
{
base.Initialize();
diff --git a/Content.Server/Power/Generator/PortableGeneratorSystem.cs b/Content.Server/Power/Generator/PortableGeneratorSystem.cs
index 3cd18d7d56..a95a3fd423 100644
--- a/Content.Server/Power/Generator/PortableGeneratorSystem.cs
+++ b/Content.Server/Power/Generator/PortableGeneratorSystem.cs
@@ -1,5 +1,4 @@
using Content.Server.DoAfter;
-using Content.Server.NodeContainer.NodeGroups;
using Content.Server.Popups;
using Content.Server.Power.Components;
using Content.Server.Power.EntitySystems;
@@ -28,7 +27,6 @@ public sealed class PortableGeneratorSystem : SharedPortableGeneratorSystem
[Dependency] private readonly GeneratorSystem _generator = default!;
[Dependency] private readonly PowerSwitchableSystem _switchable = default!;
[Dependency] private readonly ActiveGeneratorRevvingSystem _revving = default!;
- [Dependency] private readonly PowerNetSystem _powerNet = default!;
public override void Initialize()
{
diff --git a/Content.Server/RatKing/RatKingSystem.cs b/Content.Server/RatKing/RatKingSystem.cs
index f676e89ac3..4b82dba335 100644
--- a/Content.Server/RatKing/RatKingSystem.cs
+++ b/Content.Server/RatKing/RatKingSystem.cs
@@ -11,7 +11,6 @@ using Content.Shared.Nutrition.Components;
using Content.Shared.Nutrition.EntitySystems;
using Content.Shared.Pointing;
using Content.Shared.RatKing;
-using Robust.Server.GameObjects;
using Robust.Shared.Map;
using Robust.Shared.Random;
@@ -26,7 +25,6 @@ namespace Content.Server.RatKing
[Dependency] private readonly HungerSystem _hunger = default!;
[Dependency] private readonly NPCSystem _npc = default!;
[Dependency] private readonly PopupSystem _popup = default!;
- [Dependency] private readonly TransformSystem _xform = default!;
public override void Initialize()
{
diff --git a/Content.Server/Roles/RemoveRoleCommand.cs b/Content.Server/Roles/RemoveRoleCommand.cs
index edb29da624..feba63a253 100644
--- a/Content.Server/Roles/RemoveRoleCommand.cs
+++ b/Content.Server/Roles/RemoveRoleCommand.cs
@@ -5,14 +5,12 @@ using Content.Shared.Roles;
using Content.Shared.Roles.Jobs;
using Robust.Server.Player;
using Robust.Shared.Console;
-using Robust.Shared.Prototypes;
namespace Content.Server.Roles
{
[AdminCommand(AdminFlags.Admin)]
public sealed class RemoveRoleCommand : IConsoleCommand
{
- [Dependency] private readonly IPrototypeManager _prototypeManager = default!;
[Dependency] private readonly IEntityManager _entityManager = default!;
public string Command => "rmrole";
diff --git a/Content.Server/Sandbox/Commands/ColorNetworkCommand.cs b/Content.Server/Sandbox/Commands/ColorNetworkCommand.cs
index 2ab29d1b2f..6ce8edd1d8 100644
--- a/Content.Server/Sandbox/Commands/ColorNetworkCommand.cs
+++ b/Content.Server/Sandbox/Commands/ColorNetworkCommand.cs
@@ -11,7 +11,6 @@ namespace Content.Server.Sandbox.Commands
[AnyCommand]
public sealed class ColorNetworkCommand : IConsoleCommand
{
- [Dependency] private readonly IAdminManager _adminManager = default!;
[Dependency] private readonly IEntityManager _entManager = default!;
public string Command => "colornetwork";
diff --git a/Content.Server/Shuttles/Systems/ArrivalsSystem.cs b/Content.Server/Shuttles/Systems/ArrivalsSystem.cs
index f4dd502b37..ae742cf1f9 100644
--- a/Content.Server/Shuttles/Systems/ArrivalsSystem.cs
+++ b/Content.Server/Shuttles/Systems/ArrivalsSystem.cs
@@ -1,13 +1,10 @@
using System.Linq;
-using System.Numerics;
using Content.Server.Administration;
using Content.Server.GameTicking;
using Content.Server.GameTicking.Events;
using Content.Server.Parallax;
-using Content.Server.DeviceNetwork;
using Content.Server.DeviceNetwork.Components;
using Content.Server.DeviceNetwork.Systems;
-using Content.Server.Salvage;
using Content.Server.Screens.Components;
using Content.Server.Shuttles.Components;
using Content.Server.Shuttles.Events;
@@ -22,7 +19,6 @@ using Content.Shared.Movement.Components;
using Content.Shared.Parallax.Biomes;
using Content.Shared.Salvage;
using Content.Shared.Shuttles.Components;
-using Robust.Shared.Spawners;
using Content.Shared.Tiles;
using Robust.Server.GameObjects;
using Robust.Shared.Collections;
@@ -51,7 +47,6 @@ public sealed class ArrivalsSystem : EntitySystem
[Dependency] private readonly GameTicker _ticker = default!;
[Dependency] private readonly MapLoaderSystem _loader = default!;
[Dependency] private readonly DeviceNetworkSystem _deviceNetworkSystem = default!;
- [Dependency] private readonly RestrictedRangeSystem _restricted = default!;
[Dependency] private readonly SharedTransformSystem _transform = default!;
[Dependency] private readonly ShuttleSystem _shuttles = default!;
[Dependency] private readonly StationSpawningSystem _stationSpawning = default!;
diff --git a/Content.Server/Shuttles/Systems/ThrusterSystem.cs b/Content.Server/Shuttles/Systems/ThrusterSystem.cs
index 97fe19ea74..74c42ccbc5 100644
--- a/Content.Server/Shuttles/Systems/ThrusterSystem.cs
+++ b/Content.Server/Shuttles/Systems/ThrusterSystem.cs
@@ -1,6 +1,5 @@
using System.Numerics;
using Content.Server.Audio;
-using Content.Server.Construction;
using Content.Server.Power.Components;
using Content.Server.Power.EntitySystems;
using Content.Server.Shuttles.Components;
@@ -25,7 +24,6 @@ namespace Content.Server.Shuttles.Systems;
public sealed class ThrusterSystem : EntitySystem
{
[Dependency] private readonly IGameTiming _timing = default!;
- [Dependency] private readonly IMapManager _mapManager = default!;
[Dependency] private readonly ITileDefinitionManager _tileDefManager = default!;
[Dependency] private readonly AmbientSoundSystem _ambient = default!;
[Dependency] private readonly FixtureSystem _fixtureSystem = default!;
diff --git a/Content.Server/Silicons/Laws/SiliconLawSystem.cs b/Content.Server/Silicons/Laws/SiliconLawSystem.cs
index 4584a9e88b..010682bc0d 100644
--- a/Content.Server/Silicons/Laws/SiliconLawSystem.cs
+++ b/Content.Server/Silicons/Laws/SiliconLawSystem.cs
@@ -19,7 +19,6 @@ using Content.Shared.Silicons.Laws.Components;
using Content.Shared.Stunnable;
using Content.Shared.Wires;
using Robust.Server.GameObjects;
-using Robust.Shared.Audio.Systems;
using Robust.Shared.Player;
using Robust.Shared.Prototypes;
using Robust.Shared.Toolshed;
@@ -38,7 +37,6 @@ public sealed class SiliconLawSystem : SharedSiliconLawSystem
[Dependency] private readonly SharedStunSystem _stunSystem = default!;
[Dependency] private readonly IEntityManager _entityManager = default!;
[Dependency] private readonly SharedRoleSystem _roles = default!;
- [Dependency] private readonly SharedAudioSystem _audioSystem = default!;
///
public override void Initialize()
diff --git a/Content.Server/Singularity/EntitySystems/RadiationCollectorSystem.cs b/Content.Server/Singularity/EntitySystems/RadiationCollectorSystem.cs
index 92b963e201..b26ab301c6 100644
--- a/Content.Server/Singularity/EntitySystems/RadiationCollectorSystem.cs
+++ b/Content.Server/Singularity/EntitySystems/RadiationCollectorSystem.cs
@@ -24,7 +24,6 @@ public sealed class RadiationCollectorSystem : EntitySystem
[Dependency] private readonly SharedAppearanceSystem _appearance = default!;
[Dependency] private readonly SharedContainerSystem _containerSystem = default!;
[Dependency] private readonly UseDelaySystem _useDelay = default!;
- [Dependency] private readonly BatterySystem _batterySystem = default!;
private const string GasTankContainer = "gas_tank";
diff --git a/Content.Server/Spreader/SpreaderSystem.cs b/Content.Server/Spreader/SpreaderSystem.cs
index 5b2f3298a2..671c281d1f 100644
--- a/Content.Server/Spreader/SpreaderSystem.cs
+++ b/Content.Server/Spreader/SpreaderSystem.cs
@@ -18,7 +18,6 @@ namespace Content.Server.Spreader;
///
public sealed class SpreaderSystem : EntitySystem
{
- [Dependency] private readonly IMapManager _mapManager = default!;
[Dependency] private readonly IPrototypeManager _prototype = default!;
[Dependency] private readonly IRobustRandom _robustRandom = default!;
[Dependency] private readonly SharedMapSystem _map = default!;
diff --git a/Content.Server/Station/Systems/StationJobsSystem.cs b/Content.Server/Station/Systems/StationJobsSystem.cs
index a3b7a57354..debac8902e 100644
--- a/Content.Server/Station/Systems/StationJobsSystem.cs
+++ b/Content.Server/Station/Systems/StationJobsSystem.cs
@@ -25,7 +25,6 @@ public sealed partial class StationJobsSystem : EntitySystem
[Dependency] private readonly IConfigurationManager _configurationManager = default!;
[Dependency] private readonly IRobustRandom _random = default!;
[Dependency] private readonly GameTicker _gameTicker = default!;
- [Dependency] private readonly StationSystem _stationSystem = default!;
[Dependency] private readonly IPlayerManager _playerManager = default!;
///
diff --git a/Content.Server/Station/Systems/StationSystem.cs b/Content.Server/Station/Systems/StationSystem.cs
index b9ff8a4339..492f15c8e2 100644
--- a/Content.Server/Station/Systems/StationSystem.cs
+++ b/Content.Server/Station/Systems/StationSystem.cs
@@ -29,7 +29,6 @@ public sealed class StationSystem : EntitySystem
{
[Dependency] private readonly IConfigurationManager _configurationManager = default!;
[Dependency] private readonly ILogManager _logManager = default!;
- [Dependency] private readonly IMapManager _mapManager = default!;
[Dependency] private readonly IPlayerManager _player = default!;
[Dependency] private readonly IRobustRandom _random = default!;
[Dependency] private readonly ChatSystem _chatSystem = default!;
diff --git a/Content.Server/StationEvents/Events/NinjaSpawnRule.cs b/Content.Server/StationEvents/Events/NinjaSpawnRule.cs
index c60f3298e7..8ad5c8602e 100644
--- a/Content.Server/StationEvents/Events/NinjaSpawnRule.cs
+++ b/Content.Server/StationEvents/Events/NinjaSpawnRule.cs
@@ -2,10 +2,8 @@ using Content.Server.GameTicking.Rules.Components;
using Content.Server.Ninja.Systems;
using Content.Server.Station.Components;
using Content.Server.StationEvents.Components;
-using Robust.Server.GameObjects;
using Robust.Shared.Map;
using Robust.Shared.Map.Components;
-using Robust.Shared.Random;
namespace Content.Server.StationEvents.Events;
@@ -14,7 +12,6 @@ namespace Content.Server.StationEvents.Events;
///
public sealed class NinjaSpawnRule : StationEventSystem
{
- [Dependency] private readonly SpaceNinjaSystem _ninja = default!;
[Dependency] private readonly SharedTransformSystem _transform = default!;
protected override void Started(EntityUid uid, NinjaSpawnRuleComponent comp, GameRuleComponent gameRule, GameRuleStartedEvent args)
diff --git a/Content.Server/SurveillanceCamera/Systems/SurveillanceCameraSpeakerSystem.cs b/Content.Server/SurveillanceCamera/Systems/SurveillanceCameraSpeakerSystem.cs
index 7544fc376b..0e694a801e 100644
--- a/Content.Server/SurveillanceCamera/Systems/SurveillanceCameraSpeakerSystem.cs
+++ b/Content.Server/SurveillanceCamera/Systems/SurveillanceCameraSpeakerSystem.cs
@@ -1,10 +1,7 @@
using Content.Server.Chat.Systems;
using Content.Server.Speech;
using Content.Shared.Speech;
-using Robust.Shared.Audio;
using Robust.Shared.Audio.Systems;
-using Robust.Shared.Prototypes;
-using Robust.Shared.Random;
using Robust.Shared.Timing;
namespace Content.Server.SurveillanceCamera;
@@ -18,8 +15,6 @@ public sealed class SurveillanceCameraSpeakerSystem : EntitySystem
[Dependency] private readonly SpeechSoundSystem _speechSound = default!;
[Dependency] private readonly ChatSystem _chatSystem = default!;
[Dependency] private readonly IGameTiming _gameTiming = default!;
- [Dependency] private readonly IPrototypeManager _prototypeManager = default!;
- [Dependency] private readonly IRobustRandom _random = default!;
///
public override void Initialize()
diff --git a/Content.Server/Temperature/Systems/TemperatureSystem.cs b/Content.Server/Temperature/Systems/TemperatureSystem.cs
index aef4b89d50..6c9e99e5f3 100644
--- a/Content.Server/Temperature/Systems/TemperatureSystem.cs
+++ b/Content.Server/Temperature/Systems/TemperatureSystem.cs
@@ -11,7 +11,6 @@ using Content.Shared.Database;
using Content.Shared.Inventory;
using Content.Shared.Rejuvenate;
using Content.Shared.Temperature;
-using Robust.Server.GameObjects;
using Robust.Shared.Physics.Components;
namespace Content.Server.Temperature.Systems;
@@ -22,7 +21,6 @@ public sealed class TemperatureSystem : EntitySystem
[Dependency] private readonly AtmosphereSystem _atmosphere = default!;
[Dependency] private readonly DamageableSystem _damageable = default!;
[Dependency] private readonly IAdminLogManager _adminLogger = default!;
- [Dependency] private readonly TransformSystem _transform = default!;
///
/// All the components that will have their damage updated at the end of the tick.
diff --git a/Content.Server/Weapons/Ranged/Systems/GunSystem.cs b/Content.Server/Weapons/Ranged/Systems/GunSystem.cs
index b8f8f12211..e64657743d 100644
--- a/Content.Server/Weapons/Ranged/Systems/GunSystem.cs
+++ b/Content.Server/Weapons/Ranged/Systems/GunSystem.cs
@@ -1,6 +1,5 @@
using System.Linq;
using System.Numerics;
-using Content.Server.Administration.Logs;
using Content.Server.Cargo.Systems;
using Content.Server.Interaction;
using Content.Server.Power.EntitySystems;
@@ -29,7 +28,6 @@ namespace Content.Server.Weapons.Ranged.Systems;
public sealed partial class GunSystem : SharedGunSystem
{
- [Dependency] private readonly IAdminLogManager _adminLogger = default!;
[Dependency] private readonly IComponentFactory _factory = default!;
[Dependency] private readonly BatterySystem _battery = default!;
[Dependency] private readonly DamageExamineSystem _damageExamine = default!;
diff --git a/Content.Server/Xenoarchaeology/XenoArtifacts/Triggers/Systems/ArtifactGasTriggerSystem.cs b/Content.Server/Xenoarchaeology/XenoArtifacts/Triggers/Systems/ArtifactGasTriggerSystem.cs
index 96f1dc3783..00f409f553 100644
--- a/Content.Server/Xenoarchaeology/XenoArtifacts/Triggers/Systems/ArtifactGasTriggerSystem.cs
+++ b/Content.Server/Xenoarchaeology/XenoArtifacts/Triggers/Systems/ArtifactGasTriggerSystem.cs
@@ -1,7 +1,6 @@
using Content.Server.Atmos.EntitySystems;
using Content.Server.Xenoarchaeology.XenoArtifacts.Events;
using Content.Server.Xenoarchaeology.XenoArtifacts.Triggers.Components;
-using Robust.Server.GameObjects;
namespace Content.Server.Xenoarchaeology.XenoArtifacts.Triggers.Systems;
@@ -9,7 +8,6 @@ public sealed class ArtifactGasTriggerSystem : EntitySystem
{
[Dependency] private readonly AtmosphereSystem _atmosphereSystem = default!;
[Dependency] private readonly ArtifactSystem _artifactSystem = default!;
- [Dependency] private readonly TransformSystem _transformSystem = default!;
public override void Initialize()
{
diff --git a/Content.Server/Xenoarchaeology/XenoArtifacts/Triggers/Systems/ArtifactHeatTriggerSystem.cs b/Content.Server/Xenoarchaeology/XenoArtifacts/Triggers/Systems/ArtifactHeatTriggerSystem.cs
index 33d1a43c12..5525cdf359 100644
--- a/Content.Server/Xenoarchaeology/XenoArtifacts/Triggers/Systems/ArtifactHeatTriggerSystem.cs
+++ b/Content.Server/Xenoarchaeology/XenoArtifacts/Triggers/Systems/ArtifactHeatTriggerSystem.cs
@@ -3,7 +3,6 @@ using Content.Server.Xenoarchaeology.XenoArtifacts.Triggers.Components;
using Content.Shared.Interaction;
using Content.Shared.Temperature;
using Content.Shared.Weapons.Melee.Events;
-using Robust.Server.GameObjects;
namespace Content.Server.Xenoarchaeology.XenoArtifacts.Triggers.Systems;
@@ -11,7 +10,6 @@ public sealed class ArtifactHeatTriggerSystem : EntitySystem
{
[Dependency] private readonly AtmosphereSystem _atmosphereSystem = default!;
[Dependency] private readonly ArtifactSystem _artifactSystem = default!;
- [Dependency] private readonly TransformSystem _transformSystem = default!;
public override void Initialize()
{
diff --git a/Content.Server/Xenoarchaeology/XenoArtifacts/Triggers/Systems/ArtifactPressureTriggerSystem.cs b/Content.Server/Xenoarchaeology/XenoArtifacts/Triggers/Systems/ArtifactPressureTriggerSystem.cs
index 4388756cce..8777ab0a8c 100644
--- a/Content.Server/Xenoarchaeology/XenoArtifacts/Triggers/Systems/ArtifactPressureTriggerSystem.cs
+++ b/Content.Server/Xenoarchaeology/XenoArtifacts/Triggers/Systems/ArtifactPressureTriggerSystem.cs
@@ -1,6 +1,5 @@
using Content.Server.Atmos.EntitySystems;
using Content.Server.Xenoarchaeology.XenoArtifacts.Triggers.Components;
-using Robust.Server.GameObjects;
namespace Content.Server.Xenoarchaeology.XenoArtifacts.Triggers.Systems;
@@ -11,7 +10,6 @@ public sealed class ArtifactPressureTriggerSystem : EntitySystem
{
[Dependency] private readonly AtmosphereSystem _atmosphereSystem = default!;
[Dependency] private readonly ArtifactSystem _artifactSystem = default!;
- [Dependency] private readonly TransformSystem _transformSystem = default!;
public override void Update(float frameTime)
{
diff --git a/Content.Server/Zombies/ZombieSystem.cs b/Content.Server/Zombies/ZombieSystem.cs
index bef57eceb3..080bef44e7 100644
--- a/Content.Server/Zombies/ZombieSystem.cs
+++ b/Content.Server/Zombies/ZombieSystem.cs
@@ -2,9 +2,7 @@ using System.Linq;
using Content.Server.Body.Systems;
using Content.Server.Chat;
using Content.Server.Chat.Systems;
-using Content.Server.Cloning;
using Content.Server.Emoting.Systems;
-using Content.Server.Inventory;
using Content.Server.Speech.EntitySystems;
using Content.Shared.Bed.Sleep;
using Content.Shared.Cloning;
@@ -31,7 +29,6 @@ namespace Content.Server.Zombies
[Dependency] private readonly IRobustRandom _random = default!;
[Dependency] private readonly BloodstreamSystem _bloodstream = default!;
[Dependency] private readonly DamageableSystem _damageable = default!;
- [Dependency] private readonly ServerInventorySystem _inv = default!;
[Dependency] private readonly ChatSystem _chat = default!;
[Dependency] private readonly AutoEmoteSystem _autoEmote = default!;
[Dependency] private readonly EmoteOnDamageSystem _emoteOnDamage = default!;
diff --git a/Content.Shared/Climbing/Systems/ClimbSystem.cs b/Content.Shared/Climbing/Systems/ClimbSystem.cs
index ec4ec17acd..5471f07250 100644
--- a/Content.Shared/Climbing/Systems/ClimbSystem.cs
+++ b/Content.Shared/Climbing/Systems/ClimbSystem.cs
@@ -34,7 +34,6 @@ public sealed partial class ClimbSystem : VirtualController
[Dependency] private readonly DamageableSystem _damageableSystem = default!;
[Dependency] private readonly FixtureSystem _fixtureSystem = default!;
[Dependency] private readonly SharedAudioSystem _audio = default!;
- [Dependency] private readonly SharedBodySystem _bodySystem = default!;
[Dependency] private readonly SharedDoAfterSystem _doAfterSystem = default!;
[Dependency] private readonly SharedInteractionSystem _interactionSystem = default!;
[Dependency] private readonly SharedPopupSystem _popupSystem = default!;
diff --git a/Content.Shared/Construction/SharedFlatpackSystem.cs b/Content.Shared/Construction/SharedFlatpackSystem.cs
index a62488d6f3..8b21bca52a 100644
--- a/Content.Shared/Construction/SharedFlatpackSystem.cs
+++ b/Content.Shared/Construction/SharedFlatpackSystem.cs
@@ -114,8 +114,7 @@ public abstract class SharedFlatpackSystem : EntitySystem
if (!Resolve(ent, ref ent.Comp))
return;
- EntProtoId machinePrototypeId;
- string? entityPrototype;
+ var machinePrototypeId = new EntProtoId();
if (TryComp(board, out var machineBoard) && machineBoard.Prototype is not null)
machinePrototypeId = machineBoard.Prototype;
else if (TryComp(board, out var computerBoard) && computerBoard.Prototype is not null)
diff --git a/Content.Shared/Coordinates/EntityCoordinatesExtensions.cs b/Content.Shared/Coordinates/EntityCoordinatesExtensions.cs
index b9083eabe1..47d359d387 100644
--- a/Content.Shared/Coordinates/EntityCoordinatesExtensions.cs
+++ b/Content.Shared/Coordinates/EntityCoordinatesExtensions.cs
@@ -1,6 +1,5 @@
using System.Numerics;
using Robust.Shared.Map;
-using Robust.Shared.Map.Components;
namespace Content.Shared.Coordinates
{
@@ -20,17 +19,5 @@ namespace Content.Shared.Coordinates
{
return new EntityCoordinates(id, x, y);
}
-
- [Obsolete]
- public static EntityCoordinates ToCoordinates(this MapGridComponent grid, float x, float y)
- {
- return ToCoordinates(grid.Owner, x, y);
- }
-
- [Obsolete]
- public static EntityCoordinates ToCoordinates(this MapGridComponent grid)
- {
- return ToCoordinates(grid.Owner, Vector2.Zero);
- }
}
}
diff --git a/Content.Shared/Maps/TurfSystem.cs b/Content.Shared/Maps/TurfSystem.cs
index c0757c5573..ad8b3ddea8 100644
--- a/Content.Shared/Maps/TurfSystem.cs
+++ b/Content.Shared/Maps/TurfSystem.cs
@@ -13,7 +13,6 @@ public sealed class TurfSystem : EntitySystem
{
[Dependency] private readonly EntityLookupSystem _entityLookup = default!;
[Dependency] private readonly SharedTransformSystem _transform = default!;
- [Dependency] private readonly IMapManager _mapMan = default!;
///
/// Returns true if a given tile is blocked by physics-enabled entities.
diff --git a/Content.Shared/RCD/Systems/RCDSystem.cs b/Content.Shared/RCD/Systems/RCDSystem.cs
index 50a7c0fef9..6282a117bb 100644
--- a/Content.Shared/RCD/Systems/RCDSystem.cs
+++ b/Content.Shared/RCD/Systems/RCDSystem.cs
@@ -25,7 +25,6 @@ namespace Content.Shared.RCD.Systems;
public sealed class RCDSystem : EntitySystem
{
[Dependency] private readonly IGameTiming _timing = default!;
- [Dependency] private readonly IMapManager _mapMan = default!;
[Dependency] private readonly INetManager _net = default!;
[Dependency] private readonly ISharedAdminLogManager _adminLogger = default!;
[Dependency] private readonly ITileDefinitionManager _tileDefMan = default!;
@@ -39,7 +38,7 @@ public sealed class RCDSystem : EntitySystem
[Dependency] private readonly TurfSystem _turf = default!;
[Dependency] private readonly IGameTiming _gameTiming = default!;
- private readonly int RcdModeCount = Enum.GetValues(typeof(RcdMode)).Length;
+ private readonly int _rcdModeCount = Enum.GetValues(typeof(RcdMode)).Length;
public override void Initialize()
{
@@ -310,7 +309,7 @@ public sealed class RCDSystem : EntitySystem
_audio.PlayPredicted(comp.SwapModeSound, uid, user);
var mode = (int) comp.Mode;
- mode = ++mode % RcdModeCount;
+ mode = ++mode % _rcdModeCount;
comp.Mode = (RcdMode) mode;
Dirty(uid, comp);
diff --git a/Content.Shared/Remotes/EntitySystems/SharedDoorRemoteSystem.cs b/Content.Shared/Remotes/EntitySystems/SharedDoorRemoteSystem.cs
index 72d807e6a0..e9bbd27ada 100644
--- a/Content.Shared/Remotes/EntitySystems/SharedDoorRemoteSystem.cs
+++ b/Content.Shared/Remotes/EntitySystems/SharedDoorRemoteSystem.cs
@@ -1,4 +1,3 @@
-using Content.Shared.Interaction;
using Content.Shared.Popups;
using Content.Shared.Interaction.Events;
using Content.Shared.Remotes.Components;
@@ -8,8 +7,6 @@ namespace Content.Shared.Remotes.EntitySystems;
public abstract class SharedDoorRemoteSystem : EntitySystem
{
[Dependency] protected readonly SharedPopupSystem Popup = default!;
- [Dependency] private readonly SharedInteractionSystem _interactionSystem = default!;
- // I'm so sorry [Dependency] private readonly SharedAirlockSystem _sharedAirlockSystem = default!;
public override void Initialize()
{
diff --git a/Content.Shared/Shuttles/Components/IFFComponent.cs b/Content.Shared/Shuttles/Components/IFFComponent.cs
index a7e6ac1152..6bacbd2b5b 100644
--- a/Content.Shared/Shuttles/Components/IFFComponent.cs
+++ b/Content.Shared/Shuttles/Components/IFFComponent.cs
@@ -10,11 +10,6 @@ namespace Content.Shared.Shuttles.Components;
[Access(typeof(SharedShuttleSystem))]
public sealed partial class IFFComponent : Component
{
- ///
- /// Should we show IFF by default?
- ///
- public const bool ShowIFFDefault = true;
-
public static readonly Color SelfColor = Color.MediumSpringGreen;
///
diff --git a/Content.Shared/Shuttles/Systems/SharedShuttleSystem.IFF.cs b/Content.Shared/Shuttles/Systems/SharedShuttleSystem.IFF.cs
index ed687d48f4..8231e48e2d 100644
--- a/Content.Shared/Shuttles/Systems/SharedShuttleSystem.IFF.cs
+++ b/Content.Shared/Shuttles/Systems/SharedShuttleSystem.IFF.cs
@@ -28,11 +28,6 @@ public abstract partial class SharedShuttleSystem
public string? GetIFFLabel(EntityUid gridUid, bool self = false, IFFComponent? component = null)
{
- if (!IFFComponent.ShowIFFDefault)
- {
- return null;
- }
-
var entName = MetaData(gridUid).EntityName;
if (self)
diff --git a/Content.Shared/Shuttles/Systems/SharedShuttleSystem.cs b/Content.Shared/Shuttles/Systems/SharedShuttleSystem.cs
index 324fd65c86..ca25a49b23 100644
--- a/Content.Shared/Shuttles/Systems/SharedShuttleSystem.cs
+++ b/Content.Shared/Shuttles/Systems/SharedShuttleSystem.cs
@@ -146,7 +146,6 @@ public abstract partial class SharedShuttleSystem : EntitySystem
// Just checks if any grids inside of a buffer range at the target position.
_grids.Clear();
- var ftlRange = FTLRange;
var mapCoordinates = coordinates.ToMap(EntityManager, XformSystem);
var ourPos = Maps.GetGridPosition((shuttleUid, shuttlePhysics, shuttleXform));
diff --git a/Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.Interactions.cs b/Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.Interactions.cs
index d47d024de5..274828a208 100644
--- a/Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.Interactions.cs
+++ b/Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.Interactions.cs
@@ -102,7 +102,7 @@ public abstract partial class SharedGunSystem
// TODO: Actions need doing for guns anyway.
private sealed partial class CycleModeEvent : InstantActionEvent
{
- public SelectiveFire Mode;
+ public SelectiveFire Mode = default;
}
private void OnCycleMode(EntityUid uid, GunComponent component, CycleModeEvent args)
From 52ca0c2ec280cccae16118a10cc48d9605db7394 Mon Sep 17 00:00:00 2001
From: PJBot
Date: Fri, 29 Mar 2024 05:29:22 +0000
Subject: [PATCH 11/22] Automatic changelog update
---
Resources/Changelog/Changelog.yml | 16 +++++++---------
1 file changed, 7 insertions(+), 9 deletions(-)
diff --git a/Resources/Changelog/Changelog.yml b/Resources/Changelog/Changelog.yml
index 7a832f5412..489993d1cc 100644
--- a/Resources/Changelog/Changelog.yml
+++ b/Resources/Changelog/Changelog.yml
@@ -1,13 +1,4 @@
Entries:
-- author: EmoGarbage404
- changes:
- - message: You can now sort lathe recipes by category.
- type: Add
- - message: Recipes in lathes are now sorted alphabetically.
- type: Add
- id: 5748
- time: '2024-01-20T00:45:04.0000000+00:00'
- url: https://api.github.com/repos/space-wizards/space-station-14/pulls/24247
- author: Scribbles0
changes:
- message: Added a new trait, the Unrevivable trait.
@@ -3795,3 +3786,10 @@
id: 6247
time: '2024-03-29T02:30:23.0000000+00:00'
url: https://github.com/space-wizards/space-station-14/pull/26498
+- author: Jake Huxell
+ changes:
+ - message: Reduced game build warning count.
+ type: Fix
+ id: 6248
+ time: '2024-03-29T05:28:16.0000000+00:00'
+ url: https://github.com/space-wizards/space-station-14/pull/26518
From a25801b35b6170ce7b371957ec97f9db516f1094 Mon Sep 17 00:00:00 2001
From: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
Date: Fri, 29 Mar 2024 16:55:05 +1100
Subject: [PATCH 12/22] Update audioparams (#26387)
Drops busname + attenuation.
---
Content.Client/Audio/AmbientSoundSystem.cs | 1 -
Content.Client/Audio/ContentAudioSystem.LobbyMusic.cs | 4 ++--
.../Light/Components/SharedExpendableLightComponent.cs | 2 +-
3 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/Content.Client/Audio/AmbientSoundSystem.cs b/Content.Client/Audio/AmbientSoundSystem.cs
index 9d30cabb1e..0206017bae 100644
--- a/Content.Client/Audio/AmbientSoundSystem.cs
+++ b/Content.Client/Audio/AmbientSoundSystem.cs
@@ -50,7 +50,6 @@ public sealed class AmbientSoundSystem : SharedAmbientSoundSystem
private static AudioParams _params = AudioParams.Default
.WithVariation(0.01f)
.WithLoop(true)
- .WithAttenuation(Attenuation.LinearDistance)
.WithMaxDistance(7f);
///
diff --git a/Content.Client/Audio/ContentAudioSystem.LobbyMusic.cs b/Content.Client/Audio/ContentAudioSystem.LobbyMusic.cs
index 0fdcc7a86d..92c5b7a419 100644
--- a/Content.Client/Audio/ContentAudioSystem.LobbyMusic.cs
+++ b/Content.Client/Audio/ContentAudioSystem.LobbyMusic.cs
@@ -23,8 +23,8 @@ public sealed partial class ContentAudioSystem
[Dependency] private readonly IStateManager _stateManager = default!;
[Dependency] private readonly IResourceCache _resourceCache = default!;
- private readonly AudioParams _lobbySoundtrackParams = new(-5f, 1, "Master", 0, 0, 0, false, 0f);
- private readonly AudioParams _roundEndSoundEffectParams = new(-5f, 1, "Master", 0, 0, 0, false, 0f);
+ private readonly AudioParams _lobbySoundtrackParams = new(-5f, 1, 0, 0, 0, false, 0f);
+ private readonly AudioParams _roundEndSoundEffectParams = new(-5f, 1, 0, 0, 0, false, 0f);
///
/// EntityUid of lobby restart sound component.
diff --git a/Content.Shared/Light/Components/SharedExpendableLightComponent.cs b/Content.Shared/Light/Components/SharedExpendableLightComponent.cs
index c802700b62..e40174ab78 100644
--- a/Content.Shared/Light/Components/SharedExpendableLightComponent.cs
+++ b/Content.Shared/Light/Components/SharedExpendableLightComponent.cs
@@ -7,7 +7,7 @@ namespace Content.Shared.Light.Components;
[NetworkedComponent]
public abstract partial class SharedExpendableLightComponent : Component
{
- public static readonly AudioParams LoopedSoundParams = new(0, 1, "Master", 62.5f, 1, 1, true, 0.3f);
+ public static readonly AudioParams LoopedSoundParams = new(0, 1, 62.5f, 1, 1, true, 0.3f);
[ViewVariables(VVAccess.ReadOnly)]
public ExpendableLightState CurrentState { get; set; }
From f008732a188d9d7a6f5605c79bc07e6fb01fa92d Mon Sep 17 00:00:00 2001
From: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
Date: Fri, 29 Mar 2024 17:06:50 +1100
Subject: [PATCH 13/22] Update submodule to 217.0.0 (#26524)
---
RobustToolbox | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/RobustToolbox b/RobustToolbox
index 8607ba1f16..4002cbddb9 160000
--- a/RobustToolbox
+++ b/RobustToolbox
@@ -1 +1 @@
-Subproject commit 8607ba1f16ce676a849b59a41efd389a6e467f5c
+Subproject commit 4002cbddb9c9de9030a81480b45b13d978b87526
From b0416372632d963338475c04d743b6916d4a1d61 Mon Sep 17 00:00:00 2001
From: wafehling
Date: Fri, 29 Mar 2024 01:13:52 -0500
Subject: [PATCH 14/22] Chemically-created Crystal Shards (#26269)
Added chemical reaction for making crystal shards
---
.../Objects/Materials/crystal_shard.yml | 15 +++++++++++++++
Resources/Prototypes/Recipes/Reactions/fun.yml | 17 ++++++++++++++++-
2 files changed, 31 insertions(+), 1 deletion(-)
diff --git a/Resources/Prototypes/Entities/Objects/Materials/crystal_shard.yml b/Resources/Prototypes/Entities/Objects/Materials/crystal_shard.yml
index 884a5531e7..8f522abce4 100644
--- a/Resources/Prototypes/Entities/Objects/Materials/crystal_shard.yml
+++ b/Resources/Prototypes/Entities/Objects/Materials/crystal_shard.yml
@@ -134,3 +134,18 @@
tags:
- Trash
- CrystalRed
+
+- type: entity
+ parent: ShardCrystalBase
+ id: ShardCrystalRandom
+ name: random crystal shard
+ components:
+ - type: RandomSpawner
+ prototypes:
+ - ShardCrystalGreen
+ - ShardCrystalPink
+ - ShardCrystalOrange
+ - ShardCrystalBlue
+ - ShardCrystalCyan
+ - ShardCrystalRed
+ chance: 1
diff --git a/Resources/Prototypes/Recipes/Reactions/fun.yml b/Resources/Prototypes/Recipes/Reactions/fun.yml
index fd1f42f101..5ae173c0ee 100644
--- a/Resources/Prototypes/Recipes/Reactions/fun.yml
+++ b/Resources/Prototypes/Recipes/Reactions/fun.yml
@@ -171,6 +171,21 @@
products:
Laughter: 2
+- type: reaction
+ id: CreateCrystals
+ quantized: true
+ minTemp: 374
+ reactants:
+ Sugar:
+ amount: 15
+ Water:
+ amount: 15
+ Ethanol:
+ amount: 5
+ effects:
+ - !type:CreateEntityReactionEffect
+ entity: ShardCrystalRandom
+
- type: reaction
id: Gunpowder
impact: Low
@@ -185,4 +200,4 @@
amount: 2
effects:
- !type:CreateEntityReactionEffect
- entity: MaterialGunpowder
\ No newline at end of file
+ entity: MaterialGunpowder
From d830922603646574dcee23f2ffe79f953f437276 Mon Sep 17 00:00:00 2001
From: PJBot
Date: Fri, 29 Mar 2024 06:14:58 +0000
Subject: [PATCH 15/22] Automatic changelog update
---
Resources/Changelog/Changelog.yml | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/Resources/Changelog/Changelog.yml b/Resources/Changelog/Changelog.yml
index 489993d1cc..9a0b1e9f81 100644
--- a/Resources/Changelog/Changelog.yml
+++ b/Resources/Changelog/Changelog.yml
@@ -1,11 +1,4 @@
Entries:
-- author: Scribbles0
- changes:
- - message: Added a new trait, the Unrevivable trait.
- type: Add
- id: 5749
- time: '2024-01-20T02:22:15.0000000+00:00'
- url: https://api.github.com/repos/space-wizards/space-station-14/pulls/24226
- author: Drayff
changes:
- message: Animations for ToolBoxes!
@@ -3793,3 +3786,10 @@
id: 6248
time: '2024-03-29T05:28:16.0000000+00:00'
url: https://github.com/space-wizards/space-station-14/pull/26518
+- author: wafehling
+ changes:
+ - message: Added a chemistry recipe to make crystal shards.
+ type: Add
+ id: 6249
+ time: '2024-03-29T06:13:52.0000000+00:00'
+ url: https://github.com/space-wizards/space-station-14/pull/26269
From cdfee5aa0c95ea626271136b9e6ad78ad2000f49 Mon Sep 17 00:00:00 2001
From: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
Date: Fri, 29 Mar 2024 17:26:30 +1100
Subject: [PATCH 16/22] Transform cleanups (#25963)
* Transform cleanups
* Fix build
* ascension
---
.../Tests/Buckle/BuckleTest.cs | 23 ++++----
.../Components/ActionBlocking/HandCuffTest.cs | 5 +-
.../Anomaly/Effects/BluespaceAnomalySystem.cs | 12 ++---
.../Disposal/SharedDisposalUnitSystem.cs | 3 --
.../Storage/EntitySystems/DumpableSystem.cs | 53 ++++++++-----------
5 files changed, 40 insertions(+), 56 deletions(-)
diff --git a/Content.IntegrationTests/Tests/Buckle/BuckleTest.cs b/Content.IntegrationTests/Tests/Buckle/BuckleTest.cs
index 6e2a080370..7c700d9fb8 100644
--- a/Content.IntegrationTests/Tests/Buckle/BuckleTest.cs
+++ b/Content.IntegrationTests/Tests/Buckle/BuckleTest.cs
@@ -181,9 +181,8 @@ namespace Content.IntegrationTests.Tests.Buckle
#pragma warning restore NUnit2045
// Move away from the chair
- var xformQuery = entityManager.GetEntityQuery();
- var oldWorldPosition = xformSystem.GetWorldPosition(chair, xformQuery);
- xformSystem.SetWorldPosition(human, oldWorldPosition + new Vector2(1000, 1000), xformQuery);
+ var oldWorldPosition = xformSystem.GetWorldPosition(chair);
+ xformSystem.SetWorldPosition(human, oldWorldPosition + new Vector2(1000, 1000));
// Out of range
#pragma warning disable NUnit2045 // Interdependent asserts.
@@ -193,8 +192,8 @@ namespace Content.IntegrationTests.Tests.Buckle
#pragma warning restore NUnit2045
// Move near the chair
- oldWorldPosition = xformSystem.GetWorldPosition(chair, xformQuery);
- xformSystem.SetWorldPosition(human, oldWorldPosition + new Vector2(0.5f, 0), xformQuery);
+ oldWorldPosition = xformSystem.GetWorldPosition(chair);
+ xformSystem.SetWorldPosition(human, oldWorldPosition + new Vector2(0.5f, 0));
// In range
#pragma warning disable NUnit2045 // Interdependent asserts.
@@ -220,8 +219,8 @@ namespace Content.IntegrationTests.Tests.Buckle
Assert.That(buckleSystem.TryBuckle(human, human, chair, buckleComp: buckle));
// Move away from the chair
- oldWorldPosition = xformSystem.GetWorldPosition(chair, xformQuery);
- xformSystem.SetWorldPosition(human, oldWorldPosition + new Vector2(1, 0), xformQuery);
+ oldWorldPosition = xformSystem.GetWorldPosition(chair);
+ xformSystem.SetWorldPosition(human, oldWorldPosition + new Vector2(1, 0));
});
await server.WaitRunTicks(1);
@@ -371,9 +370,8 @@ namespace Content.IntegrationTests.Tests.Buckle
});
// Move the buckled entity away
- var xformQuery = entityManager.GetEntityQuery();
- var oldWorldPosition = xformSystem.GetWorldPosition(chair, xformQuery);
- xformSystem.SetWorldPosition(human, oldWorldPosition + new Vector2(100, 0), xformQuery);
+ var oldWorldPosition = xformSystem.GetWorldPosition(chair);
+ xformSystem.SetWorldPosition(human, oldWorldPosition + new Vector2(100, 0));
});
await PoolManager.WaitUntil(server, () => !buckle.Buckled, 10);
@@ -383,9 +381,8 @@ namespace Content.IntegrationTests.Tests.Buckle
await server.WaitAssertion(() =>
{
// Move the now unbuckled entity back onto the chair
- var xformQuery = entityManager.GetEntityQuery();
- var oldWorldPosition = xformSystem.GetWorldPosition(chair, xformQuery);
- xformSystem.SetWorldPosition(human, oldWorldPosition, xformQuery);
+ var oldWorldPosition = xformSystem.GetWorldPosition(chair);
+ xformSystem.SetWorldPosition(human, oldWorldPosition);
// Buckle
Assert.That(buckleSystem.TryBuckle(human, human, chair, buckleComp: buckle));
diff --git a/Content.IntegrationTests/Tests/GameObjects/Components/ActionBlocking/HandCuffTest.cs b/Content.IntegrationTests/Tests/GameObjects/Components/ActionBlocking/HandCuffTest.cs
index 1d5dd6d34e..c6a8e618cc 100644
--- a/Content.IntegrationTests/Tests/GameObjects/Components/ActionBlocking/HandCuffTest.cs
+++ b/Content.IntegrationTests/Tests/GameObjects/Components/ActionBlocking/HandCuffTest.cs
@@ -58,7 +58,6 @@ namespace Content.IntegrationTests.Tests.GameObjects.Components.ActionBlocking
var cuffableSys = entityManager.System();
var xformSys = entityManager.System();
- var xformQuery = entityManager.GetEntityQuery();
// Spawn the entities
human = entityManager.SpawnEntity("HumanHandcuffDummy", coordinates);
@@ -66,8 +65,8 @@ namespace Content.IntegrationTests.Tests.GameObjects.Components.ActionBlocking
cuffs = entityManager.SpawnEntity("HandcuffsDummy", coordinates);
secondCuffs = entityManager.SpawnEntity("HandcuffsDummy", coordinates);
- var coords = xformSys.GetWorldPosition(otherHuman, xformQuery);
- xformSys.SetWorldPosition(human, coords, xformQuery);
+ var coords = xformSys.GetWorldPosition(otherHuman);
+ xformSys.SetWorldPosition(human, coords);
// Test for components existing
Assert.Multiple(() =>
diff --git a/Content.Server/Anomaly/Effects/BluespaceAnomalySystem.cs b/Content.Server/Anomaly/Effects/BluespaceAnomalySystem.cs
index 87c0ba4a4e..dd2da82c9d 100644
--- a/Content.Server/Anomaly/Effects/BluespaceAnomalySystem.cs
+++ b/Content.Server/Anomaly/Effects/BluespaceAnomalySystem.cs
@@ -8,6 +8,7 @@ using Content.Shared.Mobs.Components;
using Content.Shared.Teleportation.Components;
using Robust.Shared.Audio;
using Robust.Shared.Audio.Systems;
+using Robust.Shared.Collections;
using Robust.Shared.Random;
namespace Content.Server.Anomaly.Effects;
@@ -35,20 +36,19 @@ public sealed class BluespaceAnomalySystem : EntitySystem
var range = component.MaxShuffleRadius * args.Severity;
var mobs = new HashSet>();
_lookup.GetEntitiesInRange(xform.Coordinates, range, mobs);
- var allEnts = new List(mobs.Select(m => m.Owner)) { uid };
- var coords = new List();
+ var allEnts = new ValueList(mobs.Select(m => m.Owner)) { uid };
+ var coords = new ValueList();
foreach (var ent in allEnts)
{
- if (xformQuery.TryGetComponent(ent, out var xf))
- coords.Add(xf.MapPosition.Position);
+ if (xformQuery.TryGetComponent(ent, out var allXform))
+ coords.Add(_xform.GetWorldPosition(allXform));
}
_random.Shuffle(coords);
for (var i = 0; i < allEnts.Count; i++)
{
-
_adminLogger.Add(LogType.Teleport, $"{ToPrettyString(allEnts[i])} has been shuffled to {coords[i]} by the {ToPrettyString(uid)} at {xform.Coordinates}");
- _xform.SetWorldPosition(allEnts[i], coords[i], xformQuery);
+ _xform.SetWorldPosition(allEnts[i], coords[i]);
}
}
diff --git a/Content.Shared/Disposal/SharedDisposalUnitSystem.cs b/Content.Shared/Disposal/SharedDisposalUnitSystem.cs
index 600036a891..9afd683cbd 100644
--- a/Content.Shared/Disposal/SharedDisposalUnitSystem.cs
+++ b/Content.Shared/Disposal/SharedDisposalUnitSystem.cs
@@ -127,9 +127,6 @@ public abstract class SharedDisposalUnitSystem : EntitySystem
return damageState != null && (!component.MobsCanEnter || _mobState.IsDead(entity, damageState));
}
- ///
- /// TODO: Proper prediction
- ///
public abstract void DoInsertDisposalUnit(EntityUid uid, EntityUid toInsert, EntityUid user, SharedDisposalUnitComponent? disposal = null);
[Serializable, NetSerializable]
diff --git a/Content.Shared/Storage/EntitySystems/DumpableSystem.cs b/Content.Shared/Storage/EntitySystems/DumpableSystem.cs
index 2b804cf732..8a8b636a67 100644
--- a/Content.Shared/Storage/EntitySystems/DumpableSystem.cs
+++ b/Content.Shared/Storage/EntitySystems/DumpableSystem.cs
@@ -19,17 +19,16 @@ public sealed class DumpableSystem : EntitySystem
[Dependency] private readonly IPrototypeManager _prototypeManager = default!;
[Dependency] private readonly IRobustRandom _random = default!;
[Dependency] private readonly SharedAudioSystem _audio = default!;
- [Dependency] private readonly SharedContainerSystem _container = default!;
[Dependency] private readonly SharedDisposalUnitSystem _disposalUnitSystem = default!;
[Dependency] private readonly SharedDoAfterSystem _doAfterSystem = default!;
[Dependency] private readonly SharedTransformSystem _transformSystem = default!;
- private EntityQuery _xformQuery;
+ private EntityQuery _itemQuery;
public override void Initialize()
{
base.Initialize();
- _xformQuery = GetEntityQuery();
+ _itemQuery = GetEntityQuery();
SubscribeLocalEvent(OnAfterInteract, after: new[]{ typeof(SharedEntityStorageSystem) });
SubscribeLocalEvent>(AddDumpVerb);
SubscribeLocalEvent>(AddUtilityVerbs);
@@ -111,7 +110,7 @@ public sealed class DumpableSystem : EntitySystem
}
}
- private void StartDoAfter(EntityUid storageUid, EntityUid? targetUid, EntityUid userUid, DumpableComponent dumpable)
+ private void StartDoAfter(EntityUid storageUid, EntityUid targetUid, EntityUid userUid, DumpableComponent dumpable)
{
if (!TryComp(storageUid, out var storage))
return;
@@ -120,7 +119,7 @@ public sealed class DumpableSystem : EntitySystem
foreach (var entity in storage.Container.ContainedEntities)
{
- if (!TryComp(entity, out var itemComp) ||
+ if (!_itemQuery.TryGetComponent(entity, out var itemComp) ||
!_prototypeManager.TryIndex(itemComp.Size, out var itemSize))
{
continue;
@@ -138,33 +137,16 @@ public sealed class DumpableSystem : EntitySystem
});
}
- private void OnDoAfter(EntityUid uid, DumpableComponent component, DoAfterEvent args)
+ private void OnDoAfter(EntityUid uid, DumpableComponent component, DumpableDoAfterEvent args)
{
- if (args.Handled || args.Cancelled || !TryComp(uid, out var storage))
+ if (args.Handled || args.Cancelled || !TryComp(uid, out var storage) || storage.Container.ContainedEntities.Count == 0)
return;
- Queue dumpQueue = new();
- foreach (var entity in storage.Container.ContainedEntities)
- {
- dumpQueue.Enqueue(entity);
- }
-
- if (dumpQueue.Count == 0)
- return;
-
- foreach (var entity in dumpQueue)
- {
- var transform = Transform(entity);
- _container.AttachParentToContainerOrGrid((entity, transform));
- _transformSystem.SetLocalPositionRotation(entity, transform.LocalPosition + _random.NextVector2Box() / 2, _random.NextAngle(), transform);
- }
-
- if (args.Args.Target == null)
- return;
+ var dumpQueue = new Queue(storage.Container.ContainedEntities);
var dumped = false;
- if (_disposalUnitSystem.HasDisposals(args.Args.Target.Value))
+ if (_disposalUnitSystem.HasDisposals(args.Args.Target))
{
dumped = true;
@@ -173,22 +155,31 @@ public sealed class DumpableSystem : EntitySystem
_disposalUnitSystem.DoInsertDisposalUnit(args.Args.Target.Value, entity, args.Args.User);
}
}
- else if (HasComp(args.Args.Target.Value))
+ else if (HasComp(args.Args.Target))
{
dumped = true;
- var targetPos = _xformQuery.GetComponent(args.Args.Target.Value).LocalPosition;
+ var targetPos = _transformSystem.GetWorldPosition(args.Args.Target.Value);
foreach (var entity in dumpQueue)
{
- _transformSystem.SetLocalPosition(entity, targetPos + _random.NextVector2Box() / 4);
+ _transformSystem.SetWorldPosition(entity, targetPos + _random.NextVector2Box() / 4);
+ }
+ }
+ else
+ {
+ var targetPos = _transformSystem.GetWorldPosition(uid);
+
+ foreach (var entity in dumpQueue)
+ {
+ var transform = Transform(entity);
+ _transformSystem.SetWorldPositionRotation(entity, targetPos + _random.NextVector2Box() / 4, _random.NextAngle(), transform);
}
}
if (dumped)
{
- // TODO: Predicted when above predicted
- _audio.PlayPvs(component.DumpSound, uid);
+ _audio.PlayPredicted(component.DumpSound, uid, args.User);
}
}
}
From a606909d30477453bc23765df4c78f04b2ead522 Mon Sep 17 00:00:00 2001
From: Crotalus
Date: Fri, 29 Mar 2024 07:30:50 +0100
Subject: [PATCH 17/22] Add auto modes to reagent grinder (#26290)
* Add auto-mode to reagent grinder
* Remove redundant stuff with DataField
* Use margin instead of dummy control
* Resolve grinder component
---
Content.Client/Kitchen/UI/GrinderMenu.xaml | 10 ++++++----
Content.Client/Kitchen/UI/GrinderMenu.xaml.cs | 14 ++++++++++++++
.../UI/ReagentGrinderBoundUserInterface.cs | 5 +++++
.../Components/ReagentGrinderComponent.cs | 15 +++++++++------
.../EntitySystems/ReagentGrinderSystem.cs | 19 +++++++++++++++++++
.../Kitchen/SharedReagentGrinder.cs | 18 +++++++++++++++++-
.../components/reagent-grinder-component.ftl | 3 +++
7 files changed, 73 insertions(+), 11 deletions(-)
diff --git a/Content.Client/Kitchen/UI/GrinderMenu.xaml b/Content.Client/Kitchen/UI/GrinderMenu.xaml
index b83128d004..dacddd0df6 100644
--- a/Content.Client/Kitchen/UI/GrinderMenu.xaml
+++ b/Content.Client/Kitchen/UI/GrinderMenu.xaml
@@ -3,10 +3,12 @@
xmlns:controls="clr-namespace:Content.Client.UserInterface.Controls"
Title="{Loc grinder-menu-title}" MinSize="768 256">
-
-
-
-
+
+
+
+
+
+
diff --git a/Content.Client/Kitchen/UI/GrinderMenu.xaml.cs b/Content.Client/Kitchen/UI/GrinderMenu.xaml.cs
index 6e4b7a7618..f97d8a7330 100644
--- a/Content.Client/Kitchen/UI/GrinderMenu.xaml.cs
+++ b/Content.Client/Kitchen/UI/GrinderMenu.xaml.cs
@@ -24,6 +24,7 @@ namespace Content.Client.Kitchen.UI
_entityManager = entityManager;
_prototypeManager = prototypeManager;
_owner = owner;
+ AutoModeButton.OnPressed += owner.ToggleAutoMode;
GrindButton.OnPressed += owner.StartGrinding;
JuiceButton.OnPressed += owner.StartJuicing;
ChamberContentBox.EjectButton.OnPressed += owner.EjectAll;
@@ -56,6 +57,19 @@ namespace Content.Client.Kitchen.UI
GrindButton.Disabled = !state.CanGrind || !state.Powered;
JuiceButton.Disabled = !state.CanJuice || !state.Powered;
+ switch (state.AutoMode)
+ {
+ case GrinderAutoMode.Grind:
+ AutoModeButton.Text = Loc.GetString("grinder-menu-grind-button");
+ break;
+ case GrinderAutoMode.Juice:
+ AutoModeButton.Text = Loc.GetString("grinder-menu-juice-button");
+ break;
+ default:
+ AutoModeButton.Text = Loc.GetString("grinder-menu-auto-button-off");
+ break;
+ }
+
// TODO move this to a component state and ensure the net ids.
RefreshContentsDisplay(state.ReagentQuantities, _entityManager.GetEntityArray(state.ChamberContents), state.HasBeakerIn);
}
diff --git a/Content.Client/Kitchen/UI/ReagentGrinderBoundUserInterface.cs b/Content.Client/Kitchen/UI/ReagentGrinderBoundUserInterface.cs
index 39b85c261b..e6f108b305 100644
--- a/Content.Client/Kitchen/UI/ReagentGrinderBoundUserInterface.cs
+++ b/Content.Client/Kitchen/UI/ReagentGrinderBoundUserInterface.cs
@@ -52,6 +52,11 @@ namespace Content.Client.Kitchen.UI
_menu?.HandleMessage(message);
}
+ public void ToggleAutoMode(BaseButton.ButtonEventArgs args)
+ {
+ SendMessage(new ReagentGrinderToggleAutoModeMessage());
+ }
+
public void StartGrinding(BaseButton.ButtonEventArgs? _ = null)
{
SendMessage(new ReagentGrinderStartMessage(GrinderProgram.Grind));
diff --git a/Content.Server/Kitchen/Components/ReagentGrinderComponent.cs b/Content.Server/Kitchen/Components/ReagentGrinderComponent.cs
index 27834aa573..5bbbe2dc8d 100644
--- a/Content.Server/Kitchen/Components/ReagentGrinderComponent.cs
+++ b/Content.Server/Kitchen/Components/ReagentGrinderComponent.cs
@@ -13,24 +13,27 @@ namespace Content.Server.Kitchen.Components
[Access(typeof(ReagentGrinderSystem)), RegisterComponent]
public sealed partial class ReagentGrinderComponent : Component
{
- [DataField, ViewVariables(VVAccess.ReadWrite)]
+ [DataField]
public int StorageMaxEntities = 6;
- [DataField("workTime"), ViewVariables(VVAccess.ReadWrite)]
+ [DataField]
public TimeSpan WorkTime = TimeSpan.FromSeconds(3.5); // Roughly matches the grind/juice sounds.
- [DataField, ViewVariables(VVAccess.ReadWrite)]
+ [DataField]
public float WorkTimeMultiplier = 1;
- [DataField("clickSound"), ViewVariables(VVAccess.ReadWrite)]
+ [DataField]
public SoundSpecifier ClickSound { get; set; } = new SoundPathSpecifier("/Audio/Machines/machine_switch.ogg");
- [DataField("grindSound"), ViewVariables(VVAccess.ReadWrite)]
+ [DataField]
public SoundSpecifier GrindSound { get; set; } = new SoundPathSpecifier("/Audio/Machines/blender.ogg");
- [DataField("juiceSound"), ViewVariables(VVAccess.ReadWrite)]
+ [DataField]
public SoundSpecifier JuiceSound { get; set; } = new SoundPathSpecifier("/Audio/Machines/juicer.ogg");
+ [DataField]
+ public GrinderAutoMode AutoMode = GrinderAutoMode.Off;
+
public EntityUid? AudioStream;
}
diff --git a/Content.Server/Kitchen/EntitySystems/ReagentGrinderSystem.cs b/Content.Server/Kitchen/EntitySystems/ReagentGrinderSystem.cs
index 07f8849b4a..e8ee453986 100644
--- a/Content.Server/Kitchen/EntitySystems/ReagentGrinderSystem.cs
+++ b/Content.Server/Kitchen/EntitySystems/ReagentGrinderSystem.cs
@@ -53,11 +53,19 @@ namespace Content.Server.Kitchen.EntitySystems
SubscribeLocalEvent(OnContainerModified);
SubscribeLocalEvent(OnEntRemoveAttempt);
+ SubscribeLocalEvent(OnToggleAutoModeMessage);
SubscribeLocalEvent(OnStartMessage);
SubscribeLocalEvent(OnEjectChamberAllMessage);
SubscribeLocalEvent(OnEjectChamberContentMessage);
}
+ private void OnToggleAutoModeMessage(Entity entity, ref ReagentGrinderToggleAutoModeMessage message)
+ {
+ entity.Comp.AutoMode = (GrinderAutoMode) (((byte) entity.Comp.AutoMode + 1) % Enum.GetValues(typeof(GrinderAutoMode)).Length);
+
+ UpdateUiState(entity);
+ }
+
public override void Update(float frameTime)
{
base.Update(frameTime);
@@ -148,6 +156,12 @@ namespace Content.Server.Kitchen.EntitySystems
var outputContainer = _itemSlotsSystem.GetItemOrNull(uid, SharedReagentGrinder.BeakerSlotId);
_appearanceSystem.SetData(uid, ReagentGrinderVisualState.BeakerAttached, outputContainer.HasValue);
+
+ if (reagentGrinder.AutoMode != GrinderAutoMode.Off && !HasComp(uid))
+ {
+ var program = reagentGrinder.AutoMode == GrinderAutoMode.Grind ? GrinderProgram.Grind : GrinderProgram.Juice;
+ DoWork(uid, reagentGrinder, program);
+ }
}
private void OnInteractUsing(Entity entity, ref InteractUsingEvent args)
@@ -185,6 +199,10 @@ namespace Content.Server.Kitchen.EntitySystems
private void UpdateUiState(EntityUid uid)
{
+ ReagentGrinderComponent? grinderComp = null;
+ if (!Resolve(uid, ref grinderComp))
+ return;
+
var inputContainer = _containerSystem.EnsureContainer(uid, SharedReagentGrinder.InputContainerId);
var outputContainer = _itemSlotsSystem.GetItemOrNull(uid, SharedReagentGrinder.BeakerSlotId);
Solution? containerSolution = null;
@@ -206,6 +224,7 @@ namespace Content.Server.Kitchen.EntitySystems
this.IsPowered(uid, EntityManager),
canJuice,
canGrind,
+ grinderComp.AutoMode,
GetNetEntityArray(inputContainer.ContainedEntities.ToArray()),
containerSolution?.Contents.ToArray()
);
diff --git a/Content.Shared/Kitchen/SharedReagentGrinder.cs b/Content.Shared/Kitchen/SharedReagentGrinder.cs
index f5d679c293..579db239c8 100644
--- a/Content.Shared/Kitchen/SharedReagentGrinder.cs
+++ b/Content.Shared/Kitchen/SharedReagentGrinder.cs
@@ -10,6 +10,12 @@ namespace Content.Shared.Kitchen
public static string InputContainerId = "inputContainer";
}
+ [Serializable, NetSerializable]
+ public sealed class ReagentGrinderToggleAutoModeMessage : BoundUserInterfaceMessage
+ {
+ public ReagentGrinderToggleAutoModeMessage() { }
+ }
+
[Serializable, NetSerializable]
public sealed class ReagentGrinderStartMessage : BoundUserInterfaceMessage
{
@@ -75,6 +81,13 @@ namespace Content.Shared.Kitchen
Key
}
+ public enum GrinderAutoMode : byte
+ {
+ Off,
+ Grind,
+ Juice
+ }
+
[NetSerializable, Serializable]
public sealed class ReagentGrinderInterfaceState : BoundUserInterfaceState
{
@@ -85,13 +98,16 @@ namespace Content.Shared.Kitchen
public bool CanGrind;
public NetEntity[] ChamberContents;
public ReagentQuantity[]? ReagentQuantities;
- public ReagentGrinderInterfaceState(bool isBusy, bool hasBeaker, bool powered, bool canJuice, bool canGrind, NetEntity[] chamberContents, ReagentQuantity[]? heldBeakerContents)
+ public GrinderAutoMode AutoMode;
+
+ public ReagentGrinderInterfaceState(bool isBusy, bool hasBeaker, bool powered, bool canJuice, bool canGrind, GrinderAutoMode autoMode, NetEntity[] chamberContents, ReagentQuantity[]? heldBeakerContents)
{
IsBusy = isBusy;
HasBeakerIn = hasBeaker;
Powered = powered;
CanJuice = canJuice;
CanGrind = canGrind;
+ AutoMode = autoMode;
ChamberContents = chamberContents;
ReagentQuantities = heldBeakerContents;
}
diff --git a/Resources/Locale/en-US/kitchen/components/reagent-grinder-component.ftl b/Resources/Locale/en-US/kitchen/components/reagent-grinder-component.ftl
index 30af6e9872..8a3ca9eef8 100644
--- a/Resources/Locale/en-US/kitchen/components/reagent-grinder-component.ftl
+++ b/Resources/Locale/en-US/kitchen/components/reagent-grinder-component.ftl
@@ -7,6 +7,9 @@ reagent-grinder-component-cannot-put-entity-message = You can't put this in the
grinder-menu-title = All-In-One Grinder 3000
grinder-menu-grind-button = Grind
grinder-menu-juice-button = Juice
+grinder-menu-auto-label = Auto mode
+grinder-menu-auto-button-off = Off
+grinder-menu-manual-label = Manual mode
grinder-menu-chamber-content-box-label = Chamber
grinder-menu-chamber-content-box-button = Eject Contents
grinder-menu-beaker-content-box-label = Beaker
From 12a384ff258a6690b532532f432258ce8e915897 Mon Sep 17 00:00:00 2001
From: PJBot
Date: Fri, 29 Mar 2024 06:31:56 +0000
Subject: [PATCH 18/22] Automatic changelog update
---
Resources/Changelog/Changelog.yml | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/Resources/Changelog/Changelog.yml b/Resources/Changelog/Changelog.yml
index 9a0b1e9f81..5e5c44dd72 100644
--- a/Resources/Changelog/Changelog.yml
+++ b/Resources/Changelog/Changelog.yml
@@ -1,11 +1,4 @@
Entries:
-- author: Drayff
- changes:
- - message: Animations for ToolBoxes!
- type: Add
- id: 5750
- time: '2024-01-20T02:29:13.0000000+00:00'
- url: https://api.github.com/repos/space-wizards/space-station-14/pulls/24305
- author: Agoichi
changes:
- message: Rebalanced Lobbying Bundle
@@ -3793,3 +3786,10 @@
id: 6249
time: '2024-03-29T06:13:52.0000000+00:00'
url: https://github.com/space-wizards/space-station-14/pull/26269
+- author: Crotalus
+ changes:
+ - message: Reagent grinder auto-modes
+ type: Add
+ id: 6250
+ time: '2024-03-29T06:30:51.0000000+00:00'
+ url: https://github.com/space-wizards/space-station-14/pull/26290
From 06b14f30cd9267abcb135e6031a273905cf1ba40 Mon Sep 17 00:00:00 2001
From: keronshb <54602815+keronshb@users.noreply.github.com>
Date: Fri, 29 Mar 2024 02:41:09 -0400
Subject: [PATCH 19/22] Change Polymorph Actions to use Polymorph Proto Id
(#26419)
* polymorph changes
Adds poly proto ids to polymorph action event and checks for proto id when performing
* nullable proto id
* Replaces instances of Polymorph prototype with a proto id and tryindex
* birdup
---------
Co-authored-by: metalgearsloth
---
.../Polymorph/Systems/PolymorphSystem.cs | 11 ++++++++---
.../Polymorph/Toolshed/PolymorphCommand.cs | 14 +++++++++-----
Content.Shared/Polymorph/PolymorphActions.cs | 12 +++++++-----
3 files changed, 24 insertions(+), 13 deletions(-)
diff --git a/Content.Server/Polymorph/Systems/PolymorphSystem.cs b/Content.Server/Polymorph/Systems/PolymorphSystem.cs
index 5fe29dcd30..b7640ff984 100644
--- a/Content.Server/Polymorph/Systems/PolymorphSystem.cs
+++ b/Content.Server/Polymorph/Systems/PolymorphSystem.cs
@@ -118,7 +118,10 @@ public sealed partial class PolymorphSystem : EntitySystem
private void OnPolymorphActionEvent(Entity ent, ref PolymorphActionEvent args)
{
- PolymorphEntity(ent, args.Prototype.Configuration);
+ if (!_proto.TryIndex(args.ProtoId, out var prototype))
+ return;
+
+ PolymorphEntity(ent, prototype.Configuration);
}
private void OnRevertPolymorphActionEvent(Entity ent,
@@ -348,7 +351,9 @@ public sealed partial class PolymorphSystem : EntitySystem
if (target.Comp.PolymorphActions.ContainsKey(id))
return;
- var polyProto = _proto.Index(id);
+ if (!_proto.TryIndex(id, out var polyProto))
+ return;
+
var entProto = _proto.Index(polyProto.Configuration.Entity);
EntityUid? actionId = default!;
@@ -366,7 +371,7 @@ public sealed partial class PolymorphSystem : EntitySystem
baseAction.Icon = new SpriteSpecifier.EntityPrototype(polyProto.Configuration.Entity);
if (baseAction is InstantActionComponent action)
- action.Event = new PolymorphActionEvent(prototype: polyProto);
+ action.Event = new PolymorphActionEvent(id);
}
public void RemovePolymorphAction(ProtoId id, Entity target)
diff --git a/Content.Server/Polymorph/Toolshed/PolymorphCommand.cs b/Content.Server/Polymorph/Toolshed/PolymorphCommand.cs
index f741c24571..5654c84722 100644
--- a/Content.Server/Polymorph/Toolshed/PolymorphCommand.cs
+++ b/Content.Server/Polymorph/Toolshed/PolymorphCommand.cs
@@ -3,8 +3,8 @@ using Content.Server.Administration;
using Content.Server.Polymorph.Systems;
using Content.Shared.Administration;
using Content.Shared.Polymorph;
+using Robust.Shared.Prototypes;
using Robust.Shared.Toolshed;
-using Robust.Shared.Toolshed.TypeParsers;
namespace Content.Server.Polymorph.Toolshed;
@@ -15,22 +15,26 @@ namespace Content.Server.Polymorph.Toolshed;
public sealed class PolymorphCommand : ToolshedCommand
{
private PolymorphSystem? _system;
+ [Dependency] private IPrototypeManager _proto = default!;
[CommandImplementation]
public EntityUid? Polymorph(
[PipedArgument] EntityUid input,
- [CommandArgument] Prototype prototype
+ [CommandArgument] ProtoId protoId
)
{
_system ??= GetSys();
- return _system.PolymorphEntity(input, prototype.Value.Configuration);
+ if (!_proto.TryIndex(protoId, out var prototype))
+ return null;
+
+ return _system.PolymorphEntity(input, prototype.Configuration);
}
[CommandImplementation]
public IEnumerable Polymorph(
[PipedArgument] IEnumerable input,
- [CommandArgument] Prototype prototype
+ [CommandArgument] ProtoId protoId
)
- => input.Select(x => Polymorph(x, prototype)).Where(x => x is not null).Select(x => (EntityUid)x!);
+ => input.Select(x => Polymorph(x, protoId)).Where(x => x is not null).Select(x => (EntityUid)x!);
}
diff --git a/Content.Shared/Polymorph/PolymorphActions.cs b/Content.Shared/Polymorph/PolymorphActions.cs
index 0f230868f0..13e00f55e2 100644
--- a/Content.Shared/Polymorph/PolymorphActions.cs
+++ b/Content.Shared/Polymorph/PolymorphActions.cs
@@ -1,18 +1,20 @@
using Content.Shared.Actions;
+using Robust.Shared.Prototypes;
namespace Content.Shared.Polymorph;
public sealed partial class PolymorphActionEvent : InstantActionEvent
{
///
- /// The polymorph prototype containing all the information about
- /// the specific polymorph.
+ /// The polymorph proto id, containing all the information about
+ /// the specific polymorph.
///
- public PolymorphPrototype Prototype = default!;
+ [DataField]
+ public ProtoId? ProtoId;
- public PolymorphActionEvent(PolymorphPrototype prototype) : this()
+ public PolymorphActionEvent(ProtoId protoId) : this()
{
- Prototype = prototype;
+ ProtoId = protoId;
}
}
From 19caf1d9d3b7c1ea51ea8ee4d891ce07742176b9 Mon Sep 17 00:00:00 2001
From: Adrian16199 <144424013+Adrian16199@users.noreply.github.com>
Date: Fri, 29 Mar 2024 07:48:42 +0100
Subject: [PATCH 20/22] Increases minimum player requirement for nuclear
operatives. (#26474)
As the title says.
---
Resources/Prototypes/GameRules/roundstart.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Resources/Prototypes/GameRules/roundstart.yml b/Resources/Prototypes/GameRules/roundstart.yml
index a836faf500..21ad1310de 100644
--- a/Resources/Prototypes/GameRules/roundstart.yml
+++ b/Resources/Prototypes/GameRules/roundstart.yml
@@ -69,7 +69,7 @@
noSpawn: true
components:
- type: GameRule
- minPlayers: 20
+ minPlayers: 35
- type: NukeopsRule
faction: Syndicate
From 4cd2fbd076ac09d93e5258bf2b822360c77d1ea1 Mon Sep 17 00:00:00 2001
From: Tayrtahn
Date: Fri, 29 Mar 2024 05:00:09 -0400
Subject: [PATCH 21/22] Add prediction to Spill Container verb, add dummy
TrySpill methods to shared (#25813)
* Moved abstract spill methods to shared; added prediction to spill container verb.
* Rerun tests
* Requested changes
* Note Client behavior in Spill method docs
---
Content.Client/Fluids/PuddleSystem.cs | 38 +++++++++++-
.../Components/PreventSpillerComponent.cs | 7 ---
.../EntitySystems/PuddleSystem.Spillable.cs | 62 +------------------
.../Fluids/EntitySystems/PuddleSystem.cs | 27 +++-----
.../Components/PreventSpillerComponent.cs | 12 ++++
.../Fluids/Components/SpillableComponent.cs | 6 ++
.../Fluids/SharedPuddleSystem.Spillable.cs | 60 ++++++++++++++++++
Content.Shared/Fluids/SharedPuddleSystem.cs | 53 ++++++++++++++++
8 files changed, 178 insertions(+), 87 deletions(-)
delete mode 100644 Content.Server/Fluids/Components/PreventSpillerComponent.cs
create mode 100644 Content.Shared/Fluids/Components/PreventSpillerComponent.cs
diff --git a/Content.Client/Fluids/PuddleSystem.cs b/Content.Client/Fluids/PuddleSystem.cs
index 54b1d5b86b..5dbffe0fd2 100644
--- a/Content.Client/Fluids/PuddleSystem.cs
+++ b/Content.Client/Fluids/PuddleSystem.cs
@@ -1,7 +1,9 @@
using Content.Client.IconSmoothing;
+using Content.Shared.Chemistry.Components;
using Content.Shared.Fluids;
using Content.Shared.Fluids.Components;
using Robust.Client.GameObjects;
+using Robust.Shared.Map;
namespace Content.Client.Fluids;
@@ -21,7 +23,7 @@ public sealed class PuddleSystem : SharedPuddleSystem
if (args.Sprite == null)
return;
- float volume = 1f;
+ var volume = 1f;
if (args.AppearanceData.TryGetValue(PuddleVisuals.CurrentVolume, out var volumeObj))
{
@@ -64,4 +66,38 @@ public sealed class PuddleSystem : SharedPuddleSystem
args.Sprite.Color *= baseColor;
}
}
+
+ #region Spill
+
+ // Maybe someday we'll have clientside prediction for entity spawning, but not today.
+ // Until then, these methods do nothing on the client.
+ ///
+ public override bool TrySplashSpillAt(EntityUid uid, EntityCoordinates coordinates, Solution solution, out EntityUid puddleUid, bool sound = true, EntityUid? user = null)
+ {
+ puddleUid = EntityUid.Invalid;
+ return false;
+ }
+
+ ///
+ public override bool TrySpillAt(EntityCoordinates coordinates, Solution solution, out EntityUid puddleUid, bool sound = true)
+ {
+ puddleUid = EntityUid.Invalid;
+ return false;
+ }
+
+ ///
+ public override bool TrySpillAt(EntityUid uid, Solution solution, out EntityUid puddleUid, bool sound = true, TransformComponent? transformComponent = null)
+ {
+ puddleUid = EntityUid.Invalid;
+ return false;
+ }
+
+ ///
+ public override bool TrySpillAt(TileRef tileRef, Solution solution, out EntityUid puddleUid, bool sound = true, bool tileReact = true)
+ {
+ puddleUid = EntityUid.Invalid;
+ return false;
+ }
+
+ #endregion Spill
}
diff --git a/Content.Server/Fluids/Components/PreventSpillerComponent.cs b/Content.Server/Fluids/Components/PreventSpillerComponent.cs
deleted file mode 100644
index 37096f1bb3..0000000000
--- a/Content.Server/Fluids/Components/PreventSpillerComponent.cs
+++ /dev/null
@@ -1,7 +0,0 @@
-namespace Content.Server.Fluids.Components;
-
-[RegisterComponent]
-public sealed partial class PreventSpillerComponent : Component
-{
-
-}
diff --git a/Content.Server/Fluids/EntitySystems/PuddleSystem.Spillable.cs b/Content.Server/Fluids/EntitySystems/PuddleSystem.Spillable.cs
index efaca271d3..ce5b5b3637 100644
--- a/Content.Server/Fluids/EntitySystems/PuddleSystem.Spillable.cs
+++ b/Content.Server/Fluids/EntitySystems/PuddleSystem.Spillable.cs
@@ -1,5 +1,4 @@
using Content.Server.Chemistry.Containers.EntitySystems;
-using Content.Server.Fluids.Components;
using Content.Server.Nutrition.EntitySystems;
using Content.Shared.Chemistry.Components;
using Content.Shared.Chemistry.EntitySystems;
@@ -8,7 +7,6 @@ using Content.Shared.Chemistry.Reagent;
using Content.Shared.Clothing.Components;
using Content.Shared.CombatMode.Pacification;
using Content.Shared.Database;
-using Content.Shared.DoAfter;
using Content.Shared.FixedPoint;
using Content.Shared.Fluids.Components;
using Content.Shared.IdentityManagement;
@@ -16,7 +14,6 @@ using Content.Shared.Inventory.Events;
using Content.Shared.Popups;
using Content.Shared.Spillable;
using Content.Shared.Throwing;
-using Content.Shared.Verbs;
using Content.Shared.Weapons.Melee.Events;
using Robust.Shared.Player;
@@ -24,9 +21,6 @@ namespace Content.Server.Fluids.EntitySystems;
public sealed partial class PuddleSystem
{
- [Dependency] private readonly OpenableSystem _openable = default!;
- [Dependency] private readonly IEntityManager _entityManager = default!;
-
protected override void InitializeSpillable()
{
base.InitializeSpillable();
@@ -34,7 +28,6 @@ public sealed partial class PuddleSystem
SubscribeLocalEvent(SpillOnLand);
// Openable handles the event if it's closed
SubscribeLocalEvent(SplashOnMeleeHit, after: [typeof(OpenableSystem)]);
- SubscribeLocalEvent>(AddSpillVerb);
SubscribeLocalEvent(OnGotEquipped);
SubscribeLocalEvent(OnOverflow);
SubscribeLocalEvent(OnDoAfter);
@@ -134,7 +127,7 @@ public sealed partial class PuddleSystem
if (!_solutionContainerSystem.TryGetSolution(entity.Owner, entity.Comp.SolutionName, out var soln, out var solution))
return;
- if (_openable.IsClosed(entity.Owner))
+ if (Openable.IsClosed(entity.Owner))
return;
if (args.User != null)
@@ -153,7 +146,7 @@ public sealed partial class PuddleSystem
private void OnAttemptPacifiedThrow(Entity ent, ref AttemptPacifiedThrowEvent args)
{
// Don’t care about closed containers.
- if (_openable.IsClosed(ent))
+ if (Openable.IsClosed(ent))
return;
// Don’t care about empty containers.
@@ -163,57 +156,6 @@ public sealed partial class PuddleSystem
args.Cancel("pacified-cannot-throw-spill");
}
- private void AddSpillVerb(Entity entity, ref GetVerbsEvent args)
- {
- if (!args.CanAccess || !args.CanInteract)
- return;
-
- if (!_solutionContainerSystem.TryGetSolution(args.Target, entity.Comp.SolutionName, out var soln, out var solution))
- return;
-
- if (_openable.IsClosed(args.Target))
- return;
-
- if (solution.Volume == FixedPoint2.Zero)
- return;
-
- if (_entityManager.HasComponent(args.User))
- return;
-
-
- Verb verb = new()
- {
- Text = Loc.GetString("spill-target-verb-get-data-text")
- };
-
- // TODO VERB ICONS spill icon? pouring out a glass/beaker?
- if (entity.Comp.SpillDelay == null)
- {
- var target = args.Target;
- verb.Act = () =>
- {
- var puddleSolution = _solutionContainerSystem.SplitSolution(soln.Value, solution.Volume);
- TrySpillAt(Transform(target).Coordinates, puddleSolution, out _);
- };
- }
- else
- {
- var user = args.User;
- verb.Act = () =>
- {
- _doAfterSystem.TryStartDoAfter(new DoAfterArgs(EntityManager, user, entity.Comp.SpillDelay ?? 0, new SpillDoAfterEvent(), entity.Owner, target: entity.Owner)
- {
- BreakOnDamage = true,
- BreakOnMove = true,
- NeedHand = true,
- });
- };
- }
- verb.Impact = LogImpact.Medium; // dangerous reagent reaction are logged separately.
- verb.DoContactInteraction = true;
- args.Verbs.Add(verb);
- }
-
private void OnDoAfter(Entity entity, ref SpillDoAfterEvent args)
{
if (args.Handled || args.Cancelled || args.Args.Target == null)
diff --git a/Content.Server/Fluids/EntitySystems/PuddleSystem.cs b/Content.Server/Fluids/EntitySystems/PuddleSystem.cs
index e3481f98da..923210cc73 100644
--- a/Content.Server/Fluids/EntitySystems/PuddleSystem.cs
+++ b/Content.Server/Fluids/EntitySystems/PuddleSystem.cs
@@ -46,7 +46,6 @@ public sealed partial class PuddleSystem : SharedPuddleSystem
[Dependency] private readonly IRobustRandom _random = default!;
[Dependency] private readonly ITileDefinitionManager _tileDefMan = default!;
[Dependency] private readonly AudioSystem _audio = default!;
- [Dependency] private readonly DoAfterSystem _doAfterSystem = default!;
[Dependency] private readonly EntityLookupSystem _lookup = default!;
[Dependency] private readonly ReactiveSystem _reactive = default!;
[Dependency] private readonly SharedAppearanceSystem _appearance = default!;
@@ -551,11 +550,8 @@ public sealed partial class PuddleSystem : SharedPuddleSystem
#region Spill
- ///
- /// First splashes reagent on reactive entities near the spilling entity, then spills the rest regularly to a
- /// puddle. This is intended for 'destructive' spills, like when entities are destroyed or thrown.
- ///
- public bool TrySplashSpillAt(EntityUid uid,
+ ///
+ public override bool TrySplashSpillAt(EntityUid uid,
EntityCoordinates coordinates,
Solution solution,
out EntityUid puddleUid,
@@ -600,11 +596,8 @@ public sealed partial class PuddleSystem : SharedPuddleSystem
return TrySpillAt(coordinates, solution, out puddleUid, sound);
}
- ///
- /// Spills solution at the specified coordinates.
- /// Will add to an existing puddle if present or create a new one if not.
- ///
- public bool TrySpillAt(EntityCoordinates coordinates, Solution solution, out EntityUid puddleUid, bool sound = true)
+ ///
+ public override bool TrySpillAt(EntityCoordinates coordinates, Solution solution, out EntityUid puddleUid, bool sound = true)
{
if (solution.Volume == 0)
{
@@ -622,10 +615,8 @@ public sealed partial class PuddleSystem : SharedPuddleSystem
return TrySpillAt(_map.GetTileRef(gridUid.Value, mapGrid, coordinates), solution, out puddleUid, sound);
}
- ///
- ///
- ///
- public bool TrySpillAt(EntityUid uid, Solution solution, out EntityUid puddleUid, bool sound = true,
+ ///
+ public override bool TrySpillAt(EntityUid uid, Solution solution, out EntityUid puddleUid, bool sound = true,
TransformComponent? transformComponent = null)
{
if (!Resolve(uid, ref transformComponent, false))
@@ -637,10 +628,8 @@ public sealed partial class PuddleSystem : SharedPuddleSystem
return TrySpillAt(transformComponent.Coordinates, solution, out puddleUid, sound: sound);
}
- ///
- ///
- ///
- public bool TrySpillAt(TileRef tileRef, Solution solution, out EntityUid puddleUid, bool sound = true,
+ ///
+ public override bool TrySpillAt(TileRef tileRef, Solution solution, out EntityUid puddleUid, bool sound = true,
bool tileReact = true)
{
if (solution.Volume <= 0)
diff --git a/Content.Shared/Fluids/Components/PreventSpillerComponent.cs b/Content.Shared/Fluids/Components/PreventSpillerComponent.cs
new file mode 100644
index 0000000000..e396d9faf5
--- /dev/null
+++ b/Content.Shared/Fluids/Components/PreventSpillerComponent.cs
@@ -0,0 +1,12 @@
+using Robust.Shared.GameStates;
+
+namespace Content.Shared.Fluids.Components;
+
+///
+/// Blocks this entity's ability to spill solution containing entities via the verb menu.
+///
+[RegisterComponent, NetworkedComponent]
+public sealed partial class PreventSpillerComponent : Component
+{
+
+}
diff --git a/Content.Shared/Fluids/Components/SpillableComponent.cs b/Content.Shared/Fluids/Components/SpillableComponent.cs
index a1b5fa17eb..428d91f2de 100644
--- a/Content.Shared/Fluids/Components/SpillableComponent.cs
+++ b/Content.Shared/Fluids/Components/SpillableComponent.cs
@@ -2,6 +2,12 @@ using Content.Shared.FixedPoint;
namespace Content.Shared.Fluids.Components;
+///
+/// Makes a solution contained in this entity spillable.
+/// Spills can occur when a container with this component overflows,
+/// is used to melee attack something, is equipped (see ),
+/// lands after being thrown, or has the Spill verb used.
+///
[RegisterComponent]
public sealed partial class SpillableComponent : Component
{
diff --git a/Content.Shared/Fluids/SharedPuddleSystem.Spillable.cs b/Content.Shared/Fluids/SharedPuddleSystem.Spillable.cs
index 77730e5afc..1e9e742a38 100644
--- a/Content.Shared/Fluids/SharedPuddleSystem.Spillable.cs
+++ b/Content.Shared/Fluids/SharedPuddleSystem.Spillable.cs
@@ -1,14 +1,23 @@
+using Content.Shared.Database;
+using Content.Shared.DoAfter;
using Content.Shared.Examine;
+using Content.Shared.FixedPoint;
using Content.Shared.Fluids.Components;
+using Content.Shared.Nutrition.EntitySystems;
+using Content.Shared.Spillable;
+using Content.Shared.Verbs;
using Content.Shared.Weapons.Melee;
namespace Content.Shared.Fluids;
public abstract partial class SharedPuddleSystem
{
+ [Dependency] protected readonly SharedOpenableSystem Openable = default!;
+
protected virtual void InitializeSpillable()
{
SubscribeLocalEvent(OnExamined);
+ SubscribeLocalEvent>(AddSpillVerb);
}
private void OnExamined(Entity entity, ref ExaminedEvent args)
@@ -21,4 +30,55 @@ public abstract partial class SharedPuddleSystem
args.PushMarkup(Loc.GetString("spill-examine-spillable-weapon"));
}
}
+
+ private void AddSpillVerb(Entity entity, ref GetVerbsEvent args)
+ {
+ if (!args.CanAccess || !args.CanInteract)
+ return;
+
+ if (!_solutionContainerSystem.TryGetSolution(args.Target, entity.Comp.SolutionName, out var soln, out var solution))
+ return;
+
+ if (Openable.IsClosed(args.Target))
+ return;
+
+ if (solution.Volume == FixedPoint2.Zero)
+ return;
+
+ if (HasComp(args.User))
+ return;
+
+
+ Verb verb = new()
+ {
+ Text = Loc.GetString("spill-target-verb-get-data-text")
+ };
+
+ // TODO VERB ICONS spill icon? pouring out a glass/beaker?
+ if (entity.Comp.SpillDelay == null)
+ {
+ var target = args.Target;
+ verb.Act = () =>
+ {
+ var puddleSolution = _solutionContainerSystem.SplitSolution(soln.Value, solution.Volume);
+ TrySpillAt(Transform(target).Coordinates, puddleSolution, out _);
+ };
+ }
+ else
+ {
+ var user = args.User;
+ verb.Act = () =>
+ {
+ _doAfterSystem.TryStartDoAfter(new DoAfterArgs(EntityManager, user, entity.Comp.SpillDelay ?? 0, new SpillDoAfterEvent(), entity.Owner, target: entity.Owner)
+ {
+ BreakOnDamage = true,
+ BreakOnMove = true,
+ NeedHand = true,
+ });
+ };
+ }
+ verb.Impact = LogImpact.Medium; // dangerous reagent reaction are logged separately.
+ verb.DoContactInteraction = true;
+ args.Verbs.Add(verb);
+ }
}
diff --git a/Content.Shared/Fluids/SharedPuddleSystem.cs b/Content.Shared/Fluids/SharedPuddleSystem.cs
index e4bd61baa8..f573c042c5 100644
--- a/Content.Shared/Fluids/SharedPuddleSystem.cs
+++ b/Content.Shared/Fluids/SharedPuddleSystem.cs
@@ -1,12 +1,14 @@
using Content.Shared.Chemistry.Components;
using Content.Shared.Chemistry.EntitySystems;
using Content.Shared.Chemistry.Reagent;
+using Content.Shared.DoAfter;
using Content.Shared.DragDrop;
using Content.Shared.Examine;
using Content.Shared.FixedPoint;
using Content.Shared.Fluids.Components;
using Content.Shared.Movement.Events;
using Content.Shared.StepTrigger.Components;
+using Robust.Shared.Map;
using Robust.Shared.Prototypes;
namespace Content.Shared.Fluids;
@@ -15,6 +17,7 @@ public abstract partial class SharedPuddleSystem : EntitySystem
{
[Dependency] private readonly IPrototypeManager _prototypeManager = default!;
[Dependency] private readonly SharedSolutionContainerSystem _solutionContainerSystem = default!;
+ [Dependency] private readonly SharedDoAfterSystem _doAfterSystem = default!;
///
/// The lowest threshold to be considered for puddle sprite states as well as slipperiness of a puddle.
@@ -106,4 +109,54 @@ public abstract partial class SharedPuddleSystem : EntitySystem
args.PushMarkup(Loc.GetString("puddle-component-examine-evaporating-no"));
}
}
+
+ #region Spill
+ // These methods are in Shared to make it easier to interact with PuddleSystem in Shared code.
+ // Note that they always fail when run on the client, not creating a puddle and returning false.
+ // Adding proper prediction to this system would require spawning temporary puddle entities on the
+ // client and replacing or merging them with the ones spawned by the server when the client goes to
+ // replicate those, and I am not enough of a wizard to attempt implementing that.
+
+ ///
+ /// First splashes reagent on reactive entities near the spilling entity, then spills the rest regularly to a
+ /// puddle. This is intended for 'destructive' spills, like when entities are destroyed or thrown.
+ ///
+ ///
+ /// On the client, this will always set to and return false.
+ ///
+ public abstract bool TrySplashSpillAt(EntityUid uid,
+ EntityCoordinates coordinates,
+ Solution solution,
+ out EntityUid puddleUid,
+ bool sound = true,
+ EntityUid? user = null);
+
+ ///
+ /// Spills solution at the specified coordinates.
+ /// Will add to an existing puddle if present or create a new one if not.
+ ///
+ ///
+ /// On the client, this will always set to and return false.
+ ///
+ public abstract bool TrySpillAt(EntityCoordinates coordinates, Solution solution, out EntityUid puddleUid, bool sound = true);
+
+ ///
+ ///
+ ///
+ ///
+ /// On the client, this will always set to and return false.
+ ///
+ public abstract bool TrySpillAt(EntityUid uid, Solution solution, out EntityUid puddleUid, bool sound = true,
+ TransformComponent? transformComponent = null);
+
+ ///
+ ///
+ ///
+ ///
+ /// On the client, this will always set to and return false.
+ ///
+ public abstract bool TrySpillAt(TileRef tileRef, Solution solution, out EntityUid puddleUid, bool sound = true,
+ bool tileReact = true);
+
+ #endregion Spill
}
From 28d05feea729485e934b488b8508f8f1f0d546ee Mon Sep 17 00:00:00 2001
From: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
Date: Sat, 30 Mar 2024 03:03:01 +1100
Subject: [PATCH 22/22] Fix disposals test (#26535)
The rounding at 0,0 got memed.
---
.../Tests/Disposal/DisposalUnitTest.cs | 19 ++++++++++---------
1 file changed, 10 insertions(+), 9 deletions(-)
diff --git a/Content.IntegrationTests/Tests/Disposal/DisposalUnitTest.cs b/Content.IntegrationTests/Tests/Disposal/DisposalUnitTest.cs
index 976fc2eceb..9109fdbe4f 100644
--- a/Content.IntegrationTests/Tests/Disposal/DisposalUnitTest.cs
+++ b/Content.IntegrationTests/Tests/Disposal/DisposalUnitTest.cs
@@ -163,7 +163,6 @@ namespace Content.IntegrationTests.Tests.Disposal
var entityManager = server.ResolveDependency();
var xformSystem = entityManager.System();
var disposalSystem = entityManager.System();
-
await server.WaitAssertion(() =>
{
// Spawn the entities
@@ -171,8 +170,7 @@ namespace Content.IntegrationTests.Tests.Disposal
human = entityManager.SpawnEntity("HumanDisposalDummy", coordinates);
wrench = entityManager.SpawnEntity("WrenchDummy", coordinates);
disposalUnit = entityManager.SpawnEntity("DisposalUnitDummy", coordinates);
- disposalTrunk = entityManager.SpawnEntity("DisposalTrunkDummy",
- entityManager.GetComponent(disposalUnit).MapPosition);
+ disposalTrunk = entityManager.SpawnEntity("DisposalTrunkDummy", coordinates);
// Test for components existing
unitUid = disposalUnit;
@@ -204,10 +202,10 @@ namespace Content.IntegrationTests.Tests.Disposal
await server.WaitAssertion(() =>
{
- // Move the disposal trunk away
- var xform = entityManager.GetComponent(disposalTrunk);
var worldPos = xformSystem.GetWorldPosition(disposalTrunk);
- xformSystem.SetWorldPosition(xform, worldPos + new Vector2(1, 0));
+
+ // Move the disposal trunk away
+ xformSystem.SetWorldPosition(disposalTrunk, worldPos + new Vector2(1, 0));
// Fail to flush with a mob and an item
Flush(disposalUnit, unitComponent, false, disposalSystem, human, wrench);
@@ -215,10 +213,12 @@ namespace Content.IntegrationTests.Tests.Disposal
await server.WaitAssertion(() =>
{
- // Move the disposal trunk back
var xform = entityManager.GetComponent(disposalTrunk);
- var worldPos = xformSystem.GetWorldPosition(disposalTrunk);
- xformSystem.SetWorldPosition(xform, worldPos - new Vector2(1, 0));
+ var worldPos = xformSystem.GetWorldPosition(disposalUnit);
+
+ // Move the disposal trunk back
+ xformSystem.SetWorldPosition(disposalTrunk, worldPos);
+ xformSystem.AnchorEntity((disposalTrunk, xform));
// Fail to flush with a mob and an item, no power
Flush(disposalUnit, unitComponent, false, disposalSystem, human, wrench);
@@ -240,6 +240,7 @@ namespace Content.IntegrationTests.Tests.Disposal
// Re-pressurizing
Flush(disposalUnit, unitComponent, false, disposalSystem);
});
+
await pair.CleanReturnAsync();
}
}