Files
OldThink/Content.Server/Ghost/Roles/Raffles/IGhostRoleRaffleDecider.cs

29 lines
1.3 KiB
C#
Raw Permalink Normal View History

Cherrypicks 4 (#393) * Immovable Rod changes (#26757) * Adds non randomized rod velocity (#27123) * adds non randomized rod velocity * Adds despawn suffix to despawn rod * make fire spreading scale with mass (#27202) * make fire spreading scale with mass * realer --------- Co-authored-by: deltanedas <@deltanedas:kde.org> * lower max firestacks to 10, refactor flammable (#27159) * lower max firestacks to 10, refactor flammable * fix * uncap fire stack damage, lower fire stack damage * fix fire spread round removal (#27986) * fix a resolve debug assert * rewrite fire spread --------- Co-authored-by: deltanedas <@deltanedas:kde.org> * fire troll fix (#28034) Co-authored-by: deltanedas <@deltanedas:kde.org> * Hide doafters if you're in a container (#29487) * Hide doafters if you're in a container * Out of the loop --------- Co-authored-by: plykiya <plykiya@protonmail.com> * Add ghost role raffles (#26629) * Add ghost role raffles * GRR: Fix dialogue sizing, fix merge * GRR: Add raffle deciders (winner picker) * GRR: Make settings prototype based with option to override * GRR: Use Raffles folder and namespace * GRR: DataFieldify and TimeSpanify * GRR: Don't actually DataFieldify HashSet<ICommonSession>s * GRR: add GetGhostRoleCount() + docs * update engine on branch * Ghost role raffles: docs, fix window size, cleanup, etc * GRR: Admin UI * GRR: Admin UI: Display initial/max/ext of selected raffle settings proto * GRR: Make a ton of roles raffled * Make ERT use short raffle timer (#27830) Co-authored-by: plykiya <plykiya@protonmail.com> * gives loneops a proper ghost role raffle (#27841) * shorten short raffle (#28685) * - fix: Conflicts. * - fix. --------- Co-authored-by: keronshb <54602815+keronshb@users.noreply.github.com> Co-authored-by: deltanedas <39013340+deltanedas@users.noreply.github.com> Co-authored-by: Whisper <121047731+QuietlyWhisper@users.noreply.github.com> Co-authored-by: Plykiya <58439124+Plykiya@users.noreply.github.com> Co-authored-by: plykiya <plykiya@protonmail.com> Co-authored-by: no <165581243+pissdemon@users.noreply.github.com> Co-authored-by: Boaz1111 <149967078+Boaz1111@users.noreply.github.com> Co-authored-by: HS <81934438+HolySSSS@users.noreply.github.com>
2024-06-29 20:02:26 +00:00
using Robust.Shared.Player;
namespace Content.Server.Ghost.Roles.Raffles;
/// <summary>
/// Chooses a winner of a ghost role raffle.
/// </summary>
[ImplicitDataDefinitionForInheritors]
public partial interface IGhostRoleRaffleDecider
{
/// <summary>
/// Chooses a winner of a ghost role raffle draw from the given pool of candidates.
/// </summary>
/// <param name="candidates">The players in the session at the time of drawing.</param>
/// <param name="tryTakeover">
/// Call this with the chosen winner as argument.
/// <ul><li>If <c>true</c> is returned, your winner was able to take over the ghost role, and the drawing is complete.
/// <b>Do not call <see cref="tryTakeover"/> again after true is returned.</b></li>
/// <li>If <c>false</c> is returned, your winner was not able to take over the ghost role,
/// and you must choose another winner, and call <see cref="tryTakeover"/> with the new winner as argument.</li>
/// </ul>
///
/// If <see cref="tryTakeover"/> is not called, or only returns false, the raffle will end without a winner.
/// Do not call <see cref="tryTakeover"/> with the same player several times.
/// </param>
void PickWinner(IEnumerable<ICommonSession> candidates, Func<ICommonSession, bool> tryTakeover);
}