-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SpiderSystem refactor and rename #33742
base: master
Are you sure you want to change the base?
Conversation
Could you please leave the web overlay or put restrictions on web overlays if it is a big problem? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR!
I just have some nitpicks.
You can use components in whitelists as well as tags. What's the reason for changing them to be tags? |
It's because they were empty components. They didn't do anything except exist to be found by a whitelist, which is what tags are for. |
But there's no real benefit to using tags over marker comps here. If fact I'm pretty sure tags are slower since it needs to both get the tag component and check if it has the tag, vs just checking for a comp. Tags can't be used in queries either, so if a downstream relies on querying these comps they would either have to skip or partially merge this PR, or make their code slower and more complicated. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for making the requested changes!
In return, you get some more nitpicks! ;)
Agreed. Marker components are common in ECS and avoid a few issues that come up with the way Tags work (like inheritance). I endorse sticking with using marker components here. |
I can see your points with |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for making the requested changes!
I just have some more comments and changes, but the PR is definitely getting to the state of being ready to be merged!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Codestyle review
/// <summary> | ||
/// Action given to the player. | ||
/// </summary> | ||
//[ViewVariables] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why its commented? Where DataField
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't add DataField because this variable is getting set on init, and to my understanding EntityUid can't be set in .yml so it felt unnecessary.
VV being commented was just a mistake on my part.
About the PR
Refactor of the component and systems that give spiders the ability to spawn webs, and renamed them to a less generic name. Changes include:
Why / Balance
The only balance change is that spiderwebs no longer spawn on other spiderwebs. This is a bugfix though, as the code to do this already existed and just didn't work.
Technical details
SpiderSystem
,SharedSpiderSystem
andSpiderComponent
renamed toWebPlacerComponent
,SharedWebPlacerSystem
, andWebPlacerSystem
.SpiderWebObjectComponent
deleted. It mostly existed to be found by a whitelist in yaml, and has been replaced with a tag.SpiderWebVisuals
enumerator deleted. This was used alongsideSpiderWebObjectComponent
to give webs a random appearance, and has been replaced withRandomSpriteComponent
and a generic enum.Minor yaml changes. Changed the renamed component, replaced the deleted component. Clown spiders have a honk horn sound.
Media
None.
Requirements
Breaking changes
SpiderComponent
renamed toWebPlacerComponent
.SharedSpiderSystem
renamed toSharedWebPlacerSystem
.SpiderSystem
renamed toWebPlacerSystem
.Namespace
Content.Shared.Spider
changed toContent.Shared.WebPlacer
.Namespace
Content.Server.Spider
changed toContent.Server.WebPlacer
.SpiderWebObjectComponent
removed. Replaced withTag: SpiderWeb
.IgnoreSpiderWebComponent
moved to namespaceContent.Shared.IgnoreSpiderWeb
.SpiderWebVisuals
enumerator removed.Changelog
🆑 aada