]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Fix clientside storage Whitelists (#24063)
authorMagnus Larsen <i.am.larsenml@gmail.com>
Thu, 1 Feb 2024 13:33:57 +0000 (13:33 +0000)
committerGitHub <noreply@github.com>
Thu, 1 Feb 2024 13:33:57 +0000 (00:33 +1100)
* Fix outdated component name in assaultbelt whitelist

RangedMagazine was replaced with BallisticAmmoProvider in the Gun
refactor (#8301)

* Move FlashOnTrigger, SmokeOnTrigger, Flash components to Shared

* Move LightReplacerComponent to Shared

* Move Utensil, Mousetrap components to Shared

* Move SprayPainterComponent to Shared

The PaintableAirlock tag has also been removed, as it was unused &
unnecessary, likely a vestige of spray painter development when the
PaintableAirlock component wasn't in Content.Shared.

* Add trivial Produce and Seed components to Client

This allows the plant bag and botanical belt whitelists to correctly
match produce and seeds on the client, fixing the extraneous "Can't
insert" message that previously appeared.

---------

Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
30 files changed:
Content.Client/Botany/Components/ProduceComponent.cs [new file with mode: 0644]
Content.Client/Botany/Components/SeedComponent.cs [new file with mode: 0644]
Content.Server/Botany/Components/ProduceComponent.cs
Content.Server/Botany/Components/SeedComponent.cs
Content.Server/Explosion/EntitySystems/ClusterGrenadeSystem.cs
Content.Server/Explosion/EntitySystems/SmokeOnTriggerSystem.cs
Content.Server/Flash/FlashSystem.cs
Content.Server/Light/EntitySystems/LightReplacerSystem.cs
Content.Server/Nutrition/Components/FoodComponent.cs
Content.Server/Nutrition/EntitySystems/FoodSystem.cs
Content.Server/Nutrition/EntitySystems/SliceableFoodSystem.cs
Content.Server/Nutrition/EntitySystems/UtensilSystem.cs
Content.Server/SprayPainter/SprayPainterSystem.cs
Content.Shared/Botany/Components/SharedProduceComponent.cs [new file with mode: 0644]
Content.Shared/Botany/Components/SharedSeedComponent.cs [new file with mode: 0644]
Content.Shared/Explosion/Components/OnTrigger/SmokeOnTriggerComponent.cs
Content.Shared/Explosion/EntitySystems/SharedSmokeOnTriggerSystem.cs
Content.Shared/Flash/Components/FlashOnTriggerComponent.cs
Content.Shared/Light/Components/LightReplacerComponent.cs [moved from Content.Server/Light/Components/LightReplacerComponent.cs with 84% similarity]
Content.Shared/Light/EntitySystems/SharedLightReplacerSystem.cs [new file with mode: 0644]
Content.Shared/Mousetrap/MousetrapComponent.cs [moved from Content.Server/Mousetrap/MousetrapComponent.cs with 74% similarity]
Content.Shared/Nutrition/Components/UtensilComponent.cs [moved from Content.Server/Nutrition/Components/UtensilComponent.cs with 85% similarity]
Content.Shared/Nutrition/EntitySystems/SharedUtensilSystem.cs [new file with mode: 0644]
Content.Shared/SprayPainter/Components/SprayPainterComponent.cs [moved from Content.Server/SprayPainter/SprayPainterComponent.cs with 84% similarity]
Resources/Prototypes/Entities/Clothing/Belt/belts.yml
Resources/Prototypes/Entities/Objects/Specific/Janitorial/janitor.yml
Resources/Prototypes/Entities/Objects/Tools/light_replacer.yml
Resources/Prototypes/Entities/Objects/Tools/spray_painter.yml
Resources/Prototypes/Entities/Objects/Weapons/security.yml
Resources/Prototypes/tags.yml

diff --git a/Content.Client/Botany/Components/ProduceComponent.cs b/Content.Client/Botany/Components/ProduceComponent.cs
new file mode 100644 (file)
index 0000000..68857da
--- /dev/null
@@ -0,0 +1,8 @@
+using Content.Shared.Botany.Components;
+
+namespace Content.Client.Botany.Components;
+
+[RegisterComponent]
+public sealed partial class ProduceComponent : SharedProduceComponent
+{
+}
diff --git a/Content.Client/Botany/Components/SeedComponent.cs b/Content.Client/Botany/Components/SeedComponent.cs
new file mode 100644 (file)
index 0000000..1166302
--- /dev/null
@@ -0,0 +1,8 @@
+using Content.Shared.Botany.Components;
+
+namespace Content.Client.Botany.Components;
+
+[RegisterComponent]
+public sealed partial class SeedComponent : SharedSeedComponent
+{
+}
index c78e0a1ad4761127020bb4323ff3e2da62d55048..b3c4e1c95a9b30ab6a022e2bbed16b6b78862c9f 100644 (file)
@@ -1,11 +1,12 @@
 using Content.Server.Botany.Systems;
+using Content.Shared.Botany.Components;
 using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
 
 namespace Content.Server.Botany.Components;
 
 [RegisterComponent]
 [Access(typeof(BotanySystem))]
-public sealed partial class ProduceComponent : Component
+public sealed partial class ProduceComponent : SharedProduceComponent
 {
     [DataField("targetSolution")] public string SolutionName { get; set; } = "food";
 
index cb48c166837319dc096830fee689acdb82446175..3e729dc90601398b2e795f1763cc7560d47e020e 100644 (file)
@@ -1,10 +1,11 @@
 using Content.Server.Botany.Systems;
+using Content.Shared.Botany.Components;
 using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
 
 namespace Content.Server.Botany.Components
 {
     [RegisterComponent, Access(typeof(BotanySystem))]
-    public sealed partial class SeedComponent : Component
+    public sealed partial class SeedComponent : SharedSeedComponent
     {
         /// <summary>
         ///     Seed data containing information about the plant type & properties that this seed can grow seed. If
index 4ea857a5527f3e5a7d0436c8ebc32c691c38f91b..09c2be33a0edb9e4d23085076f7e132613009f12 100644 (file)
@@ -1,5 +1,5 @@
 using Content.Server.Explosion.Components;
-using Content.Server.Flash.Components;
+using Content.Shared.Flash.Components;
 using Content.Shared.Explosion;
 using Content.Shared.Interaction;
 using Content.Shared.Interaction.Events;
index ab706d6d9c51d722d021412fc9bfa7c548f2c5f9..2f475a07b44c57d31ee50d93aeda728449b4c2da 100644 (file)
@@ -1,4 +1,5 @@
 using Content.Shared.Explosion.Components;
+using Content.Shared.Explosion.EntitySystems;
 using Content.Server.Fluids.EntitySystems;
 using Content.Shared.Chemistry.Components;
 using Content.Shared.Coordinates.Helpers;
index 5bee1834fa4313a18ea1c349f04084154ef387ac..4f0ccc27fdc4929060e0b85ff20929cba04841a0 100644 (file)
@@ -1,5 +1,6 @@
 using System.Linq;
 using Content.Server.Flash.Components;
+using Content.Shared.Flash.Components;
 using Content.Server.Light.EntitySystems;
 using Content.Server.Popups;
 using Content.Server.Stunnable;
index f1cb5373c04c56d5b80c6400f88b3083cfc10e6c..1260a0dd0d0bad4fac84973e14dcfd5aa0b6ae86 100644 (file)
@@ -2,6 +2,7 @@ using System.Linq;
 using Content.Server.Light.Components;
 using Content.Shared.Examine;
 using Content.Shared.Interaction;
+using Content.Shared.Light.EntitySystems;
 using Content.Shared.Light.Components;
 using Content.Shared.Popups;
 using Content.Shared.Storage;
@@ -13,7 +14,7 @@ using Robust.Shared.Containers;
 namespace Content.Server.Light.EntitySystems;
 
 [UsedImplicitly]
-public sealed class LightReplacerSystem : EntitySystem
+public sealed class LightReplacerSystem : SharedLightReplacerSystem
 {
     [Dependency] private readonly PoweredLightSystem _poweredLight = default!;
     [Dependency] private readonly SharedAudioSystem _audio = default!;
index dbc89d5a4497115ae7218f9c7e0b98f668a9099d..5ead67a12b2da954524fb1e255e20db6527b28ca 100644 (file)
@@ -1,4 +1,5 @@
 using Content.Server.Body.Components;
+using Content.Shared.Nutrition.Components;
 using Content.Server.Nutrition.EntitySystems;
 using Content.Shared.FixedPoint;
 using Robust.Shared.Audio;
index 70d202932ac6400755efbb3bc16f6f63119a0da9..2b627151339b9d59f87ab7378847db1e1688b9f0 100644 (file)
@@ -3,6 +3,7 @@ using Content.Server.Body.Systems;
 using Content.Server.Chemistry.Containers.EntitySystems;
 using Content.Server.Inventory;
 using Content.Server.Nutrition.Components;
+using Content.Shared.Nutrition.Components;
 using Content.Server.Popups;
 using Content.Server.Stack;
 using Content.Shared.Administration.Logs;
index bb420d246fc5c87dde6aad011947807177cd76ef..679b2cdbc23446e4a31cb930c2660a2cb610bb1e 100644 (file)
@@ -1,5 +1,6 @@
 using Content.Server.Chemistry.Containers.EntitySystems;
 using Content.Server.Nutrition.Components;
+using Content.Shared.Nutrition.Components;
 using Content.Shared.Chemistry.Components;
 using Content.Shared.Examine;
 using Content.Shared.FixedPoint;
index f5f34080cbb0aa0edea96da4cf4403ca07baedad..f9feed955fc5ffcdca5f8e8310f3aaf9b5d857a9 100644 (file)
@@ -1,4 +1,6 @@
 using Content.Server.Nutrition.Components;
+using Content.Shared.Nutrition.Components;
+using Content.Shared.Nutrition.EntitySystems;
 using Content.Server.Popups;
 using Content.Shared.Interaction;
 using Robust.Shared.Audio;
@@ -11,7 +13,7 @@ namespace Content.Server.Nutrition.EntitySystems
     /// <summary>
     /// Handles usage of the utensils on the food items
     /// </summary>
-    internal sealed class UtensilSystem : EntitySystem
+    internal sealed class UtensilSystem : SharedUtensilSystem
     {
         [Dependency] private readonly IRobustRandom _robustRandom = default!;
         [Dependency] private readonly FoodSystem _foodSystem = default!;
index fd8ff9ea280412c3e492a4603e44a3480476f07a..4f8f1cda2ea0d98c3a884d272034f89330b95746 100644 (file)
@@ -6,8 +6,9 @@ using Content.Server.Popups;
 using Content.Shared.Database;
 using Content.Shared.DoAfter;
 using Content.Shared.Doors.Components;
-using Content.Shared.SprayPainter.Prototypes;
 using Content.Shared.SprayPainter;
+using Content.Shared.SprayPainter.Components;
+using Content.Shared.SprayPainter.Prototypes;
 using Content.Shared.Interaction;
 using JetBrains.Annotations;
 using Robust.Server.GameObjects;
diff --git a/Content.Shared/Botany/Components/SharedProduceComponent.cs b/Content.Shared/Botany/Components/SharedProduceComponent.cs
new file mode 100644 (file)
index 0000000..1d55f8d
--- /dev/null
@@ -0,0 +1,8 @@
+using Robust.Shared.GameStates;
+
+namespace Content.Shared.Botany.Components;
+
+[NetworkedComponent]
+public abstract partial class SharedProduceComponent : Component
+{
+}
diff --git a/Content.Shared/Botany/Components/SharedSeedComponent.cs b/Content.Shared/Botany/Components/SharedSeedComponent.cs
new file mode 100644 (file)
index 0000000..efa7214
--- /dev/null
@@ -0,0 +1,8 @@
+using Robust.Shared.GameStates;
+
+namespace Content.Shared.Botany.Components;
+
+[NetworkedComponent]
+public abstract partial class SharedSeedComponent : Component
+{
+}
index dfaee98fab9646da3cfa40c46ad7ada79ea798e6..cfbe1fcb3d9f1d6606ea66853cff3869f7abc3a9 100644 (file)
@@ -1,9 +1,11 @@
+using Content.Shared.Explosion.EntitySystems;
 using Content.Shared.Chemistry.Components;
 using Content.Shared.Explosion.EntitySystems;
 using Robust.Shared.GameStates;
 using Robust.Shared.Prototypes;
+using Robust.Shared.GameStates;
 
-namespace Content.Shared.Explosion.Components.OnTrigger;
+namespace Content.Shared.Explosion.Components;
 
 /// <summary>
 /// Creates a smoke cloud when triggered, with an optional solution to include in it.
index 0a8caa5e2a1c175058d77e5447a366388568026a..b206dfa696c3fabc706e1a6c7e2754ec087680a6 100644 (file)
@@ -1,6 +1,5 @@
-namespace Content.Shared.Explosion.EntitySystems;
+namespace Content.Shared.Explosion.EntitySystems;
 
 public abstract class SharedSmokeOnTriggerSystem : EntitySystem
 {
-       
-}
\ No newline at end of file
+}
index f257c83b5aaa1acc70459939cf245ee1c95afd7e..d1270e9db74f9d7a280fcca49bd4aab5d6ead5fa 100644 (file)
@@ -1,5 +1,4 @@
 using Robust.Shared.GameStates;
-
 namespace Content.Shared.Flash.Components;
 
 /// <summary>
similarity index 84%
rename from Content.Server/Light/Components/LightReplacerComponent.cs
rename to Content.Shared/Light/Components/LightReplacerComponent.cs
index cecdba6b47d6e12ae94e712beb181591a38b705b..8d7d2339275df760ddc3bbb39f3aac9664b77ac5 100644 (file)
@@ -1,7 +1,8 @@
-using Content.Server.Light.EntitySystems;
+using Content.Shared.Light.EntitySystems;
 using Content.Shared.Storage;
 using Robust.Shared.Audio;
 using Robust.Shared.Containers;
+using Robust.Shared.GameStates;
 
 namespace Content.Server.Light.Components;
 
@@ -9,7 +10,7 @@ namespace Content.Server.Light.Components;
 ///     Device that allows user to quikly change bulbs in <see cref="PoweredLightComponent"/>
 ///     Can be reloaded by new light tubes or light bulbs
 /// </summary>
-[RegisterComponent, Access(typeof(LightReplacerSystem))]
+[RegisterComponent, NetworkedComponent, Access(typeof(SharedLightReplacerSystem))]
 public sealed partial class LightReplacerComponent : Component
 {
     [DataField("sound")]
diff --git a/Content.Shared/Light/EntitySystems/SharedLightReplacerSystem.cs b/Content.Shared/Light/EntitySystems/SharedLightReplacerSystem.cs
new file mode 100644 (file)
index 0000000..29001d6
--- /dev/null
@@ -0,0 +1,5 @@
+namespace Content.Shared.Light.EntitySystems;
+
+public abstract class SharedLightReplacerSystem : EntitySystem
+{
+}
similarity index 74%
rename from Content.Server/Mousetrap/MousetrapComponent.cs
rename to Content.Shared/Mousetrap/MousetrapComponent.cs
index b666c45a4cee48a82e05f2c2080ea04d9a93700f..6d7483802bd5a1418432cb13fe1757e2f975e487 100644 (file)
@@ -1,10 +1,12 @@
-namespace Content.Server.Mousetrap;
+using Robust.Shared.GameStates;
 
-[RegisterComponent]
+namespace Content.Shared.Mousetrap;
+
+[RegisterComponent, NetworkedComponent]
 public sealed partial class MousetrapComponent : Component
 {
     [ViewVariables]
-       [DataField("isActive")]
+    [DataField("isActive")]
     public bool IsActive = false;
 
     /// <summary>
similarity index 85%
rename from Content.Server/Nutrition/Components/UtensilComponent.cs
rename to Content.Shared/Nutrition/Components/UtensilComponent.cs
index 4058d7e154b39c23151e582ef1ad480e8c9b2c98..50158f1f63ca499db1bd695c012fb18500aaa0f7 100644 (file)
@@ -1,9 +1,10 @@
-using Content.Server.Nutrition.EntitySystems;
+using Content.Shared.Nutrition.EntitySystems;
 using Robust.Shared.Audio;
+using Robust.Shared.GameStates;
 
-namespace Content.Server.Nutrition.Components
+namespace Content.Shared.Nutrition.Components
 {
-    [RegisterComponent, Access(typeof(UtensilSystem))]
+    [RegisterComponent, NetworkedComponent, Access(typeof(SharedUtensilSystem))]
     public sealed partial class UtensilComponent : Component
     {
         [DataField("types")]
diff --git a/Content.Shared/Nutrition/EntitySystems/SharedUtensilSystem.cs b/Content.Shared/Nutrition/EntitySystems/SharedUtensilSystem.cs
new file mode 100644 (file)
index 0000000..656a36f
--- /dev/null
@@ -0,0 +1,5 @@
+namespace Content.Shared.Nutrition.EntitySystems;
+
+public abstract class SharedUtensilSystem : EntitySystem
+{
+}
similarity index 84%
rename from Content.Server/SprayPainter/SprayPainterComponent.cs
rename to Content.Shared/SprayPainter/Components/SprayPainterComponent.cs
index 9417112b4f20637b3514cf7a96f4e75a7fbaad24..e4581527b796ea348080f903647e3a8316badb9d 100644 (file)
@@ -1,8 +1,9 @@
 using Robust.Shared.Audio;
+using Robust.Shared.GameStates;
 
-namespace Content.Server.SprayPainter;
+namespace Content.Shared.SprayPainter.Components;
 
-[RegisterComponent]
+[RegisterComponent, NetworkedComponent]
 public sealed partial class SprayPainterComponent : Component
 {
     [DataField("spraySound")]
index d5976d1ddaa5aadb4faa4946b6dc17850138db97..d800dcdff48182d9d95ca15741fecf7c0b3dde13 100644 (file)
         - SmokeOnTrigger
         - Flash
         - Handcuff
-        - RangedMagazine
+        - BallisticAmmoProvider
         - Ammo
   - type: ItemMapper
     mapLayers:
         - WetFloorSign
         - HolosignProjector
         - Plunger
-        - LightReplacer
+        - JanicartKeys
       components:
         - LightReplacer
   - type: ItemMapper
index f83c48436a6ce4cb300df8111143c4a4929a51b1..06cf99cc31602f91a93227e7721f0d10913f2992 100644 (file)
         lightreplacer_slot:
           name: janitorial-trolley-slot-component-slot-name-lightreplacer
           whitelist:
-            tags:
+            components:
               - LightReplacer
           priority: 6
         spraybottle_slot:
index d834d1ab520b37106f20b5a0f840272f0625d6cc..442e939d42370333daee74bbc1130f7c68c01f36 100644 (file)
@@ -17,7 +17,6 @@
       amount: 5
   - type: Tag
     tags:
-      - LightReplacer
       - DroneUsable
   - type: StaticPrice
     price: 100
index 26948370335fcc57dd5684a6930e1a4617252229..8a8c569510dc620ec6e96928bd62e3900f61d680 100644 (file)
@@ -14,9 +14,6 @@
         - key: enum.SprayPainterUiKey.Key
           type: SprayPainterBoundUserInterface
     - type: SprayPainter
-      whitelist:
-        tags:
-          - PaintableAirlock
       colorPalette:
         red: '#FF1212FF'
         yellow: '#B3A234FF'
index eef38e2541638416f5c349431327c160ea8493d2..082a8a956c830afded5de802bdc5347c0e46ad0f 100644 (file)
       shape:
         !type:PhysShapeCircle
           radius: 2
+      repeating: true
     - type: Anchorable
     - type: Sprite
       sprite: Objects/Weapons/pflash.rsi
index b07c8d267adf05ec70f66d9eef1d83e04da52172..f9b207ba6ec0337005fcea8595511a63c9cfd903 100644 (file)
 - type: Tag
   id: Lemon
 
-- type: Tag
-  id: LightReplacer
-
 - type: Tag
   id: Lime
 
 - type: Tag
   id: Payload # for grenade/bomb crafting
 
-- type: Tag
-  id: PaintableAirlock
-
 - type: Tag
   id: Pancake