Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port Supermatter from Impstation #2717

Open
wants to merge 33 commits into
base: master
Choose a base branch
from

Conversation

FaintSpeaker
Copy link
Contributor

@FaintSpeaker FaintSpeaker commented Jan 13, 2025

About the PR

Port the following PRs from Impstation:

Adds the Supermatter crystal as implemented in impstation, a power source that requires active cooling, emitters, and produces radiation. It comes with a monitoring computer, a variety of sound effects, and three delamination types:

  • Explosion, caused by default with no special circumstances.
  • Singularity Formation, caused by an excess of absorbed moles.
  • Tesla Formation, caused by an excess of internal energy.

Resonance Cascade exists in the code, but will not be chosen as there are no conditions for it in Impstation.

The crystal will announce the expected delamination type once, but the delamination type is checked every update before the delamination occurs, and as a result the delam can change from singularity formation to explosion if the amount of absorbed moles drops below the required number.

The crystal is damaged in a variety of ways:

  • The crystal absorbs gas with a temperature above the HeatPenaltyThreshold (Default 40; Value is in C not K).
  • The crystal has an internal energy greater than the PowerPenaltyThreshold (Default 5000, or 5.0 GeV)
  • The crystal has absorbed more than the MolePenaltyThreshold (Default 1,800 moles)

The crystal cannot lose more than 0.2% integrity per update.

The integrity cannot go negative, and delamination will be canceled if the crystal's integrity is restored above 0.

Mapping & Testing Remarks

This PR does not add the supermatter to any stations. I tested this by creating a very basic setup derived from following this guide, but I am by no means an expert.

Why / Balance

Additional content for engineering: Another way to accidentally destroy the station, a way to farm plasma, variety in station power generation.

The steal objective has been commented out in Impstation, I have left it commented out here; however, cutting a sliver of the supermatter is still a function that works and will halve the delamination timer from 30s to 15s.

Technical details

The Beam and Lightning systems now support targeting coordinates as an alternative to targeting entities, and now has support for non-randomized lightning sprites. This is not expected to impact any other uses of the beam or lightning systems.

CVar Default Value Usage
supermatter.singuloose_moles_modifier 1.0 Multiplies the number of moles required to achieve a singularity delam. This is a multiplier of the threshold for mole damage. For example, a value of 2.0 will allow mole damage between 1,800 and 3,599 moles, but it will not form a singularity unless the moles are at least 3,600 at the moment of failure.
supermatter.do_singuloose true Enable the singularity formation delamination type.
supermatter.tesloose_power_modifier 1.0 Multiplies the amount of internal energy required to achieve a tesla delam. This is the same behaviour as above, but for energy instead.
supermatter.do_tesloose true Enable the tesla formation delamination type.
supermatter.do_force_delam false Force a particular delam type, using the supermatter.forced_delam_type variable
supermatter.forced_delam_type DelamType.Singulo The type of delamination to force. Only used when supermatter.do_force_delam is set to true. Note: I was unable to use this cvar from the server console, I suspect because it is an Enum type.
supermatter.rads_base 3.0 Base radiation output for the supermatter crystal.
supermatter.rads_modifier 1.0 Multiplies radiation generated by the crystal's internal energy.
supermatter.yell_timer 60.0 The number of seconds the crystal will locally announce it's status.

Media

Computer board can be printed in circuit imprinter:
image

Supermatter Crystal, Active:
image
image

CE Hardsuit immune:
image

Urist McHands not immune:

urist-destroyed.mp4

Supermatter stating integrity is falling:
image

SM integrity healing:
image

Explosive Delam:

delam-explosive.mp4

Singulo Delam (w/Sliver taken):
image

delam-singulo.mp4

Tesla Delam (w/Sliver taken):
image
image

Requirements

  • I have tested all added content and changes.
  • I have added media to this PR or it does not require an ingame showcase.

Breaking changes

Content.Shared.Beam.Components.CreateBeamSuccessEvent.Target is now nullable and will require null handling.
Content.Server.Lightning.HitByLightningEvent.Source is now nullable and will require null handling.

I did not see any usages of these properties in the codebase, but any future uses of these properties will need null checks.

Changelog
🆑 FaintSpeaker

  • add: Supermatter Engine ported from Impstation, PRs by honeyed-lemons and Darkmajia

VMSolidus and others added 20 commits January 12, 2025 18:56
supermatter .ftl was broken, this fixes it.

<!--
This is a semi-strict format, you can add/remove sections as needed but
the order/format should be kept the same
Remove these comments before submitting
-->

# Description

<!--
Explain this PR in as much detail as applicable

Some example prompts to consider:
How might this affect the game? The codebase?
What might be some alternatives to this?
How/Who does this benefit/hurt [the game/codebase]?
-->

Easly fix the supermatter .ftl files that was not set correctly, why? i
dunno.
now its works.

---

# Changelog

<!--
You can add an author after the `:cl:` to change the name that appears
in the changelog (ex: `:cl: Death`)
Leaving it blank will default to your GitHub display name
This includes all available types for the changelog
-->

:cl:
- fix: Supermatter Annoncements

Signed-off-by: FoxxoTrystan <[email protected]>
@github-actions github-actions bot added size/XL Over 1024 lines Changes: YML Changes any yml files Changes: UI Changes: C# Changes any cs files Changes: Localization Changes any ftl files Changes: Documentation Changes any xml or md files Changes: Sprite Changes any png or json in an rsi Changes: Audio Changes any audio files and removed size/XL Over 1024 lines labels Jan 13, 2025
Copy link
Contributor

github-actions bot commented Jan 13, 2025

RSI Diff Bot; head commit 26a05e8 merging into f3d2632
This PR makes changes to 1 or more RSIs. Here is a summary of all changes:

Resources/Textures/_EE/Structures/Machines/computers.rsi

State Old New Status
computer Added
generic_keyboard Added
generic_panel_open Added
supermatter-0 Added
supermatter-1 Added
supermatter-2 Added
supermatter-3 Added
supermatter-4 Added
supermatter-5 Added
supermatter-6 Added
supermatter_keys Added

Resources/Textures/_EE/Structures/Power/Generation/Supermatter/supermatter.rsi

State Old New Status
supermatter Added

Resources/Textures/_EE/Structures/Power/Generation/Supermatter/supermatter_sliver.rsi

State Old New Status
icon Added

Edit: diff updated after 26a05e8

@github-actions github-actions bot added the size/XL Over 1024 lines label Jan 14, 2025
@FaintSpeaker FaintSpeaker marked this pull request as ready for review January 14, 2025 18:43
@FaintSpeaker FaintSpeaker requested review from a team as code owners January 14, 2025 18:43
@FaintSpeaker
Copy link
Contributor Author

@Radezolid I think I got everything you had tagged. Let me know if I missed anything 🙂

@Radezolid
Copy link
Contributor

@Radezolid I think I got everything you had tagged. Let me know if I missed anything 🙂

Will review once i get some sleep

@Darkmajia
Copy link

i'm really happy you're looking to port this! i do want to let you know that i'm still working on further adjustments on imp. i'll also take the requested changes from this pr into account for our fork, the organisation is admittedly a bit of a mess

Copy link
Contributor

@Radezolid Radezolid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good YAML-wise, gotta wait for delta's code review and direction's input.

@Radezolid Radezolid requested a review from a team January 15, 2025 19:07
Copy link
Contributor

@Lyndomen Lyndomen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Direction approved! This can go live for mappers to add at their leisure, in accordance with our two power source dealio

@@ -65,7 +65,8 @@ private void OnDamage(EntityUid uid, DoAfterComponent component, DamageChangedEv
{
// If we're applying state then let the server state handle the do_after prediction.
// This is to avoid scenarios where a do_after is erroneously cancelled on the final tick.
if (!args.InterruptsDoAfters || !args.DamageIncreased || args.DamageDelta == null || GameTiming.ApplyingState)
if (!args.InterruptsDoAfters || !args.DamageIncreased || args.DamageDelta == null || GameTiming.ApplyingState
|| args.DamageDelta.DamageDict.ContainsKey("Radiation")) // imp - Sanity check so people can crowbar doors open to flee from Lord Singuloth
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this isnt needed it was fixed like 2 years ago, radiation doesnt interrupt doafters

@@ -29,6 +29,7 @@
HoSGunStealObjective: 0.5 # DeltaV
PlutoniumCoreStealObjective: 0.5 # DeltaV, was reverted upstream
NukeDiskStealObjective: 0.25
#StealSupermatterSliverObjective: 0.5 # imp - disabled supermatter steal objectives
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it doesnt exist here so just remove it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Changes: Audio Changes any audio files Changes: C# Changes any cs files Changes: Documentation Changes any xml or md files Changes: Localization Changes any ftl files Changes: Sprite Changes any png or json in an rsi Changes: UI Changes: YML Changes any yml files S: Needs Review size/XL Over 1024 lines
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants