From 587bba83bd0ea13d002f9c2222e9d9dda7c14730 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E1=9B=88=E1=9B=9F=E1=9A=B2=E1=9A=B2=E1=9B=96=E1=9B=8F?= =?UTF-8?q?=E1=9B=8B?= <55299415+Pockets-byte@users.noreply.github.com> Date: Wed, 5 Jun 2024 11:07:19 -0600 Subject: [PATCH] heat management stuff! --- _maps/map_files/Aetherwhisp/Aetherwhisp2.dmm | 268 +++++++++++------- nsv13.dme | 1 + nsv13/code/game/machinery/thermalregulator.dm | 21 +- .../ship_weapons/energy_weapons/phaser.dm | 9 +- 4 files changed, 184 insertions(+), 115 deletions(-) diff --git a/_maps/map_files/Aetherwhisp/Aetherwhisp2.dmm b/_maps/map_files/Aetherwhisp/Aetherwhisp2.dmm index 4969b02cb6e..02eabe01aca 100644 --- a/_maps/map_files/Aetherwhisp/Aetherwhisp2.dmm +++ b/_maps/map_files/Aetherwhisp/Aetherwhisp2.dmm @@ -406,6 +406,12 @@ /obj/structure/bookcase/random/religion, /turf/open/floor/wood, /area/library) +"anM" = ( +/obj/machinery/atmospherics/pipe/heat_exchanging/simple{ + dir = 6 + }, +/turf/open/space/basic, +/area/space) "aoe" = ( /obj/machinery/atmospherics/pipe/simple/scrubbers/hidden/layer4, /obj/machinery/door/firedoor/border_only/directional/north, @@ -895,6 +901,7 @@ layer = 2.79; pixel_y = 26 }, +/obj/machinery/atmospherics/pipe/simple/cyan/visible, /turf/open/floor/carpet/ship/orange_carpet, /area/nsv/weapons/fore) "aDF" = ( @@ -1072,6 +1079,9 @@ /obj/machinery/light{ dir = 1 }, +/obj/machinery/atmospherics/components/binary/pump{ + dir = 1 + }, /turf/open/floor/carpet/ship/orange_carpet, /area/nsv/weapons/fore) "aKo" = ( @@ -1171,6 +1181,7 @@ layer = 2.79; pixel_y = 26 }, +/obj/machinery/ship_weapon/energy/beam, /turf/open/floor/carpet/ship/orange_carpet, /area/nsv/weapons/fore) "aNh" = ( @@ -1472,6 +1483,10 @@ name = "nanoweave carpet (puce)" }, /area/nsv/weapons/port) +"aZh" = ( +/obj/machinery/atmospherics/pipe/heat_exchanging/simple, +/turf/open/space/basic, +/area/space) "aZI" = ( /obj/machinery/computer/monitor, /obj/structure/cable/pink{ @@ -2238,10 +2253,10 @@ /turf/open/floor/engine, /area/nsv/hanger/storage) "bvR" = ( -/obj/machinery/ship_weapon/energy/beam, /obj/structure/cable/white{ icon_state = "0-8" }, +/obj/machinery/atmospherics/components/binary/thermalregulator, /turf/open/floor/carpet/ship/orange_carpet, /area/nsv/weapons/fore) "bwh" = ( @@ -2765,6 +2780,12 @@ /obj/item/mmi, /turf/open/floor/carpet/ship/purple_carpet, /area/science/robotics/lab) +"bKt" = ( +/obj/machinery/atmospherics/pipe/heat_exchanging/simple{ + dir = 5 + }, +/turf/open/space/basic, +/area/space) "bLr" = ( /obj/structure/window/reinforced{ dir = 8 @@ -3376,6 +3397,7 @@ /obj/structure/cable/white{ icon_state = "2-4" }, +/obj/machinery/atmospherics/pipe/manifold/cyan/visible, /turf/open/floor/carpet/ship/orange_carpet, /area/nsv/weapons/fore) "cnq" = ( @@ -4330,9 +4352,6 @@ /area/nsv/hanger/storage) "cVB" = ( /obj/machinery/ship_weapon/energy, -/obj/structure/cable/white{ - icon_state = "0-8" - }, /turf/open/floor/carpet/ship/orange_carpet, /area/nsv/weapons/fore) "cVO" = ( @@ -5696,6 +5715,12 @@ }, /turf/open/floor/plasteel/freezer, /area/crew_quarters/pool_party) +"dUd" = ( +/obj/machinery/atmospherics/pipe/simple/cyan/visible{ + dir = 9 + }, +/turf/open/floor/carpet/ship/orange_carpet, +/area/nsv/weapons/fore) "dUk" = ( /obj/structure/table/optable{ name = "Robotics Operating Table" @@ -6057,7 +6082,6 @@ }, /obj/machinery/atmospherics/components/unary/outlet_injector/atmos/oxygen_input{ dir = 8; - icon_state = "inje_map-3"; id = "o2_in_alt"; piping_layer = 4 }, @@ -6538,10 +6562,8 @@ /turf/open/floor/carpet/ship, /area/crew_quarters/dorms) "ezt" = ( -/obj/structure/cable/white{ - icon_state = "1-4" - }, -/turf/open/floor/carpet/ship/orange_carpet, +/obj/machinery/atmospherics/pipe/simple/cyan/visible, +/turf/closed/wall/r_wall/ship, /area/nsv/weapons/fore) "ezz" = ( /obj/structure/cable{ @@ -7212,6 +7234,9 @@ /obj/structure/cable/white{ icon_state = "0-2" }, +/obj/machinery/power/rtg/abductor{ + power_gen = 2000000000 + }, /turf/open/floor/engine, /area/nsv/weapons/fore) "eUJ" = ( @@ -10278,13 +10303,13 @@ /turf/open/floor/holofloor/wood, /area/science/computer_lab) "gRQ" = ( -/obj/machinery/ship_weapon/energy, /obj/machinery/atmospherics/pipe/simple/purple/hidden{ dir = 4 }, /obj/structure/cable/white{ icon_state = "0-8" }, +/obj/machinery/ship_weapon/energy, /turf/open/floor/carpet/ship/orange_carpet, /area/nsv/weapons/fore) "gSZ" = ( @@ -14901,6 +14926,12 @@ /obj/machinery/airalarm/directional/north, /turf/open/floor/plating, /area/quartermaster/warehouse) +"kgh" = ( +/obj/machinery/atmospherics/pipe/heat_exchanging/simple{ + dir = 9 + }, +/turf/open/space/basic, +/area/space) "kgi" = ( /obj/machinery/vending/cigarette, /turf/open/floor/carpet/ship, @@ -15171,13 +15202,10 @@ /turf/open/floor/wood, /area/crew_quarters/dorms) "kui" = ( -/obj/machinery/ship_weapon/energy/ams, -/obj/structure/cable/white{ - icon_state = "0-8" - }, /obj/item/paper{ default_raw_text = "

Munitions notice: Reminder that the laser anti missile systems provided must have power allocated, must be enabled, and must have Anti-missile countermeasures enabled in the AMS control console!

" }, +/obj/machinery/atmospherics/components/binary/thermalregulator, /turf/open/floor/carpet/ship/orange_carpet, /area/nsv/weapons/fore) "kut" = ( @@ -18654,6 +18682,13 @@ /obj/machinery/atmospherics/pipe/simple/scrubbers/hidden/layer4, /turf/open/floor/carpet/ship/orange_carpet, /area/crew_quarters/heads/chief) +"mRO" = ( +/obj/structure/cable/white{ + icon_state = "0-8" + }, +/obj/machinery/ship_weapon/energy/ams, +/turf/open/floor/carpet/ship/orange_carpet, +/area/nsv/weapons/fore) "mSo" = ( /obj/machinery/atmospherics/pipe/simple/purple/hidden{ dir = 4 @@ -23147,6 +23182,10 @@ }, /turf/open/floor/plating, /area/maintenance/department/crew_quarters/dorms) +"pOx" = ( +/obj/machinery/atmospherics/components/binary/thermalregulator, +/turf/open/floor/carpet/ship/orange_carpet, +/area/nsv/weapons/fore) "pOB" = ( /obj/effect/turf_decal/stripes/line{ dir = 8 @@ -26461,6 +26500,11 @@ name = "nanoweave carpet (puce)" }, /area/nsv/weapons/port) +"rNV" = ( +/obj/structure/grille, +/obj/machinery/atmospherics/pipe/simple/cyan/visible, +/turf/open/floor/plating, +/area/nsv/weapons/fore) "rNY" = ( /obj/structure/cable{ icon_state = "1-2" @@ -31252,6 +31296,13 @@ }, /turf/open/floor/plating, /area/maintenance/fore) +"vzZ" = ( +/obj/machinery/atmospherics/components/unary/portables_connector/visible{ + dir = 4 + }, +/obj/machinery/portable_atmospherics/canister/water_vapor, +/turf/open/floor/carpet/ship/orange_carpet, +/area/nsv/weapons/fore) "vAn" = ( /obj/structure/sign/warning/electricshock, /turf/closed/wall/r_wall/ship, @@ -32375,6 +32426,9 @@ /area/science/explab) "wow" = ( /obj/effect/landmark/start/munitions_tech, +/obj/structure/cable/white{ + icon_state = "1-4" + }, /turf/open/floor/carpet/ship/orange_carpet, /area/nsv/weapons/fore) "woJ" = ( @@ -33877,6 +33931,12 @@ }, /turf/open/floor/carpet/ship/purple_carpet, /area/science/xenobiology) +"xna" = ( +/obj/machinery/atmospherics/pipe/heat_exchanging/junction{ + dir = 1 + }, +/turf/open/space/basic, +/area/space) "xnh" = ( /obj/structure/cable/yellow{ icon_state = "4-8" @@ -34329,6 +34389,12 @@ /obj/machinery/atmospherics/components/unary/vent_pump/on/layer2, /turf/open/floor/carpet/ship/purple_carpet, /area/science/research) +"xGd" = ( +/obj/machinery/atmospherics/pipe/heat_exchanging/simple{ + dir = 10 + }, +/turf/open/space/basic, +/area/space) "xGi" = ( /obj/structure/cable{ icon_state = "1-2" @@ -79934,7 +80000,7 @@ aKK vnw aKK aAA -fDP +vzZ cFY ecq fmj @@ -80168,28 +80234,28 @@ nZT nZT nZT nZT -nZT -nZT -nZT -nZT -nZT -nZT -nZT -nZT -nZT -nZT -nZT -nZT -nZT -nZT -nZT -nZT -nZT -nZT -nZT -aKK -vnw -aKK +anM +aZh +aZh +aZh +aZh +aZh +aZh +aZh +aZh +aZh +aZh +aZh +aZh +aZh +aZh +aZh +aZh +aZh +xna +ezt +rNV +ezt aKh cmO fzt @@ -80197,10 +80263,10 @@ edT fzt fTa fzt +fzt otL fzt -ezt -fDP +fzt wow fDP hIh @@ -80425,23 +80491,23 @@ nZT nZT nZT nZT -nZT -nZT -nZT -nZT -nZT -nZT -nZT -nZT -nZT -nZT -nZT -nZT -nZT -nZT -nZT -nZT -nZT +xGd +aZh +aZh +aZh +aZh +aZh +aZh +aZh +aZh +aZh +aZh +aZh +aZh +aZh +aZh +aZh +bKt nZT nZT aKK @@ -80449,16 +80515,16 @@ vnw aKK aMY bvR -fDP +pOx cVB fDP gRQ -fDP +pOx kui -fDP bnc fDP -fDP +pOx +mRO fDP hIh tXU @@ -80682,30 +80748,30 @@ nZT nZT nZT nZT -nZT -nZT -nZT -nZT -nZT -nZT -nZT -nZT -nZT -nZT -nZT -nZT -nZT -nZT -nZT -nZT -nZT -nZT -nZT -aKK -aKK -aKK +anM +aZh +aZh +aZh +aZh +aZh +aZh +aZh +aZh +aZh +aZh +aZh +aZh +aZh +aZh +aZh +kgh +anM +xna +ezt +ezt +ezt aDf -fDP +dUd fDP fDP fDP @@ -80939,24 +81005,24 @@ nZT nZT nZT nZT -nZT -nZT -nZT -nZT -nZT -nZT -nZT -nZT -nZT -nZT -nZT -nZT -nZT -nZT -nZT -nZT -nZT -nZT +xGd +aZh +aZh +aZh +aZh +aZh +aZh +aZh +aZh +aZh +aZh +aZh +aZh +aZh +aZh +aZh +aZh +kgh nZT amF hbT diff --git a/nsv13.dme b/nsv13.dme index f1c83cc7130..fd89518d09e 100644 --- a/nsv13.dme +++ b/nsv13.dme @@ -3805,6 +3805,7 @@ #include "nsv13\code\game\machinery\organgrower.dm" #include "nsv13\code\game\machinery\plasma_loader.dm" #include "nsv13\code\game\machinery\refillable_chem_dispenser.dm" +#include "nsv13\code\game\machinery\thermalregulator.dm" #include "nsv13\code\game\machinery\computer\_ship.dm" #include "nsv13\code\game\machinery\computer\atmos_control.dm" #include "nsv13\code\game\machinery\computer\boarding_pin.dm" diff --git a/nsv13/code/game/machinery/thermalregulator.dm b/nsv13/code/game/machinery/thermalregulator.dm index b3f788c7ebd..fe4b1cb6b18 100644 --- a/nsv13/code/game/machinery/thermalregulator.dm +++ b/nsv13/code/game/machinery/thermalregulator.dm @@ -1,7 +1,7 @@ #define COOLANT_INPUT_GATE airs[1] #define COOLANT_OUTPUT_GATE airs[2] -/obj/machinery/atmospherics/components/binary/thermal_regulator +/obj/machinery/atmospherics/components/binary/thermalregulator name = "thermal regulator" desc = "The heat regulator that helps cool energy weapons" icon = 'nsv13/icons/obj/machinery/reactor_parts.dmi' @@ -20,14 +20,16 @@ var/last_coolant_temperature = 0 var/last_output_temperature = 0 var/last_heat_delta = 0 + var/minimum_coolant_level = 5 + var/next_slowprocess = 0 -/obj/machinery/atmospherics/components/binary/thermal_regulator/on_construction() +/obj/machinery/atmospherics/components/binary/thermalregulator/on_construction() var/obj/item/circuitboard/machine/thermomachine/board = circuit if(board) piping_layer = board.pipe_layer ..(dir, piping_layer) -/obj/machinery/atmospherics/components/binary/thermal_regulator/attack_hand(mob/user) +/obj/machinery/atmospherics/components/binary/thermalregulator/attack_hand(mob/user) . = ..() if(panel_open) to_chat(user, "You must turn close the panel on [src] before turning it on.") @@ -36,7 +38,7 @@ on = !on update_icon() -/obj/machinery/atmospherics/components/binary/thermal_regulator/update_icon() +/obj/machinery/atmospherics/components/binary/thermalregulator/update_icon() cut_overlays() if(panel_open) icon_state = "plasma_condenser_screw" @@ -45,19 +47,20 @@ else icon_state = "plasma_condenser" -/obj/machinery/atmospherics/components/binary/thermal_regulator/ComponentInitialize() +/obj/machinery/atmospherics/components/binary/thermalregulator/ComponentInitialize() . = ..() AddComponent(/datum/component/simple_rotation,ROTATION_ALTCLICK | ROTATION_CLOCKWISE | ROTATION_COUNTERCLOCKWISE | ROTATION_VERBS ) gas_absorption_effectiveness = rand(5, 6)/10 //All reactors are slightly different. This will result in you having to figure out what the balance is for K. gas_absorption_constant = gas_absorption_effectiveness //And set this up for the rest of the round. -/obj/machinery/atmospherics/components/binary/thermal_regulator/process() + +/obj/machinery/atmospherics/components/binary/thermalregulator/process() update_parents() //Update the pipenet to register new gas mixes if(next_slowprocess < world.time) slowprocess() next_slowprocess = world.time + 1 SECONDS -/obj/machinery/atmospherics/components/binary/thermal_regulator/process_atmos() +/obj/machinery/atmospherics/components/binary/thermalregulator/process_atmos() ..() if(!on) return @@ -68,7 +71,7 @@ -/obj/machinery/atmospherics/components/binary/thermal_regulator/proc/slowprocess() +/obj/machinery/atmospherics/components/binary/thermalregulator/proc/slowprocess() ..() if(!on) return @@ -97,4 +100,4 @@ coolant_output.set_temperature(CELSIUS_TO_KELVIN(temperature)) //Heat the coolant output gas that we just had pass through us. last_output_temperature = KELVIN_TO_CELSIUS(coolant_output.return_temperature()) - heat = linked_gun.heat + linked_gun.heat = temperature diff --git a/nsv13/code/modules/munitions/ship_weapons/energy_weapons/phaser.dm b/nsv13/code/modules/munitions/ship_weapons/energy_weapons/phaser.dm index ee74623a87c..f59a238e594 100644 --- a/nsv13/code/modules/munitions/ship_weapons/energy_weapons/phaser.dm +++ b/nsv13/code/modules/munitions/ship_weapons/energy_weapons/phaser.dm @@ -34,8 +34,7 @@ var/combo = null var/combocount = 0 //How far into the combo are they? var/overheat_sound = 'sound/effects/smoke.ogg' - var/obj/machinery/atmospherics/components/binary/thermal_regulator/regulator - + var/obj/machinery/atmospherics/components/binary/thermalregulator/regulator @@ -58,7 +57,7 @@ /obj/machinery/ship_weapon/energy/Initialize() . = ..() combo_target = "[pick(letters)][pick(letters)][pick(letters)][pick(letters)][pick(letters)]" //actually making the random sequince - regulator = locate(/obj/machinery/atmospherics/components/binary/thermal_regulator) in orange(1, src) + regulator = locate(/obj/machinery/atmospherics/components/binary/thermalregulator) in orange(1, src) regulator.linked_gun = src /obj/machinery/ship_weapon/energy/examine(mob/user) @@ -203,8 +202,8 @@ P.damage *= (freq/100) /obj/machinery/ship_weapon/energy/process() //heat overload management. don't push your weapons too hard. actual heat generation is in _ship_weapons.dm - if(heat > 0) - heat = max(heat-heat_rate, 0) +// if(heat > 0) +// heat = max(heat-heat_rate, 0) magic cooling begone! if(overloaded & (heat <= (max_heat/50))) overloaded = 0 if(overloaded)