more changes

This commit is contained in:
Seris02
2019-12-30 18:48:29 +08:00
parent 8ef8d34dcc
commit 714f76c8aa
4 changed files with 38 additions and 9 deletions

View File

@@ -19,3 +19,11 @@
icon_state = "skub"
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

View File

@@ -149,6 +149,14 @@
crate_type = /obj/structure/closet/crate/secure/engineering
dangerous = TRUE
/datum/supply_pack/engine/supermatter_shard
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!"

View File

@@ -161,6 +161,7 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal)
var/moveable = FALSE
var/min_damage = 0
var/power_calc = 0
/obj/machinery/power/supermatter_crystal/Initialize()
. = ..()
@@ -402,7 +403,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 = max(power + removed_matter, 0)
power_calc = max(power_calc + removed_matter, 0)
matter_power = max(matter_power - removed_matter, 0)
var/temp_factor = 50
@@ -415,7 +416,7 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal)
temp_factor = 30
icon_state = base_icon_state
power = max( (removed.temperature * temp_factor / T0C) * gasmix_power_ratio + power, 0) //Total laser power plus an overload
power_calc = max( (removed.temperature * temp_factor / T0C) * gasmix_power_ratio + power_calc, 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%)
@@ -447,18 +448,19 @@ 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 * config_hallucination_power * D
l.hallucination += power_calc * 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 -= ((power/500)**3) * powerloss_inhibitor
if (damage < 75)
power = (power * ((100 - (0.15*damage - 5)**2) / 100)) + power*0.25
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 * (((damage**1.3)-(2*damage))/100)
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)
if(power > POWER_PENALTY_THRESHOLD || damage > damage_penalty_point)
if(power > POWER_PENALTY_THRESHOLD)
@@ -482,7 +484,7 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal)
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) / 10) ** SUPERMATTER_INTEGRITY_MULT
min_damage += ((damage - damage_archived) / 9) * SUPERMATTER_INTEGRITY_MULT
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()
@@ -522,7 +524,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 += Proj.damage * config_bullet_energy
power_calc += 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)].")
@@ -623,6 +625,17 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal)
to_chat(user, "<span class='notice'>You extract a sliver from \the [src]. \The [src] begins to react violently!</span>")
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, "<span class='notice'>You spray \the [src] with [S].</span>")
playsound(user.loc,'sound/effects/spray2.ogg',50,1,-6)
S.usesleft--
if (prob(10))
to_chat(user, "<span class='warning'>Your hands slip and you drop [S] into \the [src]!</span>")
Consume(S)
return
else if(user.dropItemToGround(W))
user.visible_message("<span class='danger'>As [user] touches \the [src] with \a [W], silence fills the room...</span>",\
"<span class='userdanger'>You touch \the [src] with \the [W], and everything suddenly goes silent.</span>\n<span class='notice'>\The [W] flashes into dust as you flinch away from \the [src].</span>",\

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 22 KiB