Merge pull request #677 from ArchieBeepBoop/supermatterfixes

Makes the SM A little less vulnerable to tesla delams. Also, ability to light up a cig on the SM.
This commit is contained in:
Dahlular
2020-11-13 19:09:57 -07:00
committed by GitHub
+33 -5
View File
@@ -29,7 +29,7 @@
#define MOLE_HEAT_PENALTY 350 //Heat damage scales around this. Too hot setups with this amount of moles do regular damage, anything above and below is scaled
#define POWER_PENALTY_THRESHOLD 5000 //Higher == Engine can generate more power before triggering the high power penalties.
#define SEVERE_POWER_PENALTY_THRESHOLD 7000 //Same as above, but causes more dangerous effects
#define CRITICAL_POWER_PENALTY_THRESHOLD 9000 //Even more dangerous effects, threshold for tesla delamination
#define CRITICAL_POWER_PENALTY_THRESHOLD 12000 //Even more dangerous effects, threshold for tesla delamination
#define HEAT_PENALTY_THRESHOLD 40 //Higher == Crystal safe operational temperature is higher.
#define DAMAGE_HARDCAP 0.002
#define DAMAGE_INCREASE_MULTIPLIER 0.25
@@ -414,8 +414,8 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal)
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%)
if(bzcomp >= 0.4 && prob(50 * bzcomp))
fire_nuclear_particle() // Start to emit radballs at a maximum of 50% chance per tick - was 30% before but figured that's mild
if(bzcomp >= 0.4 && prob(30 * bzcomp))
fire_nuclear_particle() // Start to emit radballs at a maximum of 30% chance per tick
var/device_energy = power * REACTION_POWER_MODIFIER
@@ -606,8 +606,36 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal)
/obj/machinery/power/supermatter_crystal/attackby(obj/item/W, mob/living/user, params)
if(!istype(W) || (W.item_flags & ABSTRACT) || !istype(user))
return
if (istype(W, /obj/item/melee/roastingstick))
if(istype(W, /obj/item/melee/roastingstick))
return ..()
if(istype(W, /obj/item/clothing/mask/cigarette))
var/obj/item/clothing/mask/cigarette/cig = W
var/clumsy = HAS_TRAIT(user, TRAIT_CLUMSY)
if(clumsy)
var/which_hand = BODY_ZONE_L_ARM
if(!(user.active_hand_index % 2))
which_hand = BODY_ZONE_R_ARM
var/obj/item/bodypart/dust_arm = user.get_bodypart(which_hand)
dust_arm.dismember()
user.visible_message("<span class='danger'>The [W] flashes out of existence on contact with \the [src], resonating with a horrible sound...</span>",\
"<span class='danger'>Oops! The [W] flashes out of existence on contact with \the [src], taking your arm with it! That was clumsy of you!</span>")
playsound(src, 'sound/effects/supermatter.ogg', 150, TRUE)
Consume(dust_arm)
qdel(W)
return
if(cig.lit || user.a_intent != INTENT_HELP)
user.visible_message("<span class='danger'>A hideous sound echoes as [W] is ashed out on contact with \the [src]. That didn't seem like a good idea...</span>")
playsound(src, 'sound/effects/supermatter.ogg', 150, TRUE)
Consume(W)
radiation_pulse(src, 150, 4)
return ..()
else
cig.light()
user.visible_message("<span class='danger'>As [user] lights \their [W] on \the [src], silence fills the room...</span>",\
"<span class='danger'>Time seems to slow to a crawl as you touch \the [src] with \the [W].</span>\n<span class='notice'>\The [W] flashes alight with an eerie energy as you nonchalantly lift your hand away from \the [src]. Damn.</span>")
playsound(src, 'sound/effects/supermatter.ogg', 50, TRUE)
radiation_pulse(src, 50, 3)
return
if(istype(W, /obj/item/scalpel/supermatter))
to_chat(user, "<span class='notice'>You carefully begin to scrape \the [src] with \the [W]...</span>")
if(W.use_tool(src, user, 60, volume=100))
@@ -818,4 +846,4 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal)
#undef HALLUCINATION_RANGE
#undef GRAVITATIONAL_ANOMALY
#undef FLUX_ANOMALY
#undef PYRO_ANOMALY
#undef PYRO_ANOMALY