Skip to content

Commit

Permalink
Aether Displacement Engine (#5590)
Browse files Browse the repository at this point in the history
<!-- Write **BELOW** The Headers and **ABOVE** The comments else it may
not be viewable. -->
<!-- You can view Contributing.MD for a detailed description of the pull
request process. -->

## About The Pull Request
Adds a rare device that uses hydrogen to remove thermal energy
<!-- Describe The Pull Request. Please be sure every change is
documented or this can delay review and even discourage maintainers from
merging your PR! -->

## Why It's Good For The Game

<!-- Argue for the merits of your changes and how they benefit the game,
especially if they are controversial and/or far reaching. If you can't
actually explain WHY what you are doing will improve the game, then it
probably isn't good for the game in the first place. -->

## Changelog

<!-- If your PR modifies aspects of the game that can be concretely
observed by players or admins you should add a changelog. If your change
does NOT meet this description, remove this section. Be sure to properly
mark your PRs to prevent unnecessary GBP loss. You can read up on GBP
and it's effects on PRs in the tgstation guides for contributors. Please
note that maintainers freely reserve the right to remove and add tags
should they deem it appropriate. You can attempt to finagle the system
all you want, but it's best to shoot for clear communication right off
the bat. -->

:cl:
add: Added "Aether Displacement Engine" a new toy engineering will
soonish get their hands on
/:cl:

<!-- Both :cl:'s are required for the changelog to work! You can put
your name to the right of the first :cl: if you want to overwrite your
GitHub username as author ingame. -->
<!-- You can use multiple of the same prefix (they're only used for the
icon ingame) and delete the unneeded ones. Despite some of the tags,
changelogs should generally represent how a player might be affected by
the changes rather than a summary of the PR's contents. -->
  • Loading branch information
TheLordME committed Jun 22, 2023
1 parent e8d8555 commit 73aa107
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 0 deletions.
1 change: 1 addition & 0 deletions citadel.dme
Original file line number Diff line number Diff line change
Expand Up @@ -1294,6 +1294,7 @@
#include "code\game\machinery\teleporter\projector.dm"
#include "code\game\machinery\virtual_reality\ar_console.dm"
#include "code\game\machinery\virtual_reality\vr_console.dm"
#include "code\game\machinery\vitruvius\anti_heater.dm"
#include "code\game\magic\Uristrunes.dm"
#include "code\game\mecha\mech_bay.dm"
#include "code\game\mecha\mech_fabricator.dm"
Expand Down
38 changes: 38 additions & 0 deletions code/game/machinery/vitruvius/anti_heater.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
/// The "Idro Repression Injection System" uses fusion fuel gas to remove heat from the area
/obj/machinery/portable_atmospherics/aether_displacement_engine
name = "Aether Displacement Engine"
desc = "A weird machine, it seems to have a connector that fits the standard atmospherics port. It has been marked by the Nanotrasen Artifact Recovery and Utilisation Group as 'Safe for standard NT operations'"

icon = 'icons/machinery/vitruvius/iris.dmi'
icon_state = "iris_idle"

base_pixel_x = -16
base_pixel_y = -16

density = TRUE
volume = 100

var/cooling_power = -160 KILOWATTS //per mol of fusion fuel

var/lowest_temp = 100

var/mol_cap_modifier = 1//The higher the more moles are consumed per second, and the more is cooled, to increase cost to cool lower cooling power
//if we wanted to go by the Oxygen not included consumption, this would be 2.5, which would drain a cannister of hydrogen in 12 minutes
// with 1 it lasts for about 30 mintues

/obj/machinery/portable_atmospherics/aether_displacement_engine/process(delta_time)
. = ..()
var/datum/gas_mixture/env = loc.return_air()
var/energy_to_target = env.get_thermal_energy_change(100)
var/moles_to_cool = clamp(energy_to_target / cooling_power,0,delta_time * mol_cap_modifier)//10 moles per second, delta time is in 1/10 seconds, so delta_time is our moles count
var/datum/gas_mixture/fuel_found = get_fusion_fuel(moles_to_cool)
env.adjust_thermal_energy(fuel_found.total_moles * cooling_power)


/obj/machinery/portable_atmospherics/aether_displacement_engine/proc/get_fusion_fuel(moles_needed)
return air_contents.remove_by_flag(GAS_FLAG_FUSION_FUEL, moles_needed)

/obj/machinery/portable_atmospherics/aether_displacement_engine/anomaly
desc = "A weird machine, it seems to have a connector that fits the standard atmospherics port. It is bearing marks of 'Vitruvius' who ever that is."


Binary file added icons/machinery/vitruvius/iris.dmi
Binary file not shown.

0 comments on commit 73aa107

Please sign in to comment.