Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions EXILED/Exiled.API/Features/Respawn.cs
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,34 @@ public static bool SetTokens(SpawnableFaction spawnableFaction, int amount)
return false;
}

/// <summary>
/// Grants influence to a given <see cref="Faction"/>'s <see cref="ILimitedWave"/>s.
/// </summary>
/// <param name="faction">The <see cref="Faction"/> to whose <see cref="ILimitedWave"/>s to grant influence.</param>
/// <param name="amount">The amount of influence to grant.</param>
public static void GrantInfluence(Faction faction, int amount) => FactionInfluenceManager.Add(faction, amount);

/// <summary>
/// Removes influence from a given <see cref="Faction"/>'s <see cref="ILimitedWave"/>s.
/// </summary>
/// <param name="faction">The <see cref="Faction"/> from whose <see cref="ILimitedWave"/>s to remove influence.</param>
/// <param name="amount">The amount of influence to remove.</param>
public static void RemoveInfluence(Faction faction, int amount) => FactionInfluenceManager.Remove(faction, amount);

/// <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) => 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);

/// <summary>
/// Starts the spawn sequence of the given <see cref="Faction"/>.
/// </summary>
Expand Down