Skip to content
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

Conversation

VMSolidus
Copy link
Member

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

🆑

  • 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.

@github-actions github-actions bot added Changes: C# Changes any cs files Changes: YML Changes any yml files labels Jun 16, 2024
/// 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;
Copy link
Contributor

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?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct. :trollface:

Copy link
Member

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.

Copy link
Member Author

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.

@DangerRevolution
Copy link
Contributor

DangerRevolution commented Jun 17, 2024

Just going to play with this in game pre-approve

@DEATHB4DEFEAT DEATHB4DEFEAT changed the title Port of Randomly Fire Dropped Weapons Port Randomly Fire Dropped Weapons Jun 17, 2024
/// 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;
Copy link
Member

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.

@DangerRevolution DangerRevolution added Priority: 2-High Needs to be resolved as soon as possible Size: 2-Large For large issues/PRs Status: Needs Review Someone please review this Type: Feature Creation of or significant changes to a feature labels Jun 20, 2024
Copy link
Contributor

@DangerRevolution DangerRevolution left a 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

@DangerRevolution DangerRevolution merged commit b353d95 into Simple-Station:master Jun 20, 2024
11 checks passed
SimpleStation14 added a commit that referenced this pull request Jun 20, 2024
VMSolidus added a commit to VMSolidus/Einstein-Engines that referenced this pull request Jun 21, 2024
# 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.
VMSolidus pushed a commit to VMSolidus/Einstein-Engines that referenced this pull request Jun 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Changes: C# Changes any cs files Changes: YML Changes any yml files Priority: 2-High Needs to be resolved as soon as possible Size: 2-Large For large issues/PRs Status: Needs Review Someone please review this Type: Feature Creation of or significant changes to a feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants