Skip to content
101 changes: 0 additions & 101 deletions code/game/objects/items/circuitboards/machinery/power.dm
Original file line number Diff line number Diff line change
@@ -1,27 +1,3 @@
/obj/item/stock_parts/circuitboard/smes
name = "circuitboard (superconductive magnetic energy storage)"
build_path = /obj/machinery/power/smes/buildable
board_type = "machine"
origin_tech = @'{"powerstorage":6,"engineering":4}'
req_components = list(/obj/item/stock_parts/smes_coil = 1, /obj/item/stack/cable_coil = 30)
additional_spawn_components = list(
/obj/item/stock_parts/console_screen = 1,
/obj/item/stock_parts/keyboard = 1,
/obj/item/stock_parts/shielding/electric = 1
)

/obj/item/stock_parts/circuitboard/batteryrack
name = "circuitboard (battery rack PSU)"
build_path = /obj/machinery/power/smes/batteryrack
board_type = "machine"
origin_tech = @'{"powerstorage":3,"engineering":2}'
req_components = list(/obj/item/stock_parts/capacitor/ = 3, /obj/item/stock_parts/matter_bin/ = 1)
additional_spawn_components = list(
/obj/item/stock_parts/console_screen = 1,
/obj/item/stock_parts/keyboard = 1,
/obj/item/stock_parts/power/apc/buildable = 1
)

/obj/item/stock_parts/circuitboard/recharger
name = "circuitboard (recharger)"
build_path = /obj/machinery/recharger
Expand Down Expand Up @@ -51,83 +27,6 @@
/obj/item/stock_parts/capacitor = 6
) // The apc part is to supply upkeep power, so it charges the battery instead of draining it. Capacitors make things go faster.

/obj/item/stock_parts/circuitboard/turbine
name = "circuitboard (small turbine)"
build_path = /obj/machinery/atmospherics/pipeturbine
board_type = "machine"
origin_tech = @'{"powerstorage":4,"engineering":4}'
req_components = list(
/obj/item/stock_parts/manipulator = 2,
/obj/item/stock_parts/matter_bin = 2
)
additional_spawn_components = list()

/obj/item/stock_parts/circuitboard/turbine/motor
name = "circuitboard (small turbine motor)"
build_path = /obj/machinery/turbinemotor
board_type = "machine"
origin_tech = @'{"powerstorage":4,"engineering":4}'
req_components = list(
/obj/item/stock_parts/manipulator = 2,
/obj/item/stock_parts/capacitor = 4
)

/obj/item/stock_parts/circuitboard/big_turbine
name = "circuitboard (large turbine compressor)"
build_path = /obj/machinery/compressor
board_type = "machine"
origin_tech = @'{"powerstorage":4,"engineering":4}'
req_components = list(
/obj/item/stock_parts/manipulator = 3,
/obj/item/stock_parts/matter_bin = 3
)
additional_spawn_components = list(
/obj/item/stock_parts/power/apc/buildable = 1
)

/obj/item/stock_parts/circuitboard/big_turbine/center
name = "circuitboard (large turbine motor)"
build_path = /obj/machinery/turbine
board_type = "machine"
origin_tech = @'{"powerstorage":4,"engineering":4}'
req_components = list(
/obj/item/stock_parts/manipulator = 2,
/obj/item/stock_parts/capacitor = 4
)
additional_spawn_components = list(
/obj/item/stock_parts/console_screen = 1,
/obj/item/stock_parts/keyboard = 1,
/obj/item/stock_parts/power/apc/buildable = 1
)

/obj/item/stock_parts/circuitboard/teg_turbine
name = "circuitboard (thermoelectric generator turbine)"
build_path = /obj/machinery/atmospherics/binary/circulator
board_type = "machine"
origin_tech = @'{"powerstorage":4,"engineering":4}'
req_components = list(
/obj/item/stock_parts/manipulator = 3,
/obj/item/stock_parts/matter_bin = 3
)
additional_spawn_components = list(
/obj/item/stock_parts/power/apc/buildable = 1
)

/obj/item/stock_parts/circuitboard/teg_turbine/motor
name = "circuitboard (thermoelectric generator motor)"
build_path = /obj/machinery/generator
board_type = "machine"
origin_tech = @'{"powerstorage":4,"engineering":4}'
req_components = list(
/obj/item/stock_parts/manipulator = 2,
/obj/item/stock_parts/capacitor = 4
)
additional_spawn_components = list(
/obj/item/stock_parts/console_screen = 1,
/obj/item/stock_parts/keyboard = 1,
/obj/item/stock_parts/power/apc/buildable = 1
)

/obj/item/stock_parts/circuitboard/breaker
name = "circuitboard (breaker box)"
build_path = /obj/machinery/power/breakerbox
Expand Down
6 changes: 0 additions & 6 deletions code/modules/codex/entries/machinery.dm
Original file line number Diff line number Diff line change
Expand Up @@ -123,12 +123,6 @@
disambiguator = "machine"
available_to_map_tech_level = MAP_TECH_LEVEL_SPACE

/datum/codex_entry/smes
associated_paths = list(/obj/machinery/power/smes)
mechanics_text = "It's a big battery. An important part of the power network that ensures that you still have power when your generators eventually explode. Maximum input and output settings are available. <BR>The lights on the front show the status of the SMES: The column on the left shows stored power, a blinking red light at top right shows that it's on but receiving no power, blinking yellow shows that the SMES is charging, and the little light on the middle right shows whether it's outputting power or not. <BR>A floor terminal puts power into the SMES, and power is output to a wire underneath."
disambiguator = "machine"
available_to_map_tech_level = MAP_TECH_LEVEL_SPACE

/datum/codex_entry/vending
associated_paths = list(/obj/machinery/vending)
associated_strings = list("vending machine", "vendor")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,12 +188,6 @@
/datum/fabricator_recipe/imprinter/circuit/pacmanpotato
path = /obj/item/stock_parts/circuitboard/pacman/super/potato

/datum/fabricator_recipe/imprinter/circuit/batteryrack
path = /obj/item/stock_parts/circuitboard/batteryrack

/datum/fabricator_recipe/imprinter/circuit/smes_cell
path = /obj/item/stock_parts/circuitboard/smes

/datum/fabricator_recipe/imprinter/circuit/alerts
path = /obj/item/stock_parts/circuitboard/stationalert

Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,103 +1,3 @@
var/global/const/GEOTHERMAL_EFFICIENCY_MOD = 0.2
var/global/const/GEOTHERMAL_PRESSURE_LOSS = 0.3
var/global/const/GEOTHERMAL_PRESSURE_CONSUMED_PER_TICK = 0.05
var/global/const/GEOTHERMAL_PRESSURE_TO_POWER = 800
var/global/const/MAX_GEOTHERMAL_PRESSURE = 12000

//////////////////////////////////////////////////////////////////////
// Geyser Steam Particle Emitter
//////////////////////////////////////////////////////////////////////

///Particle emitter that emits a ~64 pixels by ~192 pixels high column of steam while active.
/particles/geyser_steam
icon_state = "smallsmoke"
icon = 'icons/effects/effects.dmi'
width = WORLD_ICON_SIZE * 2 //Particles expand a bit as they climb, so need a bit of space on the width
height = WORLD_ICON_SIZE * 6 //Needs to be really tall, because particles stop being drawn outside of the canvas.
count = 64
spawning = 5
lifespan = generator("num", 1 SECOND, 2.5 SECONDS, LINEAR_RAND)
fade = 3 SECONDS
fadein = 0.25 SECONDS
grow = 0.1
velocity = generator("vector", list(0, 0), list(0, 0.2))
position = generator("circle", -6, 6, NORMAL_RAND)
gravity = list(0, 0.40)
scale = generator("vector", list(0.3, 0.3), list(1,1), NORMAL_RAND)
rotation = generator("num", -45, 45)
spin = generator("num", -20, 20)

//////////////////////////////////////////////////////////////////////
// Geyser Object
//////////////////////////////////////////////////////////////////////

/// A prop that periodically emit steam spouts and can have a geothermal generator placed on top to generate power.
/obj/effect/geyser
name = "geothermal vent"
desc = "A vent leading to an underground geothermally heated reservoir, which periodically spews superheated liquid."
icon = 'icons/effects/geyser.dmi'
icon_state = "geyser"
anchored = TRUE
layer = TURF_LAYER + 0.01
level = LEVEL_BELOW_PLATING // Goes under floor/plating
/// The particle emitter that will generate the steam column effect for this geyser
var/particles/geyser_steam/steamfx

/obj/effect/geyser/Initialize(ml)
. = ..()
if(prob(50))
var/matrix/M = matrix()
M.Scale(-1, 1)
transform = M
set_extension(src, /datum/extension/geothermal_vent)
steamfx = new //Prepare our FX

///Async proc that enables the particle emitter for the steam column for a few seconds
/obj/effect/geyser/proc/do_spout()
set waitfor = FALSE
particles = steamfx
particles.spawning = initial(particles.spawning)
sleep(6 SECONDS)
particles.spawning = 0

/obj/effect/geyser/explosion_act(severity)
. = ..()
if(!QDELETED(src) && prob(100 - (25 * severity)))
physically_destroyed()

/obj/effect/geyser/hide(hide)
var/datum/extension/geothermal_vent/E = get_extension(src, /datum/extension/geothermal_vent)
if(istype(E))
E.set_obstructed(hide)
. = ..()
update_icon()

//////////////////////////////////////////////////////////////////////
// Underwater Geyser Variant
//////////////////////////////////////////////////////////////////////

/obj/effect/geyser/underwater
desc = "A crack in the ocean floor that occasionally vents gouts of superheated water and steam."

/obj/effect/geyser/underwater/Initialize(ml)
. = ..()
if(!loc)
return INITIALIZE_HINT_QDEL
for(var/turf/floor/seafloor/T in RANGE_TURFS(loc, 5))
var/dist = get_dist(loc, T)-1
if(prob(100 - (dist * 20)))
if(prob(25))
T = T.ChangeTurf(/turf/floor/clay)
else
T = T.ChangeTurf(/turf/floor/mud)
if(prob(50 - (dist * 10)))
new /obj/random/seaweed(T)

/obj/effect/geyser/underwater/do_spout()
set waitfor = FALSE
var/turf/T = get_turf(src)
T.show_bubbles()

//////////////////////////////////////////////////////////////////////
// Geothermal Generator
//////////////////////////////////////////////////////////////////////
Expand Down Expand Up @@ -131,6 +31,12 @@ var/global/const/MAX_GEOTHERMAL_PRESSURE = 12000
var/tmp/list/neighbor_connectors
var/tmp/list/neighbor_connectors_glow

var/const/GEOTHERMAL_EFFICIENCY_MOD = 0.2
var/const/GEOTHERMAL_PRESSURE_LOSS = 0.3
var/const/GEOTHERMAL_PRESSURE_CONSUMED_PER_TICK = 0.05
var/const/GEOTHERMAL_PRESSURE_TO_POWER = 800
var/const/MAX_GEOTHERMAL_PRESSURE = 12000

//#TODO: Maybe should cache neighbors and put listeners on them?

/obj/machinery/geothermal/Initialize(mapload, d, populate_parts = TRUE)
Expand Down
70 changes: 70 additions & 0 deletions code/modules/geothermal/_geothermal_geysers.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
//////////////////////////////////////////////////////////////////////
// Geyser Object
//////////////////////////////////////////////////////////////////////

/// A prop that periodically emit steam spouts and can have a geothermal generator placed on top to generate power.
/obj/effect/geyser
name = "geothermal vent"
desc = "A vent leading to an underground geothermally heated reservoir, which periodically spews superheated liquid."
icon = 'icons/effects/geyser.dmi'
icon_state = "geyser"
anchored = TRUE
layer = TURF_LAYER + 0.01
level = LEVEL_BELOW_PLATING // Goes under floor/plating
/// The particle emitter that will generate the steam column effect for this geyser
var/particles/geyser_steam/steamfx

/obj/effect/geyser/Initialize(ml)
. = ..()
if(prob(50))
var/matrix/M = matrix()
M.Scale(-1, 1)
transform = M
set_extension(src, /datum/extension/geothermal_vent)
steamfx = new //Prepare our FX

///Async proc that enables the particle emitter for the steam column for a few seconds
/obj/effect/geyser/proc/do_spout()
set waitfor = FALSE
particles = steamfx
particles.spawning = initial(particles.spawning)
sleep(6 SECONDS)
particles.spawning = 0

/obj/effect/geyser/explosion_act(severity)
. = ..()
if(!QDELETED(src) && prob(100 - (25 * severity)))
physically_destroyed()

/obj/effect/geyser/hide(hide)
var/datum/extension/geothermal_vent/E = get_extension(src, /datum/extension/geothermal_vent)
if(istype(E))
E.set_obstructed(hide)
. = ..()
update_icon()

//////////////////////////////////////////////////////////////////////
// Underwater Geyser Variant
//////////////////////////////////////////////////////////////////////

/obj/effect/geyser/underwater
desc = "A crack in the ocean floor that occasionally vents gouts of superheated water and steam."

/obj/effect/geyser/underwater/Initialize(ml)
. = ..()
if(!loc)
return INITIALIZE_HINT_QDEL
for(var/turf/floor/seafloor/T in RANGE_TURFS(loc, 5))
var/dist = get_dist(loc, T)-1
if(prob(100 - (dist * 20)))
if(prob(25))
T = T.ChangeTurf(/turf/floor/clay)
else
T = T.ChangeTurf(/turf/floor/mud)
if(prob(50 - (dist * 10)))
new /obj/random/seaweed(T)

/obj/effect/geyser/underwater/do_spout()
set waitfor = FALSE
var/turf/T = get_turf(src)
T.show_bubbles()
22 changes: 22 additions & 0 deletions code/modules/geothermal/_geothermal_particles.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
//////////////////////////////////////////////////////////////////////
// Geyser Steam Particle Emitter
//////////////////////////////////////////////////////////////////////

///Particle emitter that emits a ~64 pixels by ~192 pixels high column of steam while active.
/particles/geyser_steam
icon_state = "smallsmoke"
icon = 'icons/effects/effects.dmi'
width = WORLD_ICON_SIZE * 2 //Particles expand a bit as they climb, so need a bit of space on the width
height = WORLD_ICON_SIZE * 6 //Needs to be really tall, because particles stop being drawn outside of the canvas.
count = 64
spawning = 5
lifespan = generator("num", 1 SECOND, 2.5 SECONDS, LINEAR_RAND)
fade = 3 SECONDS
fadein = 0.25 SECONDS
grow = 0.1
velocity = generator("vector", list(0, 0), list(0, 0.2))
position = generator("circle", -6, 6, NORMAL_RAND)
gravity = list(0, 0.40)
scale = generator("vector", list(0.3, 0.3), list(1,1), NORMAL_RAND)
rotation = generator("num", -45, 45)
spin = generator("num", -20, 20)
Loading
Loading