diff --git a/Content.Server/GameTicking/Rules/VariationPass/Components/ReplacementMarkers/SolarPanelReplacementMarkerComponent.cs b/Content.Server/GameTicking/Rules/VariationPass/Components/ReplacementMarkers/SolarPanelReplacementMarkerComponent.cs new file mode 100644 index 0000000000..8e6146765d --- /dev/null +++ b/Content.Server/GameTicking/Rules/VariationPass/Components/ReplacementMarkers/SolarPanelReplacementMarkerComponent.cs @@ -0,0 +1,7 @@ +namespace Content.Server.GameTicking.Rules.VariationPass.Components.ReplacementMarkers; + +/// +/// This component marks replaceable solar panels for use with fast queries in variation passes. +/// +[RegisterComponent] +public sealed partial class SolarPanelReplacementMarkerComponent : Component; diff --git a/Content.Server/GameTicking/Rules/VariationPass/Components/SolarPanelReplaceVariationPassComponent.cs b/Content.Server/GameTicking/Rules/VariationPass/Components/SolarPanelReplaceVariationPassComponent.cs new file mode 100644 index 0000000000..54e07037e3 --- /dev/null +++ b/Content.Server/GameTicking/Rules/VariationPass/Components/SolarPanelReplaceVariationPassComponent.cs @@ -0,0 +1,5 @@ +namespace Content.Server.GameTicking.Rules.VariationPass.Components; + + +[RegisterComponent] +public sealed partial class SolarPanelReplaceVariationPassComponent : Component; diff --git a/Content.Server/GameTicking/Rules/VariationPass/SolarPanelReplaceVariationPassSystem.cs b/Content.Server/GameTicking/Rules/VariationPass/SolarPanelReplaceVariationPassSystem.cs new file mode 100644 index 0000000000..041ce32726 --- /dev/null +++ b/Content.Server/GameTicking/Rules/VariationPass/SolarPanelReplaceVariationPassSystem.cs @@ -0,0 +1,11 @@ +using Content.Server.GameTicking.Rules.VariationPass.Components; +using Content.Server.GameTicking.Rules.VariationPass.Components.ReplacementMarkers; + +namespace Content.Server.GameTicking.Rules.VariationPass; + +/// +/// This handles the ability to replace entities marked with in a variation pass +/// +public sealed class SolarPanelReplaceVariationPassSystem : BaseEntityReplaceVariationPassSystem +{ +} diff --git a/Resources/Prototypes/Entities/Structures/Power/Generation/solar.yml b/Resources/Prototypes/Entities/Structures/Power/Generation/solar.yml index f4bbf9e686..97802a8696 100644 --- a/Resources/Prototypes/Entities/Structures/Power/Generation/solar.yml +++ b/Resources/Prototypes/Entities/Structures/Power/Generation/solar.yml @@ -151,6 +151,7 @@ - type: Construction graph: SolarPanel node: solarpanel + - type: SolarPanelReplacementMarker - type: entity id: SolarPanelBroken diff --git a/Resources/Prototypes/GameRules/roundstart.yml b/Resources/Prototypes/GameRules/roundstart.yml index bb855d93aa..f5730ab00c 100644 --- a/Resources/Prototypes/GameRules/roundstart.yml +++ b/Resources/Prototypes/GameRules/roundstart.yml @@ -447,3 +447,5 @@ orGroup: puddleMess - id: SmugglerStashVariationPass prob: 0.90 + - id: SolarPanelDamageVariationPass + - id: SolarPanelEmptyVariationPass diff --git a/Resources/Prototypes/GameRules/variation.yml b/Resources/Prototypes/GameRules/variation.yml index 093a832d72..d080965697 100644 --- a/Resources/Prototypes/GameRules/variation.yml +++ b/Resources/Prototypes/GameRules/variation.yml @@ -123,3 +123,25 @@ blacklist: components: - ParticleAcceleratorControlBox + +- type: entity + id: SolarPanelDamageVariationPass + parent: BaseVariationPass + components: + - type: SolarPanelReplaceVariationPass + - type: EntityReplaceVariationPass + entitiesPerReplacementAverage: 30 + entitiesPerReplacementStdDev: 5 + replacements: + - id: SolarPanelBroken + +- type: entity + id: SolarPanelEmptyVariationPass + parent: BaseVariationPass + components: + - type: SolarPanelReplaceVariationPass + - type: EntityReplaceVariationPass + entitiesPerReplacementAverage: 30 + entitiesPerReplacementStdDev: 5 + replacements: + - id: SolarAssembly