mirror of
https://github.com/WWhiteDreamProject/wwdpublic.git
synced 2026-04-17 05:27:38 +03:00
* Add support for contextual information in EntityTables (#37737) * Add context support for entityTables * fix build fail * comments * Update Content.Shared/EntityTable/EntityTableSystem.cs --------- Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com> (cherry picked from commit e92b6b6a7e2ed2e5f7473321e391394f28b9ee4a) * Multiantag Gamemode (#37783) Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com> Co-authored-by: Southbridge <7013162+southbridge-fur@users.noreply.github.com> Co-authored-by: ScarKy0 <106310278+ScarKy0@users.noreply.github.com> (cherry picked from commit f23e8c286153b5742de258a4e722803a1a4fba78) * Гейммоды * Ребаланс цен * Фикс линтера * Баланс бюджета + фикс повторения --------- Co-authored-by: Nemanja <98561806+emogarbage404@users.noreply.github.com>
72 lines
1.9 KiB
C#
72 lines
1.9 KiB
C#
using Content.Shared.EntityTable.EntitySelectors;
|
|
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom;
|
|
|
|
namespace Content.Shared.GameTicking.Rules;
|
|
|
|
/// <summary>
|
|
/// Gamerule the spawns multiple antags at intervals based on a budget
|
|
/// </summary>
|
|
[RegisterComponent, AutoGenerateComponentPause]
|
|
public sealed partial class DynamicRuleComponent : Component
|
|
{
|
|
/// <summary>
|
|
/// The total budget for antags.
|
|
/// </summary>
|
|
[DataField]
|
|
public float Budget;
|
|
|
|
/// <summary>
|
|
/// The last time budget was updated.
|
|
/// </summary>
|
|
[DataField]
|
|
public TimeSpan LastBudgetUpdate;
|
|
|
|
/// <summary>
|
|
/// The amount of budget accumulated every second.
|
|
/// </summary>
|
|
[DataField]
|
|
public float BudgetPerSecond = 0.1f;
|
|
|
|
/// <summary>
|
|
/// The minimum or lower bound for budgets to start at.
|
|
/// </summary>
|
|
[DataField]
|
|
public int StartingBudgetMin = 200;
|
|
|
|
/// <summary>
|
|
/// The maximum or upper bound for budgets to start at.
|
|
/// </summary>
|
|
[DataField]
|
|
public int StartingBudgetMax = 350;
|
|
|
|
/// <summary>
|
|
/// The time at which the next rule will start
|
|
/// </summary>
|
|
[DataField(customTypeSerializer: typeof(TimeOffsetSerializer)), AutoPausedField]
|
|
public TimeSpan NextRuleTime;
|
|
|
|
/// <summary>
|
|
/// Minimum delay between rules
|
|
/// </summary>
|
|
[DataField]
|
|
public TimeSpan MinRuleInterval = TimeSpan.FromMinutes(10);
|
|
|
|
/// <summary>
|
|
/// Maximum delay between rules
|
|
/// </summary>
|
|
[DataField]
|
|
public TimeSpan MaxRuleInterval = TimeSpan.FromMinutes(30);
|
|
|
|
/// <summary>
|
|
/// A table of rules that are picked from.
|
|
/// </summary>
|
|
[DataField]
|
|
public EntityTableSelector Table = new NoneSelector();
|
|
|
|
/// <summary>
|
|
/// The rules that have been spawned
|
|
/// </summary>
|
|
[DataField]
|
|
public List<EntityUid> Rules = new();
|
|
}
|