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

feat: Add and remove influence #330

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

Bonjemus
Copy link

@Bonjemus Bonjemus commented Dec 23, 2024

Description

Describe the changes
It seemed pretty weird to me that those functions weren't here in the first place.

What is the current behavior? (You can also link to an open issue here)

What is the new behavior? (if this is a feature change)

Does this PR introduce a breaking change? (What changes might users need to make in their application due to this PR?)
No.

Other information:


Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentations

Submission checklist

  • I have checked the project can be compiled
  • I have tested my changes and it worked as expected

Patches (if there are any changes related to Harmony patches)

  • I have checked no IL patching errors in the console

Other

  • Still requires more testing

@github-actions github-actions bot added the API label Dec 23, 2024
@Bonjemus Bonjemus changed the title [QoL] Add and remove influence feat: Add and remove influence Dec 23, 2024
@YongAn404
Copy link

YongAn404 commented Dec 24, 2024

You can add these two together as well

    /// <summary>
    /// Get influence to a given <see cref="Faction"/>.
    /// </summary>
    /// <param name="faction">The <see cref="Faction"/> to get influence.</param>
    /// <returns>Get the faction influence..</returns>
    public static float GetInfluence(Faction faction)
    {
        return FactionInfluenceManager.Get(faction);
    }

    /// <summary>
    /// Set influence to a given <see cref="Faction"/>.
    /// </summary>
    /// <param name="faction">The <see cref="Faction"/> to set influence.</param>
    /// <param name="influence">The amount of influence to set.</param>
    public static void SetInfluence(Faction faction, float influence)
    {
        FactionInfluenceManager.Set(faction, influence);
    }

@Bonjemus
Copy link
Author

Done. 👍

Copy link

@VALERA771 VALERA771 left a comment

Choose a reason for hiding this comment

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

Everytring can be inlined

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants