Fix clientside storage Whitelists#24063
Conversation
metalgearsloth
left a comment
There was a problem hiding this comment.
Shared components need to be networked.
Also given the number of systems this touches this is very likely going to be conflict bait so might be easier to get through being split up a bit more.
|
Fixed yaml linter warnings:
Content.IntegrationTests was either failing because of the previous botany changes, or was a fluke-- it's now passing locally, so I expect the CI pipeline to pass. Regarding breaking this work up: |
33747ee to
f0c42b7
Compare
|
EDIT: the ViewVariables attribute is part of admin/mapper tool for editing entities, not anything to do with networking. old message, not really relevantIt's unclear to me what networking changes you are requesting.As an example, the SprayPainterComponent has several members:
Am I misunderstanding what ViewVariables does? Is there a(nother) way of performing networking I am unaware of? Should I prefer the style used in my Botany changes, where fields remain in Content.Server, and Content.Shared/Client gain trivial (empty) implementations of each component? would cause less breakage, although mirrorcult advised in Discord channel #howdoicode that I should try to "move" components to Shared. |
|
Should close issue #22686, unless we want additional safeguards against the behavior described where:
|
|
Have discovered NetworkedComponent and the wiki 🙃 NetworkedComponent is sufficient for the creation of components to be replicated, although their fields remain unreplicated. |
RangedMagazine was replaced with BallisticAmmoProvider in the Gun refactor (space-wizards#8301)
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.
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.
f0c42b7 to
7f56fb9
Compare
|
@metalgearsloth could you have a look at this, again? |
|
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
|
Gonna conflict with #22691 so gonna do that one first. |
…orage-whitelists # Conflicts: # Resources/Prototypes/Entities/Clothing/Belt/belts.yml
…orage-whitelists # Conflicts: # Content.Server/Explosion/EntitySystems/SmokeOnTriggerSystem.cs # Content.Shared/Explosion/Components/OnTrigger/SmokeOnTriggerComponent.cs # Content.Shared/Explosion/EntitySystems/SharedSmokeOnTriggerSystem.cs # Content.Shared/Flash/Components/FlashOnTriggerComponent.cs
About the PR
When a StorageComponent has an EntityWhitelist that filters by a server-only Component, the Client will incorrectly believe items carrying the component do not match the whitelist. This results in a prediction error and erroneous "Can't insert" message.
To demonstrate, try gathering the apples that spawn on Dev with the PlantBag that spawns in the botanist's locker. The following message will appear on

master, as the client does not believe Apples are Produce:Additionally, the Assault Belt has been filtering by the pre-Gun Refactor (#8301) "RangedMagazine" component that was been superceded by BallisticAmmoProvider; this meant both server and client would both incorrectly disallow ammo in the assault belt. This is once again allowed:
Why / Balance
These prediction errors are confusing to new players, and ignored by experienced players; not pleasant for anyone.
Although the Assault Belt change may be argued to effect gameplay balance, it was clearly not #8301's intent to disallow ammunition from being inserted in the Assault Belt.
Technical details
The following is a list of belts, and what previously-serverside component they filter by.
Security Belt:
Utility Belt:
Assault Belt:
JaniBelt:
Chef Belt:
Plant Bag:
The Botany components (Seed and Produce) now have trivial (empty) implementations in shared and client.
The remaining perviously-serverside components have been moved to the Content.Shared module, with trivial Shared Systems created as-needed for the components'
Accessproperty to reference.Except for Botany, all data fields on the components are present in Shared (and could theoretically now be used in Clientside code).
Media
Breaking changes
The following components have been moved from Content.Server to Content.Shared:
Changelog
🆑