master
← sowelipililimute:work/jblackquill/shared-entity-effects
opened 04:21AM - 02 Mar 25 UTC
## About the PR
All entity effect definitions have been moved to shared, alongs… ide their `Effect`/`Condition` implementations when possible. Entity effects that rely on server code for their effects dispatch an `ExecuteEntityEffectEvent`/`CheckEntityEffectConditionEvent` for the server implementation to handle.
## Why / Balance
This is prequisite refactoring work for improvements to the guidebook, both in refactoring code to be more simple (no more special registry for reagent effect strings in the chem guidebook, just access the effects on the client directly), as well as feature work that requires the client to be able to introspect what entity effects do, for e.g. filtering by effect or for generating recipe listings for `CreateEntityReactionEffect` effects without creating special-case systems for serialising and sending a specific piece of data in a way the client can consume.
## Technical details
- move entity effects and conditions to `Content.Shared`
- new `ExecuteEntityEffectEvent`/`CheckEntityEffectConditionEvent` events for entity effects that require server code to execute
- which are handled by an `EntityEffectSystem`
## Requirements
- [x] I have read and am following the [Pull Request and Changelog Guidelines](https://docs.spacestation14.com/en/general-development/codebase-info/pull-request-guidelines.html).
- [x] I have added media to this PR or it does not require an ingame showcase.
## Breaking changes
Entity effects are now located in Content.Shared, and all entity effects are expected to be instantiable by the client. Any downstream entity effects should be moved to Content.Shared. If the effect/condition implementation requires server code, raise `ExecuteEntityEffectEvent`/`CheckEntityEffectConditionEvent` in the `Effect`/`Condition` method and handle the event on the server.
Entity effects are now located in Content.Shared, and all entity effects are expected to be instantiable by the client. Any downstream entity effects should be moved to Content.Shared. If the effect/condition implementation requires server code, raise ExecuteEntityEffectEvent
/CheckEntityEffectConditionEvent
in the Effect
/Condition
method and handle the event on the server.