-
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
Componentize Rat King "Rummaging." #34530
base: master
Are you sure you want to change the base?
Conversation
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 like this PR! Here's a few things I noticed that I've gotten feedback on before.
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.
Only other thing is, could you rename Rummagning
component/system to something like "CanRummage" or something? It was kind of confusing at first!
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.
Just really minor stuff! Doing some final tests now
Your way is cleaner I reckon.
…On Fri, Jan 31, 2025, 22:47 beck-thompson ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In Content.Shared/Rummaging/RummagingSystem.cs
<#34530 (comment)>
:
> + }
+
+ if (!entity.Comp.Looted)
+ entity.Comp.Looted = true;
+
+ // and set the next refresh if the entity is relootable.
+ if (entity.Comp.Relootable)
+ entity.Comp.NextRelootable = _gameTiming.CurTime + entity.Comp.RelootableCooldown;
+ }
+
+ // checks Relootable status
+ public bool IsCurrentlyLootable(Entity<RummageableComponent> entity)
+ {
+ if (entity.Comp.Relootable)
+ {
+ if (entity.Comp.NextRelootable < _gameTiming.CurTime)
The only one that I found confusing is the second if statement. If you
want to keep the first one that would make sense!
—
Reply to this email directly, view it on GitHub
<#34530 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BG6OZJEIYMNE5QNC7UYI6P32NQ7VXAVCNFSM6AAAAABVPROXM2VHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDKOBYGIZDQNJUGY>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
About the PR
Separated out the "rummage" verb and its associated systems from the Rat King component. Also added several options to make it more flexible for developer use.
Why / Balance
Many older components (e.g. Rat King, Dragon, Drone) combine several unrelated systems into one monolithic component with very little YML customizability, which I feel goes against one of the core aims of an ECS - modularity.
My goal in my next few upstream PRs is to separate out these (niche, but useful) mechanics so that they can be more easily used by developers without having to develop their own systems that do the same thing, and in so doing provide more variables which can be manipulated without delving into CS.
Technical details
In this PR, I:
Media
Requirements
Breaking changes
Changelog
I have not included a changelog because these changes do not immediately affect gameplay.