Skip to content

Conversation

@SunShine214
Copy link
Contributor

@SunShine214 SunShine214 commented Jan 28, 2026

About The Pull Request

Removes the TEG (thermoelectric generator) completely... hopefully. This is my first removal so I might have missed something. This PR also adds the CDR (Condensate
Decay Reactor) to the game.

First, how the CDR works:
The CDR has four components: the core, stability, the toroid, and the harvesters.

The Core:
Gases will either deposit on the core, or diffuse off of it, to hit the set ratio of core-to-turf gases (called the metallization ratio) There, once they hit their decay threshold, will decay into other gases slowly. There is a decay chain, IE, one gases decays into another which decays into another. As gases decay, they release flux and cool the core, with each gas releasing a different amount of flux. Generally, gases further along the chain generate more flux, but also contribute to stability more.

Stability:
As gases collect on the core, they will cause the Reactor to become more stable. Stability is BAD for the CDR... as gases are experiencing rapid entropy, if they become too stable, they will collapse. You can decrease stability by increasing the core temperature, or by adding BZ gas. Stability is massively increased by low temperatures, though by how much can be reduced by adding N2O.

Toroid:
The toroid is quite simple, it will increase the amount of flux produced based on a parabolic function. As gases are input they increase toroid spin. (higher specific heats generate more spin) Toroid spin is the X-value of the parabolic function- you need to hit the sweet spot to get the most flux output. The upper limit is increased by core mass. There is also the parabolic setting variable, which makes it easier increase the X-value of the function, but the upper limit is also reduced.
Harvesters:
Flux harvesters simply convert flux into power. They have a maximum input, so at high power you need to use more of them.

Fail State:
Core health is decreased by a positive stability value, and increased by a negative one. If it reaches zero, it spawns a temporary singularity that will explode after 30 seconds. Needless to say, dont mess it up, or the area the CDR was in will simply be... gone.

Attributions for the sounds added:
https://freesound.org/people/FrazierWing/sounds/638022/
https://freesound.org/people/eguaus/sounds/321719/
https://freesound.org/people/bevibeldesign/sounds/366091/

Why It's Good For The Game

Alright, the TEG is old, ancient even, and is unmaintained, uninteresting to mess with, and ruins power economy balance. The CDR seeks to be a high power engine, but also a difficult engine to maintain. Additionally, the CDR HOPEFULLY will be more interesting then the TEG, and is hopefully less janky. Also, more engineering content!

Testing Photographs and Procedure

Screenshots&Videos Screenshot 2026-01-27 152709 Screenshot 2026-01-27 152413

Low Power BZ CDR

Screenshot 2026-01-28 223905

Medium Power Pluox CDR

Screenshot 2026-01-28 232356

Changelog

🆑 SunShine214, Niko432
add: Added the CDR (Condensate Decay Reactor), which decays gases to make power!
add: Added a new PDA program to control CDRs. Check the engineering tab in the NTnet store!
add: Added a new pump_gas_volume proc to gas_mixture, which... pumps volume!
del: Removed the TEG.
/:cl:

@SunShine214 SunShine214 requested a review from itsmeow as a code owner January 28, 2026 04:10
@github-actions github-actions bot added Mapping DMM Change Sprites Sound TGUI-Changes Contains changes to TGUI. Make sure its up to date with TGUI 4.0 labels Jan 28, 2026
Copy link
Contributor

@Tsar-Salat Tsar-Salat left a comment

Choose a reason for hiding this comment

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

Circulators look correctly removed.

New TGUI files should be in typescript format.
If you are unfamiliar with TSX, its just the exact same code but with static typing. This format serves as a documentation method as well as preventing errors if you use the wrong operators/values with your props or something similar.

Copy link
Contributor

@Tsar-Salat Tsar-Salat left a comment

Choose a reason for hiding this comment

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

Nice.

Two other things:

@SunShine214 SunShine214 changed the title Kills the TEG, adds the MDR (Metallic Decay Reactor) Kills the TEG, adds the CDR (Condensate Decay Reactor) Jan 28, 2026
Comment on lines 705 to 718
/// Pumps gas from src to output_air. Amount depends on volume_to_pump
/datum/gas_mixture/proc/pump_gas_volume(datum/gas_mixture/output_air, volume_to_pump)
var/datum/gas_mixture/removed
if(!volume)
return FALSE

removed = remove_ratio(volume_to_pump / volume)

if(!removed)
return FALSE

output_air.merge(removed)
return removed

Copy link
Member

Choose a reason for hiding this comment

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

I really don't like the addition of a new gas_mixture proc. Are there no pre-existing ones that do the same thing?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

surprisingly, no.

Copy link
Member

Choose a reason for hiding this comment

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

at a minimum this proc should be changed so that the early return is before defining removed, and you should have the setter for it be in the same line where it's defined. also, are you sure it shouldn't check for volume_to_pump and not volume?

@itsmeow itsmeow removed their request for review January 30, 2026 06:12
Copy link
Member

@mrmanlikesbt mrmanlikesbt left a comment

Choose a reason for hiding this comment

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

something needs to happen with this space on fland

Image

Comment on lines 705 to 718
/// Pumps gas from src to output_air. Amount depends on volume_to_pump
/datum/gas_mixture/proc/pump_gas_volume(datum/gas_mixture/output_air, volume_to_pump)
var/datum/gas_mixture/removed
if(!volume)
return FALSE

removed = remove_ratio(volume_to_pump / volume)

if(!removed)
return FALSE

output_air.merge(removed)
return removed

Copy link
Member

Choose a reason for hiding this comment

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

at a minimum this proc should be changed so that the early return is before defining removed, and you should have the setter for it be in the same line where it's defined. also, are you sure it shouldn't check for volume_to_pump and not volume?

//this provides no feedback because it isnt normally possible to start it when its already active
return
soundloop.start()
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF | FREEZE_PROOF //you cannot destroy it while its on... because of its quantum-flux-field!
Copy link
Member

Choose a reason for hiding this comment

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

tbh, i'm not sure that i like it being indestructible while active.

Comment on lines 368 to 369
/obj/machinery/power/flux_harvester
name = "Magnetic Flux Harvester"
Copy link
Member

Choose a reason for hiding this comment

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

look into if this could be an /obj/machinery/power/energy_accumulator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Mapping DMM Change Sound Sprites TGUI-Changes Contains changes to TGUI. Make sure its up to date with TGUI 4.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants