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

enable barrel swabbing #73468

Merged
merged 24 commits into from
May 21, 2024
Merged

enable barrel swabbing #73468

merged 24 commits into from
May 21, 2024

Conversation

misterprimus
Copy link
Contributor

@misterprimus misterprimus commented May 3, 2024

Summary

Content "Adjust black powder fouling"

Purpose of change

Make black gunpowder usage and rusting mechanics more realistic.

Describe the solution

Added some CPP to enable ADJUSTMENTS to rust in addition to the existing SETTING of the dirt variable. Then added a fix and a fault. Also made rusting more dependent on dirt level.

Describe alternatives you've considered

Adjusting gun reliability based on dirt level.

Testing

Fired a black powder load and looked at how the rusting changed after the shot and after the mend procedure.

Additional context

I asked a reddit community specializing in this sort of stuff. See results below:

realistic gun rusting

quick way to prevent rusting
@github-actions github-actions bot added <Documentation> Design documents, internal info, guides and help. [JSON] Changes (can be) made in JSON [C++] Changes (can be) made in C++. Previously named `Code` [Markdown] Markdown issues and PRs Items: Ammo / Guns Ammunition for all kinds of weapons and these weapons themselves labels May 3, 2024
@github-actions github-actions bot added the astyled astyled PR, label is assigned by github actions label May 3, 2024
@github-actions github-actions bot added json-styled JSON lint passed, label assigned by github actions and removed astyled astyled PR, label is assigned by github actions labels May 4, 2024
@misterprimus misterprimus marked this pull request as ready for review May 7, 2024 02:41
src/activity_handlers.cpp Outdated Show resolved Hide resolved
src/fault.h Outdated Show resolved Hide resolved
src/item.cpp Outdated Show resolved Hide resolved
misterprimus and others added 3 commits May 7, 2024 00:10
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@github-actions github-actions bot added the astyled astyled PR, label is assigned by github actions label May 7, 2024
src/fault.h Outdated Show resolved Hide resolved
src/activity_handlers.cpp Outdated Show resolved Hide resolved
src/activity_handlers.cpp Outdated Show resolved Hide resolved
src/item.cpp Outdated Show resolved Hide resolved
misterprimus and others added 6 commits May 7, 2024 17:53
Co-authored-by: anothersimulacrum <[email protected]>
Co-authored-by: anothersimulacrum <[email protected]>
Co-authored-by: anothersimulacrum <[email protected]>
…e a reason it was done as a string by the set_variables command immediately prior to the change that I used as a template for my MULTIPLY entry
@github-actions github-actions bot added BasicBuildPassed This PR builds correctly, label assigned by github actions and removed astyled astyled PR, label is assigned by github actions labels May 7, 2024
data/json/faults/fixes_gun.json Outdated Show resolved Hide resolved
src/fault.h Outdated Show resolved Hide resolved
@github-actions github-actions bot removed the json-styled JSON lint passed, label assigned by github actions label May 8, 2024
misterprimus and others added 2 commits May 8, 2024 13:09
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: anothersimulacrum <[email protected]>
@github-actions github-actions bot added BasicBuildPassed This PR builds correctly, label assigned by github actions json-styled JSON lint passed, label assigned by github actions astyled astyled PR, label is assigned by github actions and removed BasicBuildPassed This PR builds correctly, label assigned by github actions labels May 8, 2024
@I-am-Erk
Copy link
Member

I'm not super familiar with how we're doing blackpowder fouling presently. Is this making it more, or less, annoying to manage?

@misterprimus
Copy link
Contributor Author

I'm not super familiar with how we're doing blackpowder fouling presently. Is this making it more, or less, annoying to manage?

Swabbing gives you more time before the gun rusts with minimal tools and minimum time. There are some math changes as well but core mechanics remain the same. So I would say LESS annoying but not a panacea.

@misterprimus
Copy link
Contributor Author

I'm not super familiar with how we're doing blackpowder fouling presently. Is this making it more, or less, annoying to manage?

Did you have any additional questions?

@Maleclypse
Copy link
Member

Could you resolve conflicts? I wouldn't be sure how to fix that rebase.

@misterprimus
Copy link
Contributor Author

Could you resolve conflicts? I wouldn't be sure how to fix that rebase.

Can you tell if this would work?

void fault_fix::load( const JsonObject &jo, std::string_view )
{
    mandatory( jo, was_loaded, "name", name );
    optional( jo, was_loaded, "success_msg", success_msg );
    optional( jo, was_loaded, "time", time );
    optional( jo, was_loaded, "set_variables", set_variables );
    optional( jo, was_loaded, "adjust_variables_multiply", adjust_variables_multiply );
    optional( jo, was_loaded, "skills", skills );
    optional( jo, was_loaded, "faults_removed", faults_removed );
    optional( jo, was_loaded, "faults_added", faults_added );
    optional( jo, was_loaded, "mod_damage", mod_damage );
    optional( jo, was_loaded, "mod_degradation", mod_degradation );
    optional( jo, was_loaded, "time_save_profs", time_save_profs );
    optional( jo, was_loaded, "time_save_flags", time_save_flags );

    if( jo.has_array( "requirements" ) ) {

@misterprimus
Copy link
Contributor Author

Could you resolve conflicts? I wouldn't be sure how to fix that rebase.

I think I got it.

@Maleclypse Maleclypse merged commit 1321414 into CleverRaven:master May 21, 2024
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
astyled astyled PR, label is assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions [C++] Changes (can be) made in C++. Previously named `Code` <Documentation> Design documents, internal info, guides and help. Items: Ammo / Guns Ammunition for all kinds of weapons and these weapons themselves [JSON] Changes (can be) made in JSON json-styled JSON lint passed, label assigned by github actions [Markdown] Markdown issues and PRs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants