Revert "Gamerule Entities" (#15724)
This commit is contained in:
@@ -1,15 +0,0 @@
|
||||
using Content.Server.StationEvents.Events;
|
||||
using Robust.Shared.Prototypes;
|
||||
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
|
||||
|
||||
namespace Content.Server.StationEvents.Components;
|
||||
|
||||
/// <summary>
|
||||
/// Used an event that spawns an anomaly somewhere random on the map.
|
||||
/// </summary>
|
||||
[RegisterComponent, Access(typeof(AnomalySpawnRule))]
|
||||
public sealed class AnomalySpawnRuleComponent : Component
|
||||
{
|
||||
[DataField("anomalySpawnerPrototype", customTypeSerializer: typeof(PrototypeIdSerializer<EntityPrototype>))]
|
||||
public string AnomalySpawnerPrototype = "RandomAnomalySpawner";
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
namespace Content.Server.StationEvents.Components;
|
||||
|
||||
[RegisterComponent, Access(typeof(BasicStationEventSchedulerSystem))]
|
||||
public sealed class BasicStationEventSchedulerComponent : Component
|
||||
{
|
||||
public const float MinimumTimeUntilFirstEvent = 300;
|
||||
|
||||
/// <summary>
|
||||
/// How long until the next check for an event runs
|
||||
/// </summary>
|
||||
/// Default value is how long until first event is allowed
|
||||
[ViewVariables(VVAccess.ReadWrite)]
|
||||
public float TimeUntilNextEvent = MinimumTimeUntilFirstEvent;
|
||||
}
|
||||
@@ -1,31 +0,0 @@
|
||||
using Content.Server.StationEvents.Events;
|
||||
using Robust.Shared.Prototypes;
|
||||
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
|
||||
|
||||
namespace Content.Server.StationEvents.Components;
|
||||
|
||||
/// <summary>
|
||||
/// This is used for an event that spawns an artifact
|
||||
/// somewhere random on the station.
|
||||
/// </summary>
|
||||
[RegisterComponent, Access(typeof(BluespaceArtifactRule))]
|
||||
public sealed class BluespaceArtifactRuleComponent : Component
|
||||
{
|
||||
[DataField("artifactSpawnerPrototype", customTypeSerializer: typeof(PrototypeIdSerializer<EntityPrototype>))]
|
||||
public string ArtifactSpawnerPrototype = "RandomArtifactSpawner";
|
||||
|
||||
[DataField("artifactFlashPrototype", customTypeSerializer: typeof(PrototypeIdSerializer<EntityPrototype>))]
|
||||
public string ArtifactFlashPrototype = "EffectFlashBluespace";
|
||||
|
||||
[DataField("possibleSightings")]
|
||||
public List<string> PossibleSighting = new()
|
||||
{
|
||||
"bluespace-artifact-sighting-1",
|
||||
"bluespace-artifact-sighting-2",
|
||||
"bluespace-artifact-sighting-3",
|
||||
"bluespace-artifact-sighting-4",
|
||||
"bluespace-artifact-sighting-5",
|
||||
"bluespace-artifact-sighting-6",
|
||||
"bluespace-artifact-sighting-7"
|
||||
};
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
using Content.Server.StationEvents.Events;
|
||||
|
||||
namespace Content.Server.StationEvents.Components;
|
||||
|
||||
[RegisterComponent, Access(typeof(BluespaceLockerRule))]
|
||||
public sealed class BluespaceLockerRuleComponent : Component
|
||||
{
|
||||
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
using Content.Server.StationEvents.Events;
|
||||
|
||||
namespace Content.Server.StationEvents.Components;
|
||||
|
||||
[RegisterComponent, Access(typeof(BreakerFlipRule))]
|
||||
public sealed class BreakerFlipRuleComponent : Component
|
||||
{
|
||||
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
using Content.Server.StationEvents.Events;
|
||||
|
||||
namespace Content.Server.StationEvents.Components;
|
||||
|
||||
[RegisterComponent, Access(typeof(BureaucraticErrorRule))]
|
||||
public sealed class BureaucraticErrorRuleComponent : Component
|
||||
{
|
||||
|
||||
}
|
||||
@@ -1,25 +0,0 @@
|
||||
using Content.Server.StationEvents.Events;
|
||||
|
||||
namespace Content.Server.StationEvents.Components;
|
||||
|
||||
[RegisterComponent, Access(typeof(DiseaseOutbreakRule))]
|
||||
public sealed class DiseaseOutbreakRuleComponent : Component
|
||||
{
|
||||
/// <summary>
|
||||
/// Disease prototypes I decided were not too deadly for a random event
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Fire name
|
||||
/// </remarks>
|
||||
[DataField("notTooSeriousDiseases")]
|
||||
public readonly IReadOnlyList<string> NotTooSeriousDiseases = new[]
|
||||
{
|
||||
"SpaceCold",
|
||||
"VanAusdallsRobovirus",
|
||||
"VentCough",
|
||||
"AMIV",
|
||||
"SpaceFlu",
|
||||
"BirdFlew",
|
||||
"TongueTwister"
|
||||
};
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
using Content.Server.StationEvents.Events;
|
||||
|
||||
namespace Content.Server.StationEvents.Components;
|
||||
|
||||
[RegisterComponent, Access(typeof(FalseAlarmRule))]
|
||||
public sealed class FalseAlarmRuleComponent : Component
|
||||
{
|
||||
|
||||
}
|
||||
@@ -1,46 +0,0 @@
|
||||
using Content.Server.StationEvents.Events;
|
||||
using Content.Shared.Atmos;
|
||||
using Robust.Shared.Map;
|
||||
|
||||
namespace Content.Server.StationEvents.Components;
|
||||
|
||||
[RegisterComponent, Access(typeof(GasLeakRule))]
|
||||
public sealed class GasLeakRuleComponent : Component
|
||||
{
|
||||
public readonly Gas[] LeakableGases =
|
||||
{
|
||||
Gas.Miasma,
|
||||
Gas.Plasma,
|
||||
Gas.Tritium,
|
||||
Gas.Frezon,
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
/// Running cooldown of how much time until another leak.
|
||||
/// </summary>
|
||||
public float TimeUntilLeak;
|
||||
|
||||
/// <summary>
|
||||
/// How long between more gas being added to the tile.
|
||||
/// </summary>
|
||||
public float LeakCooldown = 1.0f;
|
||||
|
||||
// Event variables
|
||||
public EntityUid TargetStation;
|
||||
public EntityUid TargetGrid;
|
||||
public Vector2i TargetTile;
|
||||
public EntityCoordinates TargetCoords;
|
||||
public bool FoundTile;
|
||||
public Gas LeakGas;
|
||||
public float MolesPerSecond;
|
||||
public readonly int MinimumMolesPerSecond = 20;
|
||||
|
||||
/// <summary>
|
||||
/// Don't want to make it too fast to give people time to flee.
|
||||
/// </summary>
|
||||
public int MaximumMolesPerSecond = 50;
|
||||
|
||||
public int MinimumGas = 250;
|
||||
public int MaximumGas = 1000;
|
||||
public float SparkChance = 0.05f;
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
using Content.Server.StationEvents.Events;
|
||||
|
||||
namespace Content.Server.StationEvents.Components;
|
||||
|
||||
[RegisterComponent, Access(typeof(KudzuGrowthRule))]
|
||||
public sealed class KudzuGrowthRuleComponent : Component
|
||||
{
|
||||
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
using Content.Server.StationEvents.Events;
|
||||
using Robust.Shared.Prototypes;
|
||||
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
|
||||
|
||||
namespace Content.Server.StationEvents.Components;
|
||||
|
||||
[RegisterComponent, Access(typeof(LoneOpsSpawnRule))]
|
||||
public sealed class LoneOpsSpawnRuleComponent : Component
|
||||
{
|
||||
[DataField("loneOpsShuttlePath")]
|
||||
public string LoneOpsShuttlePath = "Maps/Shuttles/striker.yml";
|
||||
|
||||
[DataField("gameRuleProto", customTypeSerializer: typeof(PrototypeIdSerializer<EntityPrototype>))]
|
||||
public string GameRuleProto = "Nukeops";
|
||||
|
||||
[DataField("additionalRule")]
|
||||
public EntityUid? AdditionalRule;
|
||||
}
|
||||
@@ -1,25 +0,0 @@
|
||||
using Content.Server.StationEvents.Events;
|
||||
|
||||
namespace Content.Server.StationEvents.Components;
|
||||
|
||||
[RegisterComponent, Access(typeof(MeteorSwarmRule))]
|
||||
public sealed class MeteorSwarmRuleComponent : Component
|
||||
{
|
||||
public float _cooldown;
|
||||
|
||||
/// <summary>
|
||||
/// We'll send a specific amount of waves of meteors towards the station per ending rather than using a timer.
|
||||
/// </summary>
|
||||
public int _waveCounter;
|
||||
|
||||
public int MinimumWaves = 3;
|
||||
public int MaximumWaves = 8;
|
||||
|
||||
public float MinimumCooldown = 10f;
|
||||
public float MaximumCooldown = 60f;
|
||||
|
||||
public int MeteorsPerWave = 5;
|
||||
public float MeteorVelocity = 10f;
|
||||
public float MaxAngularVelocity = 0.25f;
|
||||
public float MinAngularVelocity = -0.25f;
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
using Content.Server.StationEvents.Events;
|
||||
|
||||
namespace Content.Server.StationEvents.Components;
|
||||
|
||||
[RegisterComponent, Access(typeof(MouseMigrationRule))]
|
||||
public sealed class MouseMigrationRuleComponent : Component
|
||||
{
|
||||
[DataField("spawnedPrototypeChoices")]
|
||||
public List<string> SpawnedPrototypeChoices = new() //we double up for that ez fake probability
|
||||
{
|
||||
"MobMouse",
|
||||
"MobMouse1",
|
||||
"MobMouse2",
|
||||
"MobRatServant"
|
||||
};
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
using System.Threading;
|
||||
using Content.Server.StationEvents.Events;
|
||||
|
||||
namespace Content.Server.StationEvents.Components;
|
||||
|
||||
[RegisterComponent, Access(typeof(PowerGridCheckRule))]
|
||||
public sealed class PowerGridCheckRuleComponent : Component
|
||||
{
|
||||
public CancellationTokenSource? AnnounceCancelToken;
|
||||
|
||||
public readonly List<EntityUid> Powered = new();
|
||||
public readonly List<EntityUid> Unpowered = new();
|
||||
|
||||
public float SecondsUntilOff = 30.0f;
|
||||
|
||||
public int NumberPerSecond = 0;
|
||||
public float UpdateRate => 1.0f / NumberPerSecond;
|
||||
public float FrameTimeAccumulator = 0.0f;
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
namespace Content.Server.StationEvents.Components;
|
||||
|
||||
[RegisterComponent, Access(typeof(RampingStationEventSchedulerSystem))]
|
||||
public sealed class RampingStationEventSchedulerComponent : Component
|
||||
{
|
||||
[DataField("endTime"), ViewVariables(VVAccess.ReadWrite)]
|
||||
public float EndTime;
|
||||
|
||||
[DataField("maxChaos"), ViewVariables(VVAccess.ReadWrite)]
|
||||
public float MaxChaos;
|
||||
|
||||
[DataField("startingChaos"), ViewVariables(VVAccess.ReadWrite)]
|
||||
public float StartingChaos;
|
||||
|
||||
[DataField("timeUntilNextEvent"), ViewVariables(VVAccess.ReadWrite)]
|
||||
public float TimeUntilNextEvent;
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
using Content.Server.StationEvents.Events;
|
||||
|
||||
namespace Content.Server.StationEvents.Components;
|
||||
|
||||
[RegisterComponent, Access(typeof(RandomSentienceRule))]
|
||||
public sealed class RandomSentienceRuleComponent : Component
|
||||
{
|
||||
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
using Content.Server.StationEvents.Events;
|
||||
|
||||
namespace Content.Server.StationEvents.Components;
|
||||
|
||||
[RegisterComponent, Access(typeof(RevenantSpawnRule))]
|
||||
public sealed class RevenantSpawnRuleComponent : Component
|
||||
{
|
||||
[DataField("revenantPrototype")]
|
||||
public string RevenantPrototype = "MobRevenant";
|
||||
}
|
||||
@@ -1,8 +1,6 @@
|
||||
using Content.Server.StationEvents.Events;
|
||||
namespace Content.Server.StationEvents.Components;
|
||||
|
||||
namespace Content.Server.StationEvents.Components;
|
||||
|
||||
[RegisterComponent, Access(typeof(RandomSentienceRule))]
|
||||
[RegisterComponent]
|
||||
public sealed class SentienceTargetComponent : Component
|
||||
{
|
||||
[DataField("flavorKind", required: true)]
|
||||
|
||||
@@ -1,36 +0,0 @@
|
||||
using Content.Server.StationEvents.Events;
|
||||
using Content.Shared.Radio;
|
||||
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.Set;
|
||||
|
||||
namespace Content.Server.StationEvents.Components;
|
||||
|
||||
/// <summary>
|
||||
/// Solar Flare event specific configuration
|
||||
/// </summary>
|
||||
[RegisterComponent, Access(typeof(SolarFlareRule))]
|
||||
public sealed class SolarFlareRuleComponent : Component
|
||||
{
|
||||
/// <summary>
|
||||
/// If true, only headsets affected, but e.g. handheld radio will still work
|
||||
/// </summary>
|
||||
[DataField("onlyJamHeadsets")]
|
||||
public bool OnlyJamHeadsets;
|
||||
|
||||
/// <summary>
|
||||
/// Channels that will be disabled for a duration of event
|
||||
/// </summary>
|
||||
[DataField("affectedChannels", customTypeSerializer: typeof(PrototypeIdHashSetSerializer<RadioChannelPrototype>))]
|
||||
public readonly HashSet<string> AffectedChannels = new();
|
||||
|
||||
/// <summary>
|
||||
/// Chance light bulb breaks per second during event
|
||||
/// </summary>
|
||||
[DataField("lightBreakChancePerSecond")]
|
||||
public float LightBreakChancePerSecond;
|
||||
|
||||
/// <summary>
|
||||
/// Chance door toggles per second during event
|
||||
/// </summary>
|
||||
[DataField("doorToggleChancePerSecond")]
|
||||
public float DoorToggleChancePerSecond;
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
using Content.Server.StationEvents.Events;
|
||||
|
||||
namespace Content.Server.StationEvents.Components;
|
||||
|
||||
[RegisterComponent, Access(typeof(SpiderSpawnRule))]
|
||||
public sealed class SpiderSpawnRuleComponent : Component
|
||||
{
|
||||
|
||||
}
|
||||
@@ -1,89 +0,0 @@
|
||||
using Robust.Shared.Audio;
|
||||
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom;
|
||||
|
||||
namespace Content.Server.StationEvents.Components;
|
||||
|
||||
/// <summary>
|
||||
/// Defines basic data for a station event
|
||||
/// </summary>
|
||||
[RegisterComponent]
|
||||
public sealed class StationEventComponent : Component
|
||||
{
|
||||
public const float WeightVeryLow = 0.0f;
|
||||
public const float WeightLow = 5.0f;
|
||||
public const float WeightNormal = 10.0f;
|
||||
public const float WeightHigh = 15.0f;
|
||||
public const float WeightVeryHigh = 20.0f;
|
||||
|
||||
[DataField("weight")]
|
||||
public float Weight = WeightNormal;
|
||||
|
||||
[DataField("startAnnouncement")]
|
||||
public string? StartAnnouncement;
|
||||
|
||||
[DataField("endAnnouncement")]
|
||||
public string? EndAnnouncement;
|
||||
|
||||
[DataField("startAudio")]
|
||||
public SoundSpecifier? StartAudio;
|
||||
|
||||
[DataField("endAudio")]
|
||||
public SoundSpecifier? EndAudio;
|
||||
|
||||
/// <summary>
|
||||
/// In minutes, when is the first round time this event can start
|
||||
/// </summary>
|
||||
[DataField("earliestStart")]
|
||||
public int EarliestStart = 5;
|
||||
|
||||
/// <summary>
|
||||
/// In minutes, the amount of time before the same event can occur again
|
||||
/// </summary>
|
||||
[DataField("reoccurrenceDelay")]
|
||||
public int ReoccurrenceDelay = 30;
|
||||
|
||||
/// <summary>
|
||||
/// How long after being added does the event start
|
||||
/// </summary>
|
||||
[DataField("startDelay")]
|
||||
public TimeSpan StartDelay = TimeSpan.Zero;
|
||||
|
||||
/// <summary>
|
||||
/// How long the event lasts.
|
||||
/// </summary>
|
||||
[DataField("duration")]
|
||||
public TimeSpan Duration = TimeSpan.FromSeconds(1);
|
||||
|
||||
/// <summary>
|
||||
/// The max amount of time the event lasts.
|
||||
/// </summary>
|
||||
[DataField("maxDuration")]
|
||||
public TimeSpan? MaxDuration;
|
||||
|
||||
/// <summary>
|
||||
/// How many players need to be present on station for the event to run
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// To avoid running deadly events with low-pop
|
||||
/// </remarks>
|
||||
[DataField("minimumPlayers")]
|
||||
public int MinimumPlayers;
|
||||
|
||||
/// <summary>
|
||||
/// How many times this even can occur in a single round
|
||||
/// </summary>
|
||||
[DataField("maxOccurrences")]
|
||||
public int? MaxOccurrences;
|
||||
|
||||
/// <summary>
|
||||
/// When the station event starts.
|
||||
/// </summary>
|
||||
[DataField("startTime", customTypeSerializer: typeof(TimeOffsetSerializer))]
|
||||
public TimeSpan StartTime;
|
||||
|
||||
/// <summary>
|
||||
/// When the station event starts.
|
||||
/// </summary>
|
||||
[DataField("endTime", customTypeSerializer: typeof(TimeOffsetSerializer))]
|
||||
public TimeSpan EndTime;
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
using Content.Server.StationEvents.Events;
|
||||
|
||||
namespace Content.Server.StationEvents.Components;
|
||||
|
||||
[RegisterComponent, Access(typeof(VentClogRule))]
|
||||
public sealed class VentClogRuleComponent : Component
|
||||
{
|
||||
[DataField("safeishVentChemicals")]
|
||||
public readonly IReadOnlyList<string> SafeishVentChemicals = new[]
|
||||
{
|
||||
"Water", "Blood", "Slime", "SpaceDrugs", "SpaceCleaner", "Nutriment", "Sugar", "SpaceLube", "Ephedrine", "Ale", "Beer"
|
||||
};
|
||||
|
||||
}
|
||||
@@ -1,8 +1,6 @@
|
||||
using Content.Server.StationEvents.Events;
|
||||
namespace Content.Server.StationEvents.Components;
|
||||
|
||||
namespace Content.Server.StationEvents.Components;
|
||||
|
||||
[RegisterComponent, Access(typeof(VentClogRule))]
|
||||
[RegisterComponent]
|
||||
public sealed class VentCritterSpawnLocationComponent : Component
|
||||
{
|
||||
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
using Content.Server.StationEvents.Events;
|
||||
|
||||
namespace Content.Server.StationEvents.Components;
|
||||
|
||||
[RegisterComponent, Access(typeof(VentCrittersRule))]
|
||||
public sealed class VentCrittersRuleComponent : Component
|
||||
{
|
||||
[DataField("spawnedPrototypeChoices")]
|
||||
public List<string> SpawnedPrototypeChoices = new()
|
||||
{
|
||||
"MobMouse",
|
||||
"MobMouse1",
|
||||
"MobMouse2"
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user