-
-
Notifications
You must be signed in to change notification settings - Fork 727
Kills the TEG, adds the CDR (Condensate Decay Reactor) #14059
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
base: master
Are you sure you want to change the base?
Conversation
…ram, added soundloop to the MDR, and addes an NTos program for the MDR
There was a problem hiding this 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.
Tsar-Salat
left a comment
There was a problem hiding this 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:
| /// 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 | ||
|
|
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
surprisingly, no.
There was a problem hiding this comment.
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?
code/modules/modular_computers/file_system/programs/cdrmonitor.dm
Outdated
Show resolved
Hide resolved
code/modules/modular_computers/file_system/programs/cdrmonitor.dm
Outdated
Show resolved
Hide resolved
code/modules/power/condensate_decay_reactor/condensatedecayreactor.dm
Outdated
Show resolved
Hide resolved
…ou need to check if something can be constructed BEFORE its actually constructed.
mrmanlikesbt
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| /// 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 | ||
|
|
There was a problem hiding this comment.
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?
code/modules/power/condensate_decay_reactor/condensate_decay_reactor.dm
Outdated
Show resolved
Hide resolved
| //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! |
There was a problem hiding this comment.
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.
code/modules/power/condensate_decay_reactor/condensate_decay_reactor.dm
Outdated
Show resolved
Hide resolved
code/modules/power/condensate_decay_reactor/condensate_decay_reactor.dm
Outdated
Show resolved
Hide resolved
| /obj/machinery/power/flux_harvester | ||
| name = "Magnetic Flux Harvester" |
There was a problem hiding this comment.
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

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
Low Power BZ CDR
Medium Power Pluox CDR
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: