-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Cluster grenade refactor and contra markings #31108
Cluster grenade refactor and contra markings #31108
Conversation
this is currently possible on live: Base.Profile.2024.07.25.-.12.10.49.119.1.mp4 |
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
I think the stinger hit the nukies boss |
# Conflicts: # Resources/Prototypes/Entities/Objects/Weapons/Throwable/clusterbang.yml
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.
For the love of god the original PR for this was almost 8 months ago, this bug has existed for a millennia at this post and nobody has reviewed this.
900 stingers in a single stinger grenade is probably capable of crashing a server |
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 this! Just a few things from me
Also, during my tests I noted that when projectile grenades, like stingers, are triggered it causes a whole bunch of errors because the meta data component on the grenade can't be resolved. This is likely because it got deleted too early. So that needs to be addressed as well
Content.Server/Explosion/EntitySystems/ProjectileGrenadeSystem.cs
Outdated
Show resolved
Hide resolved
Content.Server/Explosion/EntitySystems/ScatteringGrenadeSystem.cs
Outdated
Show resolved
Hide resolved
Content.Server/Explosion/EntitySystems/ScatteringGrenadeSystem.cs
Outdated
Show resolved
Hide resolved
because the bullet considers the grenade shooting it the "gun" and the grenade gets deleted so there is technically no gun, yeah |
Are you able to fix it? All those errors cause noticeable lag |
I'm pretty sure this is the same as this bug already happening on master |
Yeah, it's the same issue |
2024-12-07.22-27-16.mp4 |
looks pretty good |
2024-12-07.23-01-31.mp4 |
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 a few more things
Content.Shared/Explosion/EntitySystems/SharedScatteringGrenadeSystem.cs
Outdated
Show resolved
Hide resolved
Content.Server/Explosion/EntitySystems/ScatteringGrenadeSystem.cs
Outdated
Show resolved
Hide resolved
Content.Server/Explosion/EntitySystems/ScatteringGrenadeSystem.cs
Outdated
Show resolved
Hide resolved
Content.Server/Explosion/EntitySystems/ScatteringGrenadeSystem.cs
Outdated
Show resolved
Hide resolved
Content.Server/Explosion/EntitySystems/ScatteringGrenadeSystem.cs
Outdated
Show resolved
Hide resolved
Content.Server/Explosion/EntitySystems/ProjectileGrenadeSystem.cs
Outdated
Show resolved
Hide resolved
Content.Shared/Explosion/Components/ScatteringGrenadeComponent.cs
Outdated
Show resolved
Hide resolved
Content.Shared/Explosion/Components/ScatteringGrenadeComponent.cs
Outdated
Show resolved
Hide resolved
It doesn't look like the changes to RequireProjectileTargetSystem.cs have stopped the errors when projectile grenades detonate, unfortunately. I had a go at fixing it, but I couldn't make any progress either |
it stopped the client-side errors that normally caused me lag/game freezing at the very least but I never solved the gun code part that throws errors on the server |
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.
Looks good :)
I got a question, I've been attempting to make a grenade launcher that fires timed grenades in another server. Think this will help me out? |
that's exactly why I made this change, so I could make the china-lake fire different types of ammo like that lol |
THANK YOU. I can now give Delta's secborgs teargas and stingers instead of a pack injector |
About the PR
Cluster grenades essentially have two categories.
I split it into two distinct systems to better separate the logic and fixed a few bugs.
Why / Balance
Technical details
Clustergrenades only trigger as a result of their on-use timer. This means that when they were destroyed, nothing happened. I gave both new categories of grenades a damage trigger so that they can be properly chained like regular explosives.
More than half of the variables in the system were unused by projectile-type grenades, so separating the two into two different systems enables easier alteration of logic or behavior.
None of the actual behavior regarding how they function has changed, it's just been separated.
Media
2024-05-30.21-50-33.mp4
2024-05-30.21-51-08.mp4
2024-06-19.12-25-36.mp4
Requirements
Breaking changes
ClusterGrenadeComponent/System were removed, replaced by ProjectileGrenadeComponent/System and ScatteringGrenadeComponent/System.
Changelog
🆑