Supermatter#17
Conversation
|
RSI Diff Bot; head commit 8d6ddd7 merging into a31c99b Modules/GoobStation/Resources/Textures/Supermatter/supermatter.rsi
Modules/GoobStation/Resources/Textures/Supermatter/supermatter_sliver.rsi
|
|
Are we even gonna be able to get this guy to allow us to port this from AGPL. |
SM is not agpl Also I've adressed this by nuking everthing and kinda blackboxing it tbh lmao |
…nto supermatter
There was a problem hiding this comment.
Pull request overview
Adds the “Supermatter” feature set (entity + supporting systems/assets) into the GoobStation module, including a supermatter crystal entity, a sliver item, server-side behavior, and supporting localization/audio/texture resources. Also introduces a SupermatterImmune marker component and applies it to observers.
Changes:
- Added new Supermatter entity/sliver prototypes plus textures, audio, and localization strings.
- Added shared/server/client Supermatter components and systems to drive atmos/damage/delam behavior and announcements.
- Added
SupermatterImmuneto the observer prototype to prevent observer interactions with supermatter.
Reviewed changes
Copilot reviewed 22 out of 27 changed files in this pull request and generated 16 comments.
Show a summary per file
| File | Description |
|---|---|
| Resources/Prototypes/Entities/Mobs/Player/observer.yml | Adds SupermatterImmune to observers. |
| Modules/GoobStation/Resources/Textures/Supermatter/supermatter_sliver.rsi/meta.json | Adds RSI metadata/attribution for sliver sprite. |
| Modules/GoobStation/Resources/Textures/Supermatter/supermatter_sliver.rsi/icon.png | Adds sliver sprite image asset. |
| Modules/GoobStation/Resources/Textures/Supermatter/supermatter.rsi/supermatter.png | Adds supermatter crystal sprite sheet asset. |
| Modules/GoobStation/Resources/Textures/Supermatter/supermatter.rsi/meta.json | Adds RSI metadata for supermatter animation. |
| Modules/GoobStation/Resources/Prototypes/Entities/Supermatter/supermatter_sliver.yml | Adds the sliver item prototype (light/radiation/sprite/tags). |
| Modules/GoobStation/Resources/Prototypes/Entities/Supermatter/supermatter.yml | Adds the supermatter crystal entity prototype and core components. |
| Modules/GoobStation/Resources/Locale/en-US/supermatter/supermatter.ftl | Adds localized examine/warning/delam/tamper announcement strings. |
| Modules/GoobStation/Resources/Audio/Supermatter/dust.ogg | Adds supermatter “dust/consume” SFX. |
| Modules/GoobStation/Resources/Audio/Supermatter/attributions.yml | Adds licensing/attribution entries for supermatter audio assets. |
| Modules/GoobStation/Content.Goobstation.Shared/Supermatter/Systems/SharedSupermatterSystem.cs | Introduces shared base system + delam type enum. |
| Modules/GoobStation/Content.Goobstation.Shared/Supermatter/Components/SupermatterImmuneComponent.cs | Adds networked marker component for immunity. |
| Modules/GoobStation/Content.Goobstation.Shared/Supermatter/Components/SupermatterFoodComponent.cs | Adds component to define energy value for “food” entities. |
| Modules/GoobStation/Content.Goobstation.Shared/Supermatter/Components/SupermatterComponent.cs | Adds the main shared component with constants/knobs/helpers. |
| Modules/GoobStation/Content.Goobstation.Shared/Content.Goobstation.Shared.csproj | Normalizes BOM/encoding on project file. |
| Modules/GoobStation/Content.Goobstation.Server/Supermatter/Systems/SupermatterSystem.cs | Adds server system loop + event subscriptions. |
| Modules/GoobStation/Content.Goobstation.Server/Supermatter/Systems/SupermatterSystem.Yap.cs | Adds announcement logic (“yapping”). |
| Modules/GoobStation/Content.Goobstation.Server/Supermatter/Systems/SupermatterSystem.Handlers.cs | Adds collision/hand/use/do-after/examine/mapinit handling. |
| Modules/GoobStation/Content.Goobstation.Server/Supermatter/Systems/SupermatterSystem.Destructive.cs | Adds zap + delam behavior and delam-type selection. |
| Modules/GoobStation/Content.Goobstation.Server/Supermatter/Systems/SupermatterSystem.Damage.cs | Adds environmental damage/healing calculation. |
| Modules/GoobStation/Content.Goobstation.Server/Supermatter/Systems/SupermatterSystem.Atmos.cs | Adds atmos processing for power/rads/exhaust/powerloss. |
| Modules/GoobStation/Content.Goobstation.Server/Supermatter/SupermatterHelpers.cs | Adds gas wrapper + extension helpers for atmos/chat. |
| Modules/GoobStation/Content.Goobstation.Server/Entry/EntryPoint.cs | Normalizes BOM/encoding on entrypoint file. |
| Modules/GoobStation/Content.Goobstation.Client/Supermatter/Systems/SupermatterSystem.cs | Adds client stub system (currently invalid syntax). |
| Modules/GoobStation/Content.Goobstation.Client/Content.Goobstation.Client.csproj | Normalizes BOM/encoding on project file. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
There was a problem hiding this comment.
Pull request overview
Adds the foundational “Supermatter” entity implementation (prototypes, shared components, and server/client systems) plus the required art/audio resources and locale strings.
Changes:
- Added Supermatter entity + sliver prototypes, textures/RSIs, audio, and localization strings.
- Implemented shared Supermatter components/helpers and the server-side Supermatter system (atmos processing, damage, delam, announcements, interaction handlers).
- Added Supermatter immunity marker component and applied it to observers (and sliver).
Reviewed changes
Copilot reviewed 22 out of 27 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| Resources/Prototypes/Entities/Mobs/Player/observer.yml | Makes observers immune to Supermatter interactions. |
| Modules/GoobStation/Resources/Textures/Supermatter/supermatter_sliver.rsi/meta.json | Adds sliver RSI metadata. |
| Modules/GoobStation/Resources/Textures/Supermatter/supermatter_sliver.rsi/icon.png | Adds sliver sprite. |
| Modules/GoobStation/Resources/Textures/Supermatter/supermatter.rsi/supermatter.png | Adds Supermatter sprite frames. |
| Modules/GoobStation/Resources/Textures/Supermatter/supermatter.rsi/meta.json | Adds Supermatter RSI metadata/animation timing. |
| Modules/GoobStation/Resources/Prototypes/Entities/Supermatter/supermatter_sliver.yml | Defines Supermatter sliver item entity. |
| Modules/GoobStation/Resources/Prototypes/Entities/Supermatter/supermatter.yml | Defines Supermatter crystal entity and components. |
| Modules/GoobStation/Resources/Locale/en-US/supermatter/supermatter.ftl | Adds Supermatter announcements/examine/tamper strings. |
| Modules/GoobStation/Resources/Audio/Supermatter/dust.ogg | Adds Supermatter dust SFX. |
| Modules/GoobStation/Resources/Audio/Supermatter/attributions.yml | Adds attributions for Supermatter audio. |
| Modules/GoobStation/Content.Goobstation.Shared/Supermatter/Systems/SharedSupermatterSystem.cs | Shared system base + delam type enum. |
| Modules/GoobStation/Content.Goobstation.Shared/Supermatter/Components/SupermatterImmuneComponent.cs | Adds marker component for Supermatter immunity. |
| Modules/GoobStation/Content.Goobstation.Shared/Supermatter/Components/SupermatterFoodComponent.cs | Adds component to define energy yield when consumed by SM. |
| Modules/GoobStation/Content.Goobstation.Shared/Supermatter/Components/SupermatterComponent.cs | Adds core Supermatter state/config + gas modifier data. |
| Modules/GoobStation/Content.Goobstation.Shared/Content.Goobstation.Shared.csproj | Normalizes XML header/formatting. |
| Modules/GoobStation/Content.Goobstation.Server/Supermatter/Systems/SupermatterSystem.cs | Adds main server system loop wiring + per-tick cycle. |
| Modules/GoobStation/Content.Goobstation.Server/Supermatter/Systems/SupermatterSystem.Yap.cs | Adds announcement logic (warnings + delam messaging). |
| Modules/GoobStation/Content.Goobstation.Server/Supermatter/Systems/SupermatterSystem.Handlers.cs | Adds collide/hand/use/do-after/examine/map-init behavior. |
| Modules/GoobStation/Content.Goobstation.Server/Supermatter/Systems/SupermatterSystem.Destructive.cs | Adds zaps + delam resolution (explosion/singulo/tesla/cascade). |
| Modules/GoobStation/Content.Goobstation.Server/Supermatter/Systems/SupermatterSystem.Damage.cs | Adds environment-driven damage/healing logic. |
| Modules/GoobStation/Content.Goobstation.Server/Supermatter/Systems/SupermatterSystem.Atmos.cs | Adds atmos absorption, power generation, exhaust/radiation logic. |
| Modules/GoobStation/Content.Goobstation.Server/Supermatter/SupermatterHelpers.cs | Adds GasWrapper + gas/atmos/chat helper extensions. |
| Modules/GoobStation/Content.Goobstation.Server/Entry/EntryPoint.cs | Removes BOM from file header. |
| Modules/GoobStation/Content.Goobstation.Client/Supermatter/Systems/SupermatterSystem.cs | Adds client-side system stub inheriting shared system. |
| Modules/GoobStation/Content.Goobstation.Client/Content.Goobstation.Client.csproj | Normalizes XML header/formatting. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
There was a problem hiding this comment.
Pull request overview
Adds the “Supermatter” entity to GoobStation, including its shared component model and server/client systems, plus the supporting assets/localization needed for in-game presentation and interaction.
Changes:
- Added Supermatter entity + sliver prototypes, sprites, audio attribution, and localization strings.
- Implemented shared/server/client Supermatter systems (atmos processing, damage/delam logic, announcements, interactions).
- Marked observers (ghosts) as Supermatter-immune via a new component.
Reviewed changes
Copilot reviewed 22 out of 27 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| Resources/Prototypes/Entities/Mobs/Player/observer.yml | Adds Supermatter immunity to observers. |
| Modules/GoobStation/Resources/Textures/Supermatter/supermatter_sliver.rsi/meta.json | Adds texture metadata for the sliver sprite. |
| Modules/GoobStation/Resources/Textures/Supermatter/supermatter.rsi/meta.json | Adds texture metadata for the supermatter sprite/animation. |
| Modules/GoobStation/Resources/Prototypes/Entities/Supermatter/supermatter_sliver.yml | Adds the supermatter sliver item prototype. |
| Modules/GoobStation/Resources/Prototypes/Entities/Supermatter/supermatter.yml | Adds the supermatter crystal entity prototype. |
| Modules/GoobStation/Resources/Locale/en-US/supermatter/supermatter.ftl | Adds localization strings for supermatter announcements/examine. |
| Modules/GoobStation/Resources/Audio/Supermatter/attributions.yml | Adds audio attributions for new supermatter sounds. |
| Modules/GoobStation/Content.Goobstation.Shared/Supermatter/Systems/SharedSupermatterSystem.cs | Introduces shared system base + delam type enum. |
| Modules/GoobStation/Content.Goobstation.Shared/Supermatter/Components/SupermatterImmuneComponent.cs | Adds a marker component for immunity to supermatter effects. |
| Modules/GoobStation/Content.Goobstation.Shared/Supermatter/Components/SupermatterFoodComponent.cs | Adds a component for entities that feed supermatter with energy. |
| Modules/GoobStation/Content.Goobstation.Shared/Supermatter/Components/SupermatterComponent.cs | Adds the main supermatter component with tuning/data + helpers. |
| Modules/GoobStation/Content.Goobstation.Shared/Content.Goobstation.Shared.csproj | Normalizes BOM/formatting in csproj header. |
| Modules/GoobStation/Content.Goobstation.Server/Supermatter/Systems/SupermatterSystem.cs | Adds the server-side supermatter update loop + orchestration. |
| Modules/GoobStation/Content.Goobstation.Server/Supermatter/Systems/SupermatterSystem.Yap.cs | Adds announcement logic (“yapping”) for warnings/delam. |
| Modules/GoobStation/Content.Goobstation.Server/Supermatter/Systems/SupermatterSystem.Handlers.cs | Adds map init + interaction/collision handlers (consume, sliver do-after). |
| Modules/GoobStation/Content.Goobstation.Server/Supermatter/Systems/SupermatterSystem.Destructive.cs | Adds zap + delam effects (explosion/singulo/tesla/cascade). |
| Modules/GoobStation/Content.Goobstation.Server/Supermatter/Systems/SupermatterSystem.Damage.cs | Adds environment-driven damage and healing logic. |
| Modules/GoobStation/Content.Goobstation.Server/Supermatter/Systems/SupermatterSystem.Atmos.cs | Adds atmos processing for power, radiation, and exhaust generation. |
| Modules/GoobStation/Content.Goobstation.Server/Supermatter/SupermatterHelpers.cs | Adds gas wrapper + extension helpers (gas modifiers, announcements, atmos “Try” wrapper). |
| Modules/GoobStation/Content.Goobstation.Server/Entry/EntryPoint.cs | Normalizes BOM/formatting in file header. |
| Modules/GoobStation/Content.Goobstation.Client/Supermatter/Systems/SupermatterSystem.cs | Adds client system stub inheriting shared system base. |
| Modules/GoobStation/Content.Goobstation.Client/Content.Goobstation.Client.csproj | Normalizes BOM/formatting in csproj header. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
|
This pull request has been automatically marked as stale because it has not had You can always ask for help on our development discord. If you'd like to keep this open, just leave any comment, and the stale label will be removed. |
|
Dog |
|
This pull request has been automatically marked as stale because it has not had You can always ask for help on our development discord. If you'd like to keep this open, just leave any comment, and the stale label will be removed. |
|
I've made the code compile properly and made some cleanup Removed the extension blocks and replaced them with |
Roudenn
left a comment
There was a problem hiding this comment.
There are probably some more acrhitecture issues that have to be solved, for example maybe SupermatterComponent should actually be multiple components instead of just one
But for now please fix those problems
There was a problem hiding this comment.
Change the name of the file to .Announce
1984 no fun
There was a problem hiding this comment.
Split up the component into multiple partials, because it's super big and regions are actually bad for organizing big files
| private static readonly Dictionary<Gas, (float ExergyMod, float HeatMod, float WasteMod, float HeatResistMod)> GasFacts = | ||
| new() | ||
| { | ||
| {Gas.Oxygen, (.8f, 1f, 0f, 0f)}, | ||
| {Gas.Nitrogen, (0f, -1f, -2.5f, 0f)}, | ||
| {Gas.CarbonDioxide, (0f, 1f, 1f, 0f)}, | ||
| {Gas.Plasma, (2f, 4f, 5f, 0f)}, | ||
| {Gas.Tritium, (4f, 30f, 10f, .25f)}, | ||
| {Gas.WaterVapor, (-.25f, 1f, 11f, .25f)}, | ||
| {Gas.Frezon, (-3f, -1f, -9f, -.5f)}, | ||
| {Gas.Ammonia, (0f, .3f, 0f, 0f)}, | ||
| {Gas.NitrousOxide, (0f, 0f, 0f, 5f)} | ||
| }; |
There was a problem hiding this comment.
Please find a way to implement this as YAML fields that are specified in gas prototypes instead of each supermatter
This can be done either by just adding a new partial file to GasPrototype, or just make a new Prototype class for each gas type with these supermatter facts
| "HyperchargedLightning" | ||
| ]; | ||
|
|
||
| [DataField("singularitySpawnPrototype", customTypeSerializer: typeof(PrototypeIdSerializer<EntityPrototype>))] |
There was a problem hiding this comment.
Also remove all of these tag alias in DataFields, they're bad
| [DataField("singularitySpawnPrototype", customTypeSerializer: typeof(PrototypeIdSerializer<EntityPrototype>))] | |
| [DataField(customTypeSerializer: typeof(PrototypeIdSerializer<EntityPrototype>))] |
| public float Integrity | ||
| { | ||
| get | ||
| { | ||
| var integrity = Damage / DelaminationPoint; | ||
| integrity = float.Round(100 - integrity * 100, 2); | ||
| integrity = integrity < 0 ? 0 : integrity; | ||
| return integrity; | ||
| } | ||
| } | ||
|
|
||
| public string IntegrityString => GetFormattedIntegrityString("0.00", formatProvider: null); | ||
|
|
||
| public string GetFormattedIntegrityString(string? format, IFormatProvider? formatProvider) | ||
| { | ||
| return Integrity.ToString(format, formatProvider); | ||
| } | ||
|
|
||
| public float PowerToRemove() | ||
| { | ||
| return Power switch | ||
| { | ||
| > HardcapStartPoint => Power - HardcapTargetPoint, | ||
| > SoftcapStartPoint => Power * (PowerlossPerCycle + SoftcapScaler * (Power - SoftcapStartPoint)), | ||
| _ => Power * PowerlossPerCycle, | ||
| }; | ||
| } |
There was a problem hiding this comment.
I would suggest moving those into a system or at least a helper class because components having code is bad design
| # SPDX-FileCopyrightText: 2024 Piras314 <p1r4s@proton.me> | ||
| # SPDX-FileCopyrightText: 2024 VMSolidus <evilexecutive@gmail.com> | ||
| # SPDX-FileCopyrightText: 2024 username <113782077+whateverusername0@users.noreply.github.com> | ||
| # SPDX-FileCopyrightText: 2025 Aiden <28298836+Aidenkrz@users.noreply.github.com> | ||
| # SPDX-FileCopyrightText: 2025 Aiden <aiden@djkraz.com> | ||
| # | ||
| # SPDX-License-Identifier: AGPL-3.0-or-later | ||
|
|
| /// <summary>Received environmental damage is scaled by this</summary> | ||
| [ViewVariables(VVAccess.ReadOnly)] | ||
| public float DamageIncreaseMultiplier = 0.25f; | ||
|
|
||
| /// <summary> | ||
| /// Multiplier on damage the core takes from absorbing hot gas | ||
| /// Default is ~3/7 | ||
| /// </summary> | ||
| [ViewVariables(VVAccess.ReadOnly)] | ||
| public float HeatDamageMult = 0.4286f; | ||
|
|
||
| /// <summary> | ||
| /// The point at which we should start sending messages | ||
| /// about the damage to the engi channels. | ||
| /// </summary> | ||
| public const float WarningPoint = 50; | ||
|
|
||
| /// <summary>The point at which we start sending messages to the common channel</summary> | ||
| public const float EmergencyPoint = 500; | ||
|
|
||
| /// <summary> | ||
| /// Damage per cycle can't increase by more health ratio than this. | ||
| /// It's inverse of effectively a minimum number of seconds for SM to delam (+ delam timer). | ||
| /// </summary> | ||
| [ViewVariables(VVAccess.ReadOnly)] | ||
| public float DamageHardcapPercentage = 0.002f; |
There was a problem hiding this comment.
Why those aren't datafields?
| private const float PowerlossPerCycle = 0.023f; | ||
|
|
||
| private const float SoftcapStartPoint = 200f; | ||
|
|
||
| private const float SoftcapScaler = 0.0002f; | ||
|
|
||
| /// <summary>Hardcoded since we want to lower the power to the cap value, not to 0</summary> | ||
| private const float HardcapStartPoint = 2500f; | ||
|
|
||
| private const float HardcapTargetPoint = 1292.5f; | ||
|
|
||
| #endregion Generic Knobs | ||
|
|
||
| #region Atmos Input Knobs | ||
|
|
||
| /// <summary>Amount of energy a mole of ammonia gives.</summary> | ||
| [ViewVariables(VVAccess.ReadOnly)] | ||
| public float AmmoniaEnergyPerMole = 1f; | ||
|
|
||
| /// <summary> | ||
| /// Higher == Higher percentage of inhibitor gas needed | ||
| /// before the charge inertia chain reaction effect starts. | ||
| /// </summary> | ||
| [ViewVariables(VVAccess.ReadOnly)] | ||
| public float Co2PercentageForPowerInhibition = 0.20f; | ||
|
|
||
| /// <summary> | ||
| /// Higher == More moles of the gas are needed before the charge | ||
| /// inertia chain reaction effect starts. | ||
| /// Scales powerloss inhibition down until this amount of moles is reached | ||
| /// </summary> | ||
| [ViewVariables(VVAccess.ReadOnly)] | ||
| public float MoleCountForPowerInhibition = 20f; | ||
|
|
||
| /// <summary>bonus powerloss inhibition boost if this amount of moles is reached</summary> | ||
| [ViewVariables(VVAccess.ReadOnly)] | ||
| public float MoleCountForPowerInhibitionBoost = 500f; | ||
|
|
||
| /// <summary> | ||
| /// Above this value we can get lord singulo and independent mol damage, | ||
| /// below it we can heal damage | ||
| /// </summary> | ||
| [ViewVariables(VVAccess.ReadOnly)] | ||
| public float MoleDamageThreshold = 900f; | ||
|
|
||
| /// <summary> | ||
| /// The cutoff on power properly doing damage, pulling shit around, | ||
| /// and delamming into a tesla. Low chance of pyro anomalies, +2 bolts of electricity | ||
| /// </summary> | ||
| [ViewVariables(VVAccess.ReadOnly)] | ||
| public float PowerDamageThreshold = 2500f; | ||
|
|
||
| /// <summary> | ||
| /// Maximum safe operational temperature in degrees Celsius. Supermatter begins taking damage above this temperature. | ||
| /// If you go above this you'll have plasma burn in your SM chamber anyways. | ||
| /// </summary> | ||
| [ViewVariables(VVAccess.ReadOnly)] | ||
| public float HeatDamageThreshold = 100f; |
There was a problem hiding this comment.
Why those aren't datafields?
| [ViewVariables(VVAccess.ReadOnly)] | ||
| public float PlasmaReleaseModifier = 0.001333f; | ||
|
|
||
| /// <summary> | ||
| /// Multiplier on how much oxygen is released during supermatter reactions. | ||
| /// Default is ~1/325 | ||
| /// </summary> | ||
| [ViewVariables(VVAccess.ReadOnly)] | ||
| public float OxygenReleaseEfficiencyModifier = 0.0031f; | ||
|
|
||
| #endregion Atmos Output Knobs | ||
|
|
||
| #region Output Knobs | ||
|
|
||
| /// <summary>Multiplier on power generated by nuclear reactions</summary> | ||
| [ViewVariables(VVAccess.ReadOnly)] | ||
| public float ReactionPowerModifier = 0.55f; |
There was a problem hiding this comment.
Why those aren't datafields?
| /// <summary>we yell every YapPeriod Seconds</summary> | ||
| [DataField] | ||
| public float YapPeriod = 60f; | ||
|
|
||
| /// <summary>set to YapPeriod at first so it doesnt yell a minute after being hit</summary> | ||
| [ViewVariables(VVAccess.ReadOnly)] | ||
| public float YapTimer = 60f; |
There was a problem hiding this comment.
yap is bad make the name actually reflect its function

About the PR
Adds supermatter (only the entity, no mapping, nothing else).
Why / Balance
Supermatter is very cool
Technical details
In comparison to main, it's actually neatly split up now. Also less magic stuff and less unused vars.
Media
Needs #20 to be merged :otag:
Requirements
Breaking changes
adds like a component to observer ig
Changelog
🆑