From 801956a1f9932aaa1c03bd596cf9c7802fdab84e Mon Sep 17 00:00:00 2001 From: Putnam Date: Sun, 3 May 2020 17:44:00 -0700 Subject: [PATCH] Reverts #10352. --- code/game/objects/items/miscellaneous.dm | 8 ----- code/modules/cargo/packs/engine.dm | 10 +----- code/modules/power/supermatter/supermatter.dm | 36 ++++--------------- 3 files changed, 8 insertions(+), 46 deletions(-) diff --git a/code/game/objects/items/miscellaneous.dm b/code/game/objects/items/miscellaneous.dm index c6bb350929..c4bb8c594c 100644 --- a/code/game/objects/items/miscellaneous.dm +++ b/code/game/objects/items/miscellaneous.dm @@ -123,11 +123,3 @@ w_class = WEIGHT_CLASS_BULKY attack_verb = list("skubbed") -/obj/item/supermatterspray - name = "supermatter spray" - desc = "A spray bottle containing some kind of magical spray to fix the SM. \"Do not inhale.\" is written on the side. Unless aimed at the supermatter, it does nothing." - icon = 'icons/obj/supermatter.dmi' - icon_state = "supermatterspray" - w_class = WEIGHT_CLASS_SMALL - var/usesleft = 2 - diff --git a/code/modules/cargo/packs/engine.dm b/code/modules/cargo/packs/engine.dm index 27891f3ab6..89775c07ee 100644 --- a/code/modules/cargo/packs/engine.dm +++ b/code/modules/cargo/packs/engine.dm @@ -148,15 +148,7 @@ crate_name = "supermatter shard crate" crate_type = /obj/structure/closet/crate/secure/engineering dangerous = TRUE - -/datum/supply_pack/engine/supermatter_spray - name = "Supermatter Spray Crate" - desc = "The single thing that can truly heal the supermatter." - cost = 2000 - contains = list(/obj/item/supermatterspray) - crate_name = "supermatter shard crate" - crate_type = /obj/structure/closet/crate/engineering/electrical - + /datum/supply_pack/engine/tesla_coils name = "Tesla Coil Crate" desc = "Whether it's high-voltage executions, creating research points, or just plain old power generation: This pack of four Tesla coils can do it all!" diff --git a/code/modules/power/supermatter/supermatter.dm b/code/modules/power/supermatter/supermatter.dm index 92d97365b3..650961e2f4 100644 --- a/code/modules/power/supermatter/supermatter.dm +++ b/code/modules/power/supermatter/supermatter.dm @@ -66,8 +66,6 @@ #define SUPERMATTER_COUNTDOWN_TIME 30 SECONDS -#define SUPERMATTER_INTEGRITY_MULT 1.3 //(loss of integrity / 10) ^ 1.3 - GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal) /obj/machinery/power/supermatter_crystal @@ -160,8 +158,6 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal) var/datum/looping_sound/supermatter/soundloop var/moveable = FALSE - var/min_damage = 0 - var/power_calc = 0 /obj/machinery/power/supermatter_crystal/Initialize() . = ..() @@ -356,7 +352,6 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal) //capping damage damage = min(damage_archived + (DAMAGE_HARDCAP * explosion_point),damage) - damage = max(min_damage, damage) //max integrity if(damage > damage_archived && prob(10)) playsound(get_turf(src), 'sound/effects/empulse.ogg', 50, 1) @@ -396,7 +391,7 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal) if(matter_power) var/removed_matter = max(matter_power/MATTER_POWER_CONVERSION, 40) - power_calc = max(power_calc + removed_matter, 0) + power = max(power + removed_matter, 0) matter_power = max(matter_power - removed_matter, 0) var/temp_factor = 50 @@ -409,7 +404,7 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal) temp_factor = 30 icon_state = base_icon_state - power_calc = max( (removed.temperature * temp_factor / T0C) * gasmix_power_ratio + power_calc, 0) //Total laser power plus an overload + power = max( (removed.temperature * temp_factor / T0C) * gasmix_power_ratio + power, 0) //Total laser power plus an overload if(prob(50)) radiation_pulse(src, power * (1 + (tritiumcomp * TRITIUM_RADIOACTIVITY_MODIFIER) + ((pluoxiumcomp * PLUOXIUM_RADIOACTIVITY_MODIFIER) * pluoxiumbonus) * (power_transmission_bonus/(10-(bzcomp * BZ_RADIOACTIVITY_MODIFIER))))) // Rad Modifiers BZ(500%), Tritium(300%), and Pluoxium(-200%) @@ -441,19 +436,15 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal) for(var/mob/living/carbon/human/l in view(src, HALLUCINATION_RANGE(power))) // If they can see it without mesons on. Bad on them. if(!istype(l.glasses, /obj/item/clothing/glasses/meson)) var/D = sqrt(1 / max(1, get_dist(l, src))) - l.hallucination += power_calc * config_hallucination_power * D + l.hallucination += power * config_hallucination_power * D l.hallucination = clamp(0, 200, l.hallucination) for(var/mob/living/l in range(src, round((power / 100) ** 0.25))) var/rads = (power / 10) * sqrt( 1 / max(get_dist(l, src),1) ) l.rad_act(rads) - power_calc -= ((power_calc/500)**3) * powerloss_inhibitor - if ((100-get_integrity()) < 75) - power = (power_calc * ((100 - (0.15*(100-get_integrity()) - 5)**2) / 100)) + power_calc*0.1 - else - power = power_calc * (((100-get_integrity())**((3*(100-get_integrity()))/1000) + 2*(100-get_integrity()))/100) //new and improved, more linear - //power = power_calc * ((((100-get_integrity())**1.3)-(2*(100-get_integrity())))/100) + power -= ((power/500)**3) * powerloss_inhibitor + if(power > POWER_PENALTY_THRESHOLD || damage > damage_penalty_point) if(power > POWER_PENALTY_THRESHOLD) @@ -476,9 +467,7 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal) supermatter_anomaly_gen(src, GRAVITATIONAL_ANOMALY, rand(5, 10)) if(power > SEVERE_POWER_PENALTY_THRESHOLD && prob(2) || prob(0.3) && power > POWER_PENALTY_THRESHOLD) supermatter_anomaly_gen(src, PYRO_ANOMALY, rand(5, 10)) - if (damage - damage_archived > 0) - min_damage += ((damage - damage_archived) / 9) * SUPERMATTER_INTEGRITY_MULT - if(damage > (min_damage < 200 ? min_damage : 0) + warning_point) // while the core is still damaged and it's still worth noting its status + if(damage > warning_point) // while the core is still damaged and it's still worth noting its status if((REALTIMEOFDAY - lastwarning) / 10 >= WARNING_DELAY) alarm() @@ -517,7 +506,7 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal) if(!istype(Proj.firer, /obj/machinery/power/emitter)) investigate_log("has been hit by [Proj] fired by [key_name(Proj.firer)]", INVESTIGATE_SUPERMATTER) if(Proj.flag != "bullet") - power_calc += Proj.damage * config_bullet_energy + power += Proj.damage * config_bullet_energy if(!has_been_powered) investigate_log("has been powered for the first time.", INVESTIGATE_SUPERMATTER) message_admins("[src] has been powered for the first time [ADMIN_JMP(src)].") @@ -618,17 +607,6 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal) to_chat(user, "You extract a sliver from \the [src]. \The [src] begins to react violently!") new /obj/item/nuke_core/supermatter_sliver(drop_location()) matter_power += 200 - if (istype(W, /obj/item/supermatterspray)) - var/obj/item/supermatterspray/S = W - if (S.usesleft > 0 && do_after(user, 60, target=src)) - min_damage = max(0,min_damage - 10) - to_chat(user, "You spray \the [src] with [S].") - playsound(user.loc,'sound/effects/spray2.ogg',50,1,-6) - S.usesleft-- - if (prob(10)) - to_chat(user, "Your hands slip and you drop [S] into \the [src]!") - Consume(S) - return else if(user.dropItemToGround(W)) user.visible_message("As [user] touches \the [src] with \a [W], silence fills the room...",\ "You touch \the [src] with \the [W], and everything suddenly goes silent.\n\The [W] flashes into dust as you flinch away from \the [src].",\