Immovable Rod visual variations (#25932)

* Adds variations to immovable rod

* slash oopsie

* Changed prototypes from being hardcoded to being defined in the rules component

* Changed from 10% chance to 5%

* Changes based on feedback

* Fix nullable error

* Moved randomized logic to .yaml. Probabilities of alternate rods add up to 5%.
This commit is contained in:
SlamBamActionman
2024-03-24 23:45:52 +01:00
committed by GitHub
parent a8b714af3f
commit 8f652eaa75
4 changed files with 122 additions and 6 deletions

View File

@@ -1,4 +1,5 @@
using Content.Server.StationEvents.Events;
using Content.Shared.Storage;
using Robust.Shared.Prototypes;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
@@ -7,6 +8,8 @@ namespace Content.Server.StationEvents.Components;
[RegisterComponent, Access(typeof(ImmovableRodRule))]
public sealed partial class ImmovableRodRuleComponent : Component
{
[DataField("rodPrototype", customTypeSerializer: typeof(PrototypeIdSerializer<EntityPrototype>))]
public string RodPrototype = "ImmovableRodKeepTilesStill";
/// List of possible rods and spawn probabilities.
/// </summary>
[DataField]
public List<EntitySpawnEntry> RodPrototypes = new();
}