From 171e63a66fb8f6a2efe55270eafa7262ab278199 Mon Sep 17 00:00:00 2001 From: Ccomp5950 Date: Wed, 15 Jan 2014 17:33:13 -0600 Subject: [PATCH 1/2] Moved Supermatter.dm out of the WorkInProgress directory. --- baystation12.dme | 2 +- .../Supermatter.dm => modules/supermatter/supermatter.dm} | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename code/{WorkInProgress/Yinadele/Supermatter.dm => modules/supermatter/supermatter.dm} (100%) diff --git a/baystation12.dme b/baystation12.dme index 3da2cd16b5..b1f4bfbe2d 100644 --- a/baystation12.dme +++ b/baystation12.dme @@ -1249,6 +1249,7 @@ #include "code\modules\scripting\Scanner\Tokens.dm" #include "code\modules\security levels\keycard authentication.dm" #include "code\modules\security levels\security levels.dm" +#include "code\modules\supermatter\supermatter.dm" #include "code\modules\surgery\appendix.dm" #include "code\modules\surgery\bones.dm" #include "code\modules\surgery\braincore.dm" @@ -1322,7 +1323,6 @@ #include "code\WorkInProgress\Ported\policetape.dm" #include "code\WorkInProgress\SkyMarshal\officer_stuff.dm" #include "code\WorkInProgress\SkyMarshal\Ultralight_procs.dm" -#include "code\WorkInProgress\Yinadele\Supermatter.dm" #include "code\ZAS\Airflow.dm" #include "code\ZAS\Connection.dm" #include "code\ZAS\Debug.dm" diff --git a/code/WorkInProgress/Yinadele/Supermatter.dm b/code/modules/supermatter/supermatter.dm similarity index 100% rename from code/WorkInProgress/Yinadele/Supermatter.dm rename to code/modules/supermatter/supermatter.dm From 1f7cbfbff48dc310f87c0b2b60e2e7e29c532b92 Mon Sep 17 00:00:00 2001 From: Ccomp5950 Date: Wed, 15 Jan 2014 20:22:50 -0600 Subject: [PATCH 2/2] Supermatter update. Now gives an instability% warning in it's messages. Limited the "If they can see it and aren't wearing mesons, have some hallucinations" range to a max of 7 Can't be pelted with lasers while out in space allowing for unlimited power only to drag it back on a turf and instantly explode. Removed extra if(!removed) check, we already checked for that above. Moved the oxygen ratio variable "oxygen" to be declared under the object instead of it's process proc for easier debugging. Changed the alert interval. Add luminosity value so the big glowing shard of supermatter actually generates light. --- code/modules/supermatter/supermatter.dm | 27 ++++++++++++++++--------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/code/modules/supermatter/supermatter.dm b/code/modules/supermatter/supermatter.dm index 32fe1c1cb0..a83723583b 100644 --- a/code/modules/supermatter/supermatter.dm +++ b/code/modules/supermatter/supermatter.dm @@ -11,7 +11,7 @@ #define DETONATION_HALLUCINATION 600 -#define WARNING_DELAY 60 //45 seconds between warnings. +#define WARNING_DELAY 30 //seconds between warnings. /obj/machinery/power/supermatter name = "Supermatter" @@ -20,6 +20,7 @@ icon_state = "darkmatter" density = 1 anchored = 0 + luminosity = 4 var/gasefficency = 0.25 @@ -39,9 +40,10 @@ var/explosion_power = 8 var/lastwarning = 0 // Time in 1/10th of seconds since the last sent warning - var/power = 0 + var/oxygen = 0 // Moving this up here for easier debugging. + //Temporary values so that we can optimize this //How much the bullets damage should be multiplied by when it is added to the internal variables var/config_bullet_energy = 2 @@ -102,21 +104,20 @@ power = min(power, 1600) return 1 - if (!removed) - return 1 - damage_archived = damage damage = max( damage + ( (removed.temperature - 800) / 150 ) , 0 ) if(damage > warning_point) // while the core is still damaged and it's still worth noting its status if((world.timeofday - lastwarning) / 10 >= WARNING_DELAY) - + var/stability = num2text(round((damage / explosion_point) * 100)) + if(damage > emergency_point) - radio.autosay(emergency_alert, "Supermatter Monitor") + + radio.autosay(addtext(emergency_alert, " Stability: ",stability,"%"), "Supermatter Monitor") lastwarning = world.timeofday else if(damage >= damage_archived) // The damage is still going up - radio.autosay(warning_alert, "Supermatter Monitor") + radio.autosay(addtext(warning_alert," Stability: ",stability,"%"), "Supermatter Monitor") lastwarning = world.timeofday - 150 else // Phew, we're safe @@ -135,7 +136,7 @@ //Ok, 100% oxygen atmosphere = best reaction //Maxes out at 100% oxygen pressure - var/oxygen = max(min((removed.oxygen - (removed.nitrogen * NITROGEN_RETARDATION_FACTOR)) / MOLES_CELLSTANDARD, 1), 0) + oxygen = max(min((removed.oxygen - (removed.nitrogen * NITROGEN_RETARDATION_FACTOR)) / MOLES_CELLSTANDARD, 1), 0) var/temp_factor = 100 @@ -174,7 +175,7 @@ env.merge(removed) - for(var/mob/living/carbon/human/l in view(src, round(power ** 0.25))) // you have to be seeing the core to get hallucinations + for(var/mob/living/carbon/human/l in view(src, min(7, round(power ** 0.25)))) // If they can see it without mesons on. Bad on them. if(!istype(l.glasses, /obj/item/clothing/glasses/meson)) l.hallucination = max(0, min(200, l.hallucination + power * config_hallucination_power * sqrt( 1 / get_dist(l, src) ) ) ) @@ -188,6 +189,12 @@ /obj/machinery/power/supermatter/bullet_act(var/obj/item/projectile/Proj) + var/turf/L = loc + if(!istype(L)) // We don't run process() when we are in space + return 0 // This stops people from being able to really power up the supermatter + // Then bring it inside to explode instantly upon landing on a valid turf. + + if(Proj.flag != "bullet") power += Proj.damage * config_bullet_energy else