-
Notifications
You must be signed in to change notification settings - Fork 194
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
Port Randomly Fire Dropped Weapons #471
Port Randomly Fire Dropped Weapons #471
Conversation
/// The percentage chance of a given gun to accidentally discharge if violently thrown into a wall or person | ||
/// </summary> | ||
[DataField] | ||
public float Reliability = 0.1f; |
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.
So higher reliability the worse?
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.
Correct.
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.
Should have a more clear 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 changed the name to FireOnDropChance, so that its much clearer what it does.
Just going to play with this in game pre-approve |
/// The percentage chance of a given gun to accidentally discharge if violently thrown into a wall or person | ||
/// </summary> | ||
[DataField] | ||
public float Reliability = 0.1f; |
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.
Should have a more clear 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.
some of the stats are a little sussy but we can kick it down the road for an eventual .yaml cleanup and when common core becomes a thing
# Description Ports Simple-Station/Parkstation-Friendly-Chainsaw#19 I have added a new stat for firearms, the "Reliability" stat, which is a number between 0 and 1. It's used as a percentage chance for the weapon to fire itself when violently thrown into anyone. This PR differs from the original one slightly in that to get it to actually work without crashing, I set the system to listen to an event that triggers whenever the gun collides with another entity, not necessarily just the floor. This is the same event responsible for the clown's cream pie system, or for glass shards embedding in an entity. # Changelog :cl: - add: NanoTrasen has disabled the unneeded safeties on your guns- Make sure you're careful with them! - tweak: All Firearms now have a reliability stat, some are more reliable than others. The more reliable a weapon is, the less likely it is to accidentally discharge when yeeted.
Description
Ports Simple-Station/Parkstation-Friendly-Chainsaw#19
I have added a new stat for firearms, the "Reliability" stat, which is a number between 0 and 1. It's used as a percentage chance for the weapon to fire itself when violently thrown into anyone. This PR differs from the original one slightly in that to get it to actually work without crashing, I set the system to listen to an event that triggers whenever the gun collides with another entity, not necessarily just the floor. This is the same event responsible for the clown's cream pie system, or for glass shards embedding in an entity.
Changelog
🆑