diff --git a/code/modules/admin/verbs/debug.dm b/code/modules/admin/verbs/debug.dm index 4131e46411b..72bf9cfb6ef 100644 --- a/code/modules/admin/verbs/debug.dm +++ b/code/modules/admin/verbs/debug.dm @@ -968,6 +968,89 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that if(SMES.anchored) SMES.chargemode = 1 +/client/proc/setup_supermatter_engine() + set category = "Debug" + set name = "Setup supermatter" + set desc = "Sets up the supermatter engine" + + if(!check_rights(R_DEBUG|R_ADMIN)) return + + var/response = alert("Are you sure? This will start up the engine. Should only be used during debug!",,"Setup Completely","Setup except coolant","No") + + if(response == "No") + return + + var/found_the_pump = 0 + var/obj/machinery/power/supermatter/SM + + for(var/obj/machinery/M in world) + if(!M) + continue + if(!M.loc) + continue + if(!M.loc.loc) + continue + + if(istype(M.loc.loc,/area/engine/engine_room)) + if(istype(M,/obj/machinery/power/rad_collector)) + var/obj/machinery/power/rad_collector/Rad = M + Rad.anchored = 1 + Rad.connect_to_network() + + var/obj/item/weapon/tank/plasma/Plasma = new/obj/item/weapon/tank/plasma(Rad) + + Plasma.air_contents.toxins = 29.1154 //This is a full tank if you filled it from a canister + Rad.P = Plasma + + Plasma.loc = Rad + + if(!Rad.active) + Rad.toggle_power() + Rad.update_icon() + + else if(istype(M,/obj/machinery/atmospherics/binary/pump)) //Turning on every pump. + var/obj/machinery/atmospherics/binary/pump/Pump = M + if(Pump.name == "Engine Feed" && response == "Setup Completely") + found_the_pump = 1 + Pump.air2.nitrogen = 3750 //The contents of 2 canisters. + Pump.air2.temperature = 50 + Pump.air2.update_values() + Pump.on=1 + Pump.target_pressure = 4500 + Pump.update_icon() + + else if(istype(M,/obj/machinery/power/supermatter)) + SM = M + spawn(50) + SM.power = 320 + + else if(istype(M,/obj/machinery/power/smes)) //This is the SMES inside the engine room. We don't need much power. + var/obj/machinery/power/smes/SMES = M + SMES.chargemode = 1 + SMES.chargelevel = 200000 + SMES.output = 75000 + + else if(istype(M.loc.loc,/area/engine/engine_smes)) //Set every SMES to charge and spit out 300,000 power between the 4 of them. + if(istype(M,/obj/machinery/power/smes)) + var/obj/machinery/power/smes/SMES = M + SMES.chargemode = 1 + SMES.chargelevel = 200000 + SMES.output = 75000 + + if(!found_the_pump && response == "Setup Completely") + src << "\red Unable to locate air supply to fill up with coolant, adding some coolant around the supermatter" + var/turf/simulated/T = SM.loc + T.zone.air.nitrogen += 450 + T.zone.air.temperature = 50 + T.zone.air.update_values() + + + log_admin("[key_name(usr)] setup the supermatter engine [response == "Setup except coolant" ? "without coolant" : ""]") + message_admins("\blue [key_name_admin(usr)] setup the supermatter engine [response == "Setup except coolant" ? "without coolant": ""]", 1) + return + + + /client/proc/cmd_debug_mob_lists() set category = "Debug" set name = "Debug Mob Lists" diff --git a/code/modules/admin/verbs/mapping.dm b/code/modules/admin/verbs/mapping.dm index 2e092689c3d..0a7c1fe345e 100644 --- a/code/modules/admin/verbs/mapping.dm +++ b/code/modules/admin/verbs/mapping.dm @@ -161,6 +161,7 @@ var/list/debug_verbs = list ( ,/client/proc/hide_debug_verbs ,/client/proc/testZAScolors ,/client/proc/testZAScolors_remove + ,/client/proc/setup_supermatter_engine ) diff --git a/code/modules/supermatter/supermatter.dm b/code/modules/supermatter/supermatter.dm index f1ca0acc799..3fc7e7d9a75 100644 --- a/code/modules/supermatter/supermatter.dm +++ b/code/modules/supermatter/supermatter.dm @@ -1,8 +1,8 @@ #define NITROGEN_RETARDATION_FACTOR 4 //Higher == N2 slows reaction more -#define THERMAL_RELEASE_MODIFIER 10 //Higher == less heat released during reaction +#define THERMAL_RELEASE_MODIFIER 750 //Higher == more heat released during reaction #define PLASMA_RELEASE_MODIFIER 1500 //Higher == less plasma released by reaction -#define OXYGEN_RELEASE_MODIFIER 750 //Higher == less oxygen released at high temperature/power +#define OXYGEN_RELEASE_MODIFIER 1500 //Higher == less oxygen released at high temperature/power #define REACTION_POWER_MODIFIER 1.1 //Higher == more overall power @@ -167,9 +167,13 @@ //Also keep in mind we are only adding this temperature to (efficiency)% of the one tile the rock //is on. An increase of 4*C @ 25% efficiency here results in an increase of 1*C / (#tilesincore) overall. - removed.temperature += (device_energy / THERMAL_RELEASE_MODIFIER) + + var/thermal_power = THERMAL_RELEASE_MODIFIER + if(removed.total_moles < 35) thermal_power += 750 //If you don't add coolant, you are going to have a bad time. - removed.temperature = max(0, min(removed.temperature, 2500)) + removed.temperature += ((device_energy * thermal_power) / max(1, removed.heat_capacity())) + + removed.temperature = max(0, min(removed.temperature, 10000)) //Calculate how much gas to release removed.toxins += max(device_energy / PLASMA_RELEASE_MODIFIER, 0)