-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Clumsy system refactor #31147
base: master
Are you sure you want to change the base?
Clumsy system refactor #31147
Conversation
OK looks like I forgot that tables made a special sound 😭 |
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
OK think I fixed all that! Let me know if you need anything else or if I missed something 🫡 |
if (!_random.Prob(ent.Comp.ClumsyDefaultCheck)) | ||
return; | ||
|
||
_stun.TryParalyze(ent, ent.Comp.GunShootFailStunTime, true); |
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.
Where did TryChangeDamage go?
Also before it had a separate roll for each ammo used, now you only got one. Is that intended?
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.
Yeah both of those are intended!
1.) I didn't think it made much sense that the "explosion" did actual damage. The bullet is never actually fired so I don't really know what would be actually damaging the clown. The noise has the same issue but its funny and seems like something that a clown would do so I kept that! Balance wise the damage was low enough that I felt It wasn't necessary.
2.) This was now a couple months ago so I could be wrong, but I literally could not figure out what that did and every time tested it, there would only ever be one ammo type. Maybe it was for shotguns or something? I'll do some more testing tonight.
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 always interpreted it as the clown shooting himself by accident and never noticed there was no ammo being used.
Still not sure if that means we should remove the damage though, that is kinda part of the balance for monkeys and holoclowns. And 12 damage per failed shot is quite a lot.
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 second part the ammo count seems to be used for semi auto or burst shots, where multiple shots are done at once. If there is only one clumsy roll there you might be able to shoot the whole magazine.
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 always interpreted it as the clown shooting himself by accident and never noticed there was no ammo being used.
Still not sure if that means we should remove the damage though, that is kinda part of the balance for monkeys and holoclowns. And 12 damage per failed shot is quite a lot.
I honestly don't know about balance much, I personally would prefer to leave it without the damage but if you think that I should add it back just let me know!
For the ammo stuff, I'll work on that some more, I also want to make sure it works correctly with #31292!
else | ||
// Someone else slamed you onto the table. | ||
_popup.PopupPredicted(Loc.GetString("bonkable-success-message-others", ("bonker", puttingOnTableName), ("victim", gettingPutOnTableName), ("bonkable", beingClimbedName)), ent, ent); | ||
_popup.PopupPredicted(Loc.GetString("bonkable-success-message-others", ("bonker", Name(args.PuttingOnTable)), ("victim", Name(args.GettingPutOnTable)), ("bonkable", args.BeingClimbedOn)), ent, ent); |
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.
Wait, now you are ignoring identity again.
bonker and victim need it since they are players and can have their identity hidden.
bonkable does not need it since a table has no identity, only a name.
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'm like 70% sure this is correct now... I tested a lot and it all seems to make sense?
I also tested this with the new burst mechanics and everything seems to work as expected! |
_audio.PlayPredicted(ent.Comp.ClumsySound, ent, ent); | ||
|
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 had a look at this again, and before it only played one of these two sounds. The admin smite is crazy loud right now due to that. How it should work:
- The table bonk sound should be part of BonkableComponent, like it was before
- Move playing the sound into HitHeadClumsy
- play the default sound only if not overriden by the bonkablesound
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.
Oh forgot to reply here! I couldn't quite do it like that for various reasons but it now acts the same as it did before (Only the bonk noise, no clown horn).
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
About the PR
The clumsy system was just hard coded into a lot of places. Now the clumsy system uses events that it can interact with instead!
Technical details
As above, I mostly just made events where there weren't before and made the clumsy system hook into them and listen and interact with them. Specifically, the gun system, defib system, hypospray system, and climb on thing system.
Media
2024-08-17.20-46-35.mp4
Requirements
Breaking changes
If you hard coded clumsy stuff into important systems please trigger events and listen for them in the clumsy system now! You also might need to change some of the clumsy fields as well.
Changelog
🆑 Beck Thompson