Skip to content

feat: Add and remove influence#330

Merged
VALERA771 merged 5 commits intoExMod-Team:devfrom
Bonjemus:master
Dec 30, 2024
Merged

feat: Add and remove influence#330
VALERA771 merged 5 commits intoExMod-Team:devfrom
Bonjemus:master

Conversation

@Bonjemus
Copy link
Copy Markdown

@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
Copy Markdown

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
Copy Markdown
Author

Done. 👍

Copy link
Copy Markdown

@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

Copy link
Copy Markdown
Member

@obvEve obvEve left a comment

Choose a reason for hiding this comment

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

like asked by valera: use inlining

@Bonjemus
Copy link
Copy Markdown
Author

like asked by valera: use inlining

Y e s

@VALERA771
Copy link
Copy Markdown

Everyting is good but PR must target dev branch

@VALERA771 VALERA771 changed the base branch from master to dev December 30, 2024 16:04
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.

4 participants